URL: /companies
{
"data": [
{
"id": "ABCDE",
"type": "company",
"attributes": {
"name": "ABCDE Inc"
},
"relationships": {
"users": [
"data: {
"id": "USER-1",
"type": "user"
},
{
"id": "USER-2",
"type": "user"
}
]
}
}
]
}
URL: /companies?include=users
{
"data": [
{
"id": "JOHN-DEER-INC",
"type": "company",
"attributes": {
"name": "John Deer Inc"
},
"relationships": {
"users": {
"data": [
{
"id": "USER-1",
"type": "user"
},
{
"id": "USER-2",
"type": "user"
}
]
}
}
}
],
"included": [
{
"id": "USER-1",
"type": "user",
"attributes": {
"name": "John Deer"
},
"relationships": {
"company": {
"id": "ABCDE",
"type": "company"
}
}
},
{
"id": "USER-2",
"type": "user",
"attributes": {
"name": "John Deer"
},
"relationships": {
"company": {
"id": "ABCDE",
"type": "company"
}
}
}
]
}