Maximum upper limit of pagination

Hi,

There is a section called “Maximum upper limit of pagination” at location https://v2.developer.pagerduty.com/docs/pagination.

It is saying “The REST API permits retrieving a maximum of 10000 records via pagination and If the total parameter is greater than 10000, then not all records in the set can be retrieved”. What does this mean? Because we have 13297 log entries we can get those with offset greater than 10000 and we can iterate the offset and retrieve the data in bulk of 100.

Can you explain what is the meaning of that section and how does it affect if log entries are more than 10,000?

Regards,
Sonal

Hello Sonal,

So currently the limit is not being enforced just yet. However, we will begin to enforce them for the Log Entries endpoint (/log_entries) to ensure reliable REST API activity; this would be from January 20, 2020. From that day any query for retrieving over 10,000 records via pagination will result in a 400 error.
Please ensure that any REST API queries using the Log Entries endpoint that exceed the documented limits are modified by in order to avoid return errors. At this time, there are no plans to enforce pagination limits on other REST API endpoints. I hope this helps.

Cheers,

Hi,

Then how do we know that the error is coming because of 10,000 limit because 400 error may come for any other reason. Is there any way we can get the total number with error so that we can confirm that the error is coming due to 10,000 limit?

Regards,
Sonal

Hi @Sonal1, you would know that the 400 is due to this limit if the sum of the offset and limit parameters in your request exceeded 10000. If your total results is larger than this, it’s recommended to use a filter to narrow it down first.

For example, if you are getting your incidents, you could append since and until parameters to your request URI:

https://api.pagerduty.com/incidents?since=2020-01-01&until=2020-01-02&time_zone=UTC

Is it applicable to “List log entries for an incident” API?

Hello @Sonal1,

This applies only to Log Entries endpoint call that pulls more incidents. The List log entries for an incident call is specif to an Incident so should not pull up to 10000 entries.

Thanks

Can you kindly provide us the sample response which says that limit is exceeded?

@sonal1,

There isn’t a sample request for that. When such a call is made, REST API will respond with a status 400.
More details on that here.

Cheers