API Guidelines

API Format

Red Marker's API is designed using in the JSON:API specification.

JSON:API is a specification for how a client should request that resources be fetched or modified, and how a server should respond to those requests.

JSON:API is designed to minimize both the number of requests and the amount of data transmitted between clients and servers. This efficiency is achieved without compromising readability, flexibility, or discoverability.

JSON:API requires use of the JSON:API media type (application/vnd.api+json) for exchanging data.

Compound Documents

Note

To reduce the number of HTTP requests, servers we allow responses that include related resources along with the requested primary resources. Such responses are called “compound documents”.

A compound document is a resource which includes the data of included relations. For example, when requesting Review Rules from Review it may include the data of the Rules so you don’t need a second call to fetch the Rule that created the Review Rule.

/v2/reviews/1001/review-rules?include=rule

Sorting

Sorting is done according to the JSON:API specification. Each resource's endpoints defines which of its attributes can be sorted.

Pagination

Pagination is done according to the JSON:API specification.

Filtering

Filtering is done according to the JSON:API specification. Each resource's endpoints defined which of its attributes can be filtered on, and how.