Platform API
Desk Misc

Miscellaneous

This page contains the following information:

  • ISO 8601 format: dates and times in ISO 8601 format to indicate the occurrence of certain action in a Sendbird application.
  • Timestamps: a 10 or 13 digit record of the time of the occurrence of certain action in a Sendbird application.
  • Pagination: opaque strings which are used to point a specific index in a data set for pagination.

ISO 8601 format

Desk Platform API uses region-independent dates and times to record the time of when certain actions are performed in a Sendbird application. Dates and times take the form of ISO 8601 format, which is YYYY-MM-DDThh:mm:ss.sTZD (for example, 2020-08-11T09:19:45. 055635Z). The alphabet T in the format refers to the starting point of the time while s refers to the decimal fraction of a second which can be one or more digits. TZD is a time zone designator which can be Z, +hh:mm, or -hh:mm.


Timestamps

Desk Platform API uses region-independent timestamps to record the time of when certain actions are performed in a Sendbird application. The timestamps take the form of Unix Time, mainly in milliseconds, which is a 13-digits number (for example, 1484012373521). A few resources, especially channels, contain timestamps in the form of seconds, which are 10-digits long. The length of the timestamp is specified in the parameter description in the API guide.

Note: Unix time may be checked on most Unix systems by typing date +%s on the command line.


Pagination

When querying a set of data, the Desk API uses paginated URL to return results in small and continuous chunks. With the limit and offset, you can retrieve a set amount of results from the specific position. The Desk API also provides the URLs of the previous and next pages in the response body for retrieval actions. When making a request with a page URL, a result set starting from that location is returned.

Note: A value of null in the next indicates the query has reached the end of its results.

For example, if you want to get 10 results each after passing 20 items and starting from the 21st, make a request as below.

Light Color Skin
Copy
?limit=10&offset=20

Then you will find paginated URLs in the next or previous of the response body. Use either of the property values to retrieve results set in the previous or next page.

Status: 200 OK
Light Color Skin
Copy
{
    "count": 40,
    "next": "https://desk-api-{application_id}.sendbird.com/platform/v1/agents?limit=10&offset=30",
    "previous": "https://desk-api-{application_id}.sendbird.com/platform/v1/agents?limit=10&offset=10",
    "results": [
        {
            ...
    
        },
        ... # More agents 
    ]
}