I am trying to retrieve logs for a specific service using the Datadog API's /api/v2/logs/events/search endpoint. The API returns logs in a paginated manner, and I have set the page limit to 10 logs per page. I am using the cursor provided by Datadog to fetch subsequent pages, but I encounter an issue on the 4th page.
Here's what I've tried so far:
Request logs for the specific service with a page limit of 10. Successfully received the 4th page with the cursor provided by Datadog. Attempted to use the cursor in the next API call to get the 5th page, but the data is not available.
I suspect that the cursor might have expired or that I am not using it correctly. I have double-checked the parameters and the cursor handling, but the problem persists.
Could someone please help me understand how to properly handle cursors for pagination in the Datadog API? Is there anything I might be missing or any specific considerations for using cursors effectively?
Any insights or code examples would be greatly appreciated.