Skip to end of banner
Go to start of banner

API response format

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Message format

All HTTP API responses in our system MUST adhere to the json api v1.0 standard (http://jsonapi.org/)

This applies throughout the whole architecture regardless of which team writes the API or what language it is written in.

"id" and "type"


Hydration

Every API MUST avoid retrieving data from the database unless it is directly relevant to the API endpoint

Every API SHOULD prefer to return unhydrated collections and require the client to make further calls to obtain details for entities (this is not a hard rule, but rather a guiding philosophy)

Every API MUST include HATEOAS links to help the client find related entities and where the full details of an entity can be found

Caching

Every API MUST emit a cache-control header suggesting to the client how the response may (nor may not) be cached (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control)

Every API MUST respond correctly to incoming cache-control headers supplied in the request

Every API SHOULD be able to manage incoming etags in theĀ "If-None-Match" header

  • No labels