Below is the general structure of the data returned from the endpoint
{
data: //The data of the item
operations: {
operationName1: {
// Details of operation 1
url: "the url to perform the action",
// additional restrictions
},
operationName2: {
// Details of operation 2
url: "the url to perform the action",
// additional restrictions
}
}
}
data
field contains the data requestedoperations
field optionally contains what operations (endpoints)
operations
object:
url
fieldBelow is the general structure of the data when a list of data is returned from the endpoint
{
data: [
// List of objects that all follow the pattern of the single returned item above
],
operations: {
// Examples below
next: {
url: "endpoint to get the next data if pagination is used",
},
previous: {
url: "endpoint to get the previous data if pagination is used",
},
},
}
data
field contains the list of objects that follow the structure of the “When returning a single item above”operations
next
field exists if the data was requested via pagination, and can get the next set of items. Doesn’t exist if can’t get the next set of dataprevious
field exists if the data was requested via pagination, and can get the previous set of items. Doesn’t exist if can’t get the previous set of dataprevious
and next
can existurl
for the endpoint that can be performed