The Description endpoint allows you to submit GET requests to retrieve all of the Description items and their attributes.
- GET /mping/api/v2/description¶
Get all available Descriptions
Example request
GET /mping/api/v2/description HTTP/1.0 Host: mping.ou.edu Accept: application/json
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)
Example response
HTTP/1.0 200 OK Date: Wed, 11 Feb 2015 20:00:59 GMT Server: WSGIServer/0.1 Python/2.7.9 Vary: Accept, Accept-Language, Cookie Content-Type: application/json Content-Language: en-us Allow: GET, HEAD, OPTIONS { "count": 46, "next": null, "previous": null, "results": [ { "id": 1, "name": "NULL", "api_access": "public", "active": true, "category": { "id": 8, "name": "Test", "active": true } }, { "id": 2, "name": "NULL", "api_access": "public", "active": true, "category": { "id": 9, "name": "None", "active": true } }, { "id": 3, "name": "Rain", "api_access": "public", "active": true, "category": { "id": 1, "name": "Rain/Snow", "active": true } }, { "id": 4, "name": "Freezing Rain", "api_access": "public", "active": true, "category": { "id": 1, "name": "Rain/Snow", "active": true } },
Status Codes:
- 200 OK – no error
Response JSON Object:
- count (int) – The total number of Descriptions 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 Descriptions matching your query
Response JSON Array of Objects:
- id (int) – the primary id of the Description
- name (string) – name of the Description
- api_access (string) – will be either “public” or “private”
- active (bool) – whether the Description is active or not
- category (object) – the Category object this Description belongs to
- [category id] (int) – the primary id of the Category
- [category name] (string) – name of the Category
- [category active] (bool) – whether the Category is active or not