This document goes into more detail about the various operations you can perform with the API.
When making an API request, you usually don't receive all of the results of that request in a single response. This is because some responses could contain thousands of objects so most responses are paginated by default.
Cursor-based pagination is the most efficient method of paging and should always be used when possible. A cursor refers to a random string of characters which marks a specific item in a list of data. The cursor will always point to the item, however it will be invalidated if the item is deleted or removed. Therefore, your app shouldn't store cursors or assume that they will be valid in the future.
When reading an edge that supports cursor pagination, you see the following JSON response:
"data": [ ... Endpoint data is here],
"next": "https://api.oag.com/flights/?limit=10&cursor=00be40c7ef00f3ab4e6b4339ecfb 125e2638ff151edb844a078f7cf5ee52bc7e1"
A cursor-paginated edge supports the following parameters:
limit : This is the maximum number of objects that may be returned. A query may return fewer than the value of limit due to filtering.
totalCount : This is the total amount of records returned by the query.
totalPages : This is the total amount of pages returned by the query.
next : The API endpoint that will return the next page of data. If not included, this is the last page of data. Stop paging when the next link no longer appears.
previous : The API endpoint that will return the previous page of data. If not included, this is the first page of data.
The Health API is a public endpoint which gives information on service health.
Depending on the service health status any of the following responses can be returned:
HTTP Status 200 OK
HTTP Status 503 Service Unavailable
Sample 200 OK response
Sample 503 Service Unavailable response