API Guide

Table Of Contents
Data pagination
The console software provides pagination options on certain URIs that return a collection of entities. The pagination options
enable the clients to get paginated results. If a URI supports pagination, the relevant URI sections indicate it.
<Collection API>?$top=<required number of records>&$skip=<number of records to skip>
Examples:
Get 5
th
to 8
th
devices from the
Device collection
/api/DeviceService/Devices?$skip=4&$top=4
Get first four
devices from the
Device collection
/api/DeviceService/Devices?$top=4
NOTE: For more information about $skip and $top, see OData Version 4.0 Part 1: Protocol at docs.oasis-open.org.
Request headers
The request header represents headers in the client HTTPS request that are used to communicate client-preferences to the
service end point. The service provides the supported preference in the response header.
The following table lists a few examples of request headers:
Table 7. Examples of request headers
Request Header Description Example
x-auth-token Authentication token taken from
the return header of the
SessionService/Sessions POST
operation to create a session.
x-auth-token: d6399a19-38c8-467b-
a1ec-75ffa03efb7c
Accept-Language Choice of language that the client can
requestOptional.
Accept-Language: en
Response codes
For synchronous operations, the server returns HTTP response codes 200 or 204. For operations that take a long time, the
server returns a status code of 202 along with an HTTP response header (Location). This response corresponds to the URI of
the temporary resource that can be used to monitor the operation.
The following table lists some of the response codes:
Table 8. HTTP response codes
Request Response code
Success codes
GET
200 OK with message body
204 OK with no message body
206 OK with partial message body
POST
201 Resource created (operation complete)
202 Resource accepted (operation pending)
PUT
202 Accepted (operation pending)
204 Success (operation complete)
DELETE
202 Accepted (operation pending)
Key integration concepts 29