Thank you for your assistance.
So that we understand this correctly, when following the next link the response will still be the “test1” resource but with page two of the “testpoints” resource identifiers?
{
"type": "test",
"id": "test1",
"attributes": { /* ... */ },
"relationships": {
"testpoints": {
"data": [ /* second x linkage items here */ ],
"links": {
"prev": "http://url.com/v1/test/1/relationships/testpoints?pagenumber=1&pagesize=x",
"next": "http://url.com/v1/test/1/relationships/testpoints?pagenumber=3&pagesize=x",
"related": "http://url.com/v1/test/1/testpoints"
}
}
}
Would you then add a links object under relationships to support paging more than one “to-many” relationship?
{
"type": "test",
"id": "test1",
"attributes": { /* ... */ },
"relationships": {
"testpoints": {
"data": [ /* first x linkage items here */ ],
"links": {
"next": "http://url.com/v1/test/1/relationships/testpoints?pagenumber=2&pagesize=x",
"related": "http://url.com/v1/test/1/testpoints"
}
},
"measerrors": {
"data": [ /* first x linkage items here */ ],
"links": {
"next": "http://url.com/v1/test/1/relationships/measerrors?pagenumber=2&pagesize=x",
"related": "http://url.com/v1/test/1/measerrors"
}
},
"links": {
"next": "http://url.com/v1/test/1/relationships?pagenumber=3&pagesize=x"
}
}
Can you use include on a collection or just on a resource?
Would pagination for fields be handled in the same way?