{
"_links": {
"self": "https://api2.frontapp.com/..."
"related": {...}
},
"id": "",
}
{
"_pagination": {
"next": "https://api2.frontapp.com/..."
},
"_links": {
"self": "https://api2.frontapp.com/..."
},
"_results": [...]
}
{
"_error": {
"status": 404,
"title": "Not found"
}
}
A JSON object will be at the root of every responses body. When requesting a collection of resources , the collection will be encapsulated in a _results
field.
A response will contain at least one of the following top-level members:
_pagination
: An object containing pagination information._links
: An object containing the resource links for self-discoverability._error
: An array of error objects
Links
To improve the self-discoverability of our API, every resources contains a _links
object:
Name | Type | Description |
---|---|---|
self | string | URL of the resource |
related | object (optional) | Object listing the URL of related resources |
Collection of Resources
Pagination
When listing a large number of resources, the API server will return a limited number of results. When this is the case, the JSON response will contain a field named _pagination
.
The pagination object will contain a URL pointer to the next page.
Name | Type | Description |
---|---|---|
next | string (optional) | URL of the next page |
Errors
When the response is an error, its body will contain an _error
object to describe the error.
An error object looks like:
Name | Type | Description |
---|---|---|
status | number | HTTP status code applicable to the error |
title | string | Human-readable summary of the problem |
message | string | Human-readable explanation of the error |
details | array | List of strings detailing the error |