The Reports endpoint allows you to submit GET requests to retrieve mPING reports and their attributes. It also allows you to provide query parameters in order to filter results.
You must have an API Key and agree to the appropriate license terms to use this API.
Also certain types of reports (tornadoes, etc) will only be available to the NWS. These are the reports whose Description is marked “private”.
- GET /mping/api/v2/reports¶
Get all available reports
Example request
GET /mping/api/v2/reports HTTP/1.0 Host: mping.ou.edu Accept: application/json Authorization: Token Your_API_KeyQuery Parameters:
- for list of available query parameters see Filtering Reports
Request Headers:
- Accept-Language – Optional: if need description entries in another language supported by the API
- Content-Type – Optional: requested format type of response (default is json)
- Authorization – Token Your_API_Key - must provide your api key for authorization
Example response
HTTP/1.0 200 OK Date: Wed, 11 Feb 2015 20:44:02 GMT Server: WSGIServer/0.1 Python/2.7.9 Vary: Accept, Accept-Language, Cookie Content-Type: application/json Content-Language: en-us Allow: GET, POST, HEAD, OPTIONS { "count": 37, "next": null, "previous": null, "results": [ { "id": 66681, "obtime": "2013-02-12T09:27:00Z", "category": "Rain/Snow", "description": "Rain", "description_id": 3, "geom": { "type": "Point", "coordinates": [ -97.1462239, 33.1970531 ] } }, { "id": 66682, "obtime": "2013-02-12T09:42:00Z", "category": "Rain/Snow", "description": "Mixed Ice Pellets and Snow", "description_id": 10, "geom": { "type": "Point", "coordinates": [ -101.86909, 33.50854 ] } }, { "id": 66683, "obtime": "2013-02-12T09:29:00Z", "category": "Rain/Snow", "description": "Sleet/Ice Pellets", "description_id": 7, "geom": { "type": "Point", "coordinates": [ -101.8621469, 35.14763472 ] } }, { "id": 66684, "obtime": "2013-02-12T09:48:00Z", "category": "Rain/Snow", "description": "Drizzle", "description_id": 5, "geom": { "type": "Point", "coordinates": [ -101.86924, 33.50853 ] } },
Status Codes:
- 200 OK – no error
- 401 Unauthorized – Unauthorized - must supply an API Key
- 403 Forbidden – Forbidden
Response JSON Object:
- count (int) – The total number of reports matching your query
- next (string) – provides url to get next page of results otherwise null
- previous (string) – provides url to get previous page of results otherwise null
- results (array) – array of mPING reports matching your query
Response JSON Array of Objects:
- id (int) – primary id of mping report
- obtime (datetime) – the date and time of the report in GMT
- category (string) – the Category of the report
- description (string) – the Description of the report
- description_id (int) – the primary id of Description
- geom (geometry) – provides the point location of the report