Links
Each GET request returns information about the URIs for the resource or resource instance.
Requests that can return only a single resource or a single instance of a resource
Attributes | Type | Description | |||
---|---|---|---|---|---|
_links | Object | Information about the URI | |||
rel | String | Relationship. This value is always “self.” | |||
uri | String | URI for the current resource |
In the following example, the request can return information about only a single resource. This object identifies the URI for that resource.
{
"_links": {
"rel": "self",
"uri": "/api/v1/data/devices/AAAAAAAAAAAAAAAAAAAA"
}
}
Requests that can return multiple instances of a resource
Attributes | Type | Description | |||
---|---|---|---|---|---|
_metadata | Object | Information about the request, including the request URI, base attributes, sorting, and filtering for the specified query For information about other metadata attributes, see Metadata. | |||
_links | Object or Array of objects | Information about the URI | |||
rel | String | Relationship. This can be one of the following values.
| |||
uri | String | URI for the current resource |
In the following example, pagination is used to return information for multiple devices in chunks of 20. The _links attribute is an array of objects. The first object in the array identifies information about the URI for the current response body, with the first 20 devices. The first object in the array identifies information about the URI for the next response body, with next 20 devices
{
"_links": [{
"rel": " self ",
"uri": "/api/v1/data/devices?offset=0&limit=20"
},
{
"rel": " next ",
"uri": "/api/v1/data/devices?offset=20&limit=20"
}]
}
In the following example, all devices are returned in the current response body. (Pagination is not used).
{
"_links": [{
"rel": "self",
"uri": "/api/v1/data/devices?offset=0&limit=0"
}]
}
Give documentation feedback