How to work with _cursor parameter

Some API requests that contain the _perPage parameter don't have the _page parameter to display the next page. Instead of the _page parameter you'd need to use the _cursor parameter to display the next page with records.

List of requests utilizing the _cursor parameter

  • GET /calls
  • GET /grid/reports/time
  • GET /phone_numbers
  • GET /tickets/history

The value for the _cursor parameter is provided to you in the response header as the next_page_cursor header value. So essentially all you need to do to load the next page is read the next_page_cursor from the response header and send it in your request as the _cursor parameter.

 

The _cursor value is base64 encoded and it contains a json with the ID of the last loaded record. So if you'd like to load the records after a specific ID, e.g. 5, then you could base64 encode {"id":"5"} to get eyJpZCI6IjUifQ== which you could send as the _cursor. This would load records with an ID value higher than 5 (record with ID 5 won't be displayed).

×