Demo: https://homely-jsonapi-prototype.azurewebsites.net/api/v1/listings
-
Get all listings https://homely-jsonapi-prototype.azurewebsites.net/api/v1/listings
-
Get single listing https://homely-jsonapi-prototype.azurewebsites.net/api/v1/listings/1
-
Get single listing (limit fields) https://homely-jsonapi-prototype.azurewebsites.net/api/v1/listings?fields[listings]=title
-
Get single listing and include agents https://homely-jsonapi-prototype.azurewebsites.net/api/v1/listings/1?include=agents
- Easy enough to get working
- Adds ability to fetch related resources and limit props, without additional middle layer
- Can make use of existing HTTP constructs (e.g caching)
- No deep nested support. Coming soon
- Bloats existing REST API
- Less frontend autonomy
- Where we would we use this? API Gateway, Microservices, or boh?
- How can we build specialized query endpoints? (e.g /listings/location/1). Would we just do
/listings?filter[locationId]=gt:1
?
- Persistence (updating resources, JSON PATCH, etc)
- Caching
- Paging