Pagination

To paginate the primary data, supply pagination links in the top-level links object.

The following keys used for pagination links:

  • first: the first page of data

  • last: the last page of data

  • prev: the previous page of data

  • next: the next page of data

The page query parameter is reserved for pagination, for example query parameters such as page[number] and page[size].

The page[size] defines the maximum number of individual entries (such as cities, countries or DIDs) that are returned in the data.

http

GET /cities?page%5Bsize%5D=10 HTTP/1.1
Host: api.didww.com
Accept: application/vnd.api+json

curl

curl -i -X GET 'https://api.didww.com/cities?page%5Bsize%5D=10' -H "Accept: application/vnd.api+json"

The page[number] relates to the page[size] parameter and defines the page number of the returned data.

For example, if the page[size] is set to 10 and the page[number] is set to 3, entry numbers 21 to 30 will be returned to the data.

Maximum page size is 100 by default, unless it is overridden at a particular endpoint.

If the page[number] is not defined, page number 1 is returned.

Page number is 50 by default, unless it is overridden at a particular endpoint.

Keep in mind that pagination is disabled for certain destinations - in such cases, a request without filters will return all records.

http

GET /v3/cities?page%5Bnumber%5D=3&page%5Bsize%5D=10 HTTP/1.1
Host: api.didww.com
Accept: application/vnd.api+json

curl

curl -i -X GET 'https://api.didww.com/v3/cities?page%5Bnumber%5D=3&page%5Bsize%5D=10' -H "Accept: application/vnd.api+json"

Note

This section applies to any endpoint that responds with a resource collection as primary data, regardless of the request type.