-
OmnosAPI
The Omnos API hosts real-time and historical people count data for your Gryd-enabled spaces.
The Omnos API is built upon REST, returns JSON responses, and supports cross-origin resource sharing. Standard HTTP verbs are used to perform CRUD operations, and the API returns standard HTTP response codes to indicate errors. API versioning is implemented via namespaces. Token authentication is used to authenticate every API request.
Base URL
https://api.grydspace.io/v3
-
Authentication
All API endpoints are authenticated using your API token, found in the dashboard.
Your token must be included in the Authorization HTTP header, prefixed by the string literal "Bearer" with a single space separating the two strings. Any API call made without the proper Authorization header will return a 403 error.
HTTP Authorization Header
Authorization: Bearer YOUR_API_TOKEN
-
Errors
Omnos endpoints use standard HTTP error codes. The response includes any additional information about the error.
Error Codes
400 Bad Request
The request sent to the API is invalid. Additional information will be returned in the response body.
403 Forbidden
The client is not allowed to perform this request. Can be caused by a missing or invalid API token.
404 Not Found
The requested resource does not exist.
409 Conflict
The request conflicts with another request.
-
Timestamps
All timestamps sent to the API must be formatted as strings according to the ISO 8601 standard for UTC timestamps. The API will return all timestamps in the same UTC format.
Most programming platforms have built-in utilities to convert between local time and UTC.
ISO 8601 UTC Timestamp
2016-05-23T10:00:00.000Z
-
Pagination
Density endpoints that return multiple results will be paginated to 200 items by default.
For these endpoints the root of the response object will contain the total number of results, the next and previous page URLs, and an array with the current page of results. If all results fit onto a single page, the next and previous page URLs will be null.
Example Request
curl -H "Authorization: Bearer YOUR_API_TOKEN" \ https://< your url >/v2/spaces/?page=4&page_size=15
Paginated Response
{ "total": 89, "next": "https://< your url >/v2/spaces/?page=5&page_size=15", "previous": "https://< your url >/v2/spaces/?page=3&page_size=15", "results": [ … ] }