Using combination of relationships and included related resources it is possible to avoid making many unnecessary API calls.
http://jsonapi.org/format/#document-compound-documents
"data": [
{
"id": "59d23d10-1aa3-11e5-8c51-f1d09152a8c3",
"type": "activities",
"attributes": {
"ip": "x.x.211.243",
"bot": false
},
"relationships": {
"user_agent": {
"data": {
"type": "user_agents",
"id": "1"
}
}
}
}
],
"included": [
{ "type": "user_agents", "id": "1", "attributes": { "os": "windows", "browser": "chrome" } }
]
After parsing that response activity.user_agent should be present, without any additional API calls.
Is there any appetite for adding this seemingly priceless functionality?
Using combination of
relationshipsandincludedrelated resources it is possible to avoid making many unnecessary API calls.http://jsonapi.org/format/#document-compound-documents
After parsing that response
activity.user_agentshould be present, without any additional API calls.Is there any appetite for adding this seemingly priceless functionality?