New limits for offset-based pagination

Return to top

19 Comments

  • Clik Rogan

    Do we have any insight on what OOTB integrations this will impact? Specifically Salesforce OOTB integration? 

    0
  • Sanjeev Mandalapu
    Zendesk Product Manager

    Hi Rogan,

    OOTB integrations (built by Zendesk) will be auto-upgraded to use Cursor Pagination Model.

    0
  • Tanawat Oonwattana

    Hi,

    Do time based incremental export considered OBP or CBP? and does it get affected by this change?

    reference: https://developer.zendesk.com/documentation/ticketing/managing-tickets/using-the-incremental-export-api/#time-based-incremental-exports

    0
  • Sanjeev Mandalapu
    Zendesk Product Manager

    Hi Oonwattana,

    Time based Incremental Export is a special case and not considered either OBP or CBP. The new page 100 limit is not applicable to it.

    You can export tickets using cursor-based exports or time-based exports. However, Zendesk strongly recommends using cursor-based exports for better performance.

    0
  • Tanawat Oonwattana

    Hi,

    Thanks for the recommendation, but we will still be keeping with the Time based method.

    The issue with cursor-based is that it gives out the next page path as code, e.g. https://{{subdomain}}.zendesk.com/api/v2/incremental/tickets/cursor.json?cursor=MTU3NjYxMzUzOS4wfHw0Njd8

    This is making it very much difficult to troubleshooting in case of issues, or let's say that the service stops polling the ticket data, and want to restart the service, we would not know what was the time stamp that the service got stopped.

    0
  • Sanjeev Mandalapu
    Zendesk Product Manager

    Hi Oonwattana,

    We respect your method choice as it is still valid way to paginate data.

    ---

    I would like to provide some extra information for your scenario. I hope you it could be helpful.

    Unsure if you already know this, but the cursor value is a base64 string of {unix_time} and other relevant coded value used by Zendesk to paginate results in an optimal way.

    For example, `MTU3NjYxMzUzOS4wfHw0Njd8` is base64Encoded value of `1576613539.0|...|` which in turn is `Tuesday, 17 December 2019 20:12:19` in human readable time.

    If debugging is a concern, especially figuring out the timestamp, you may do that with the cursor model as well with this single extra decoding step when needed.

    You can always use a mix of timed and cursor models. This will be handy to restart your export job after any issues. Referencing the docs - 

    Use the following path for the initial request:

    GET /api/v2/incremental/tickets/cursor.json?start_time={unix_time}

    After using the start_time parameter in the initial request, use the cursor parameter for all subsequent results pages as well as for all subsequent exports:

    GET /api/v2/incremental/tickets/cursor.json?cursor={cursor_pointer}

    Hope this helps.

    0
  • Tanawat Oonwattana

    Thanks for the update Sanjeev Mandalapu

    I am also wondering if cursor based pagination is supporting ticket_events in incremental export?

    https://developer.zendesk.com/api-reference/ticketing/ticket-management/incremental_exports/#incremental-ticket-event-export

    From below doc, it says it only supports tickets/users, not ticket_events?

    https://developer.zendesk.com/documentation/ticketing/managing-tickets/using-the-incremental-export-api/#cursor-based-incremental-exports

    0
  • Sanjeev Mandalapu
    Zendesk Product Manager

    As of today, only Time Based Model is supported for the ticket_events.

    We will update in the documentation when support for CBP model is made available.

    0
  • Rich Herbert - Comcast HR

    Hi there, 

    Will this take effect in Zendesk Sandbox environments at the same time?

    Thanks!

    Rich

    0
  • Hossein Vahedi

    Hi there! Is Cursor Pagination available in list-tickets-from-a-view api?

    Thanks in advance!

    0
  • Sanjeev Mandalapu
    Zendesk Product Manager

    Hi Rich Herbert - Comcast HR,

    Yes, the changes will be rolled out at the same time.

    0
  • Sanjeev Mandalapu
    Zendesk Product Manager

    Hi Hossein Vahedi,

    We are providing CBP Support for the Tickets View. The change is being rolled out and we will update the documentation once it is fully there.

    0
  • Sanjeev Mandalapu
    Zendesk Product Manager

    Change:

    Zendesk has extended the timeline by a week to August 22, 2023 UTC from August 15, 2023 to give full 3 months notice.

    0
  • 이지훈(Lee jihoon)

    "offset pagination" explicitly gives the total count value, but "cursor pagination" makes it difficult to calculate the total count.

    I would like to show what percentage is currently fetched when some API is performed sequentially fetching a few hundred pages. So the user can choose to wait or give up. Waiting without a promise only gives users pain.

    However, "offset pagination" has a total count, so it is easy to calculate how far it has progressed, but "cursor pagination" makes this difficult or impossible.

    For example user.json it gives api/v2/users/count.json but for other api the total count is often unknown.

    Is there any way to improve this? Also, are there any plans to provide a "count" value in all "cursor pagination" methods?

    Because of this total count, I can't easily turn it into "cursor pagination".

    0
  • Sanjeev Mandalapu
    Zendesk Product Manager

    There are certain design criteria on the Cursor Model as stated in the documentation. Count is one of such criteria and you have to use the relevant endpoint's /count path to get the count you need. 

    Analysing the traffic we get, the product has identified the top endpoints and already provide count for - 

    Do you a specific endpoint that needs count ? What is the use case for your integration/app ?

    Thank you.

    0
  • 이지훈(Lee jihoon)

    hi. Sanjeev

    Your team isn't listed above, but the article API also has new limits starting yesterday. That's why I looked for this update notice. But in the article API there is no /count path for the endpoint you mentioned.

    https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/

    If you have this, I'd be grateful if you let me know.

    If your team hasn't made it yet, please make it soon.

    Then I'm happy to switch to "cursor pagination" and ride.

    Thanks. 고마워.

     

    0
  • Sanjeev Mandalapu
    Zendesk Product Manager

    Thank you.

    I will reach out to the Help Center teams and explore the option of providing count in the respective endpoints.

    0
  • Abhinay Pandey

    Hi,
    I'm using /ticket_forms endpoint to fetch zendesk ticket forms but I did not find the /ticket_forms API listed in above mentioned "Endpoints with CBP Capability" list. Does this API support cursor pagination or just offset pagination for now. 
    Also, while using the offset pagination I'm always getting the same result set even after passing per_page and page parameters to the request param. Is there anything which I missed out. 
    I would really appreciate any help. 
    example request : https://{{subdomain}}.zendesk.com/api/v2/ticket_forms.json?per_page=5&page=1

    thanks 

    0
  • David

    Hello!

    I’m happy to help. The /ticket_forms endpoint is not listed in the “Endpoints with CBP Capability” list because it does not support CBP pagination. Instead, it supports cursor pagination and offset pagination. 

    To use cursor pagination, include the page[size] parameter in the request parameters. This parameter is also used to specify the number of items to return per page. Most endpoints limit this to a maximum of 100. If you omit the page[size] parameter, offset pagination is used.  

    Regarding your issue with offset pagination, it is possible that the page parameter is not being passed correctly. You can try using the next_page URL returned in the response to fetch the next set of results.  

    0

Please sign in to leave a comment.

Powered by Zendesk