API endpoints that return a list of results use a set of common parameters, return formats and rules for pagination.
Parameters
Name | Optional | Description |
---|---|---|
rows | NO | Number of elements to return. Range must be between 10 and 200 Individual services may define different allowed ranges |
offset | NO | Offset of the query |
Return codes
HTTP Code | Description |
---|---|
200 | OK |
400 | Parameters rows or offset are not present rows is out of range offset is negative |
404 | offset > num_found |
If there are 0 results, a request will offset 0 will return 200 with an empty results list. Any other offset will be a 404.
Result format
The API result will include at least 2 values: the total number of elements and the elements for the current pagination.
Services may include extra fields on the root object.
{ "num_found": N, "results": [...], ... }
Key | Type | Description |
---|---|---|
num_found | integer | Total number of results |
results | array | Actual results. The type of result depends on the API endpoint |