Skip to main content

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

AttributesTypeDescription
_linksObjectInformation about the URI
 relStringRelationship. This value is always “self.”
 uriStringURI 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

AttributesTypeDescription
_metadataObjectInformation about the request, including the request URI, base attributes, sorting, and filtering for the specified query

For information about other metadata attributes, see Metadata.

 _linksObject or Array of objectsInformation about the URI
  relStringRelationship. This can be one of the following values.
  • prev. Link information for the previous set of members.
  • self. Link information for the current set of members.
  • next. Link information for the next set of members.
  uriStringURI 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"
}]
}