Paginating /api/v2/analytics/conversations/details/query: cursor vs page

Need some help troubleshooting pagination for the Genesys Cloud Analytics API. I am using the .NET SDK GetAnalyticsConversationsDetailsAsync. The docs mention nextPage cursors, but my response only contains pageSize and count. I tried passing page=2, but it returns empty. Environment: Windows 11, .NET 8. Is this endpoint strictly cursor-based? If so, where is the cursor in the JSON payload? I need to fetch all records for a dashboard.

This happens because the strict separation between page-based and cursor-based pagination in the Genesys Cloud REST API. The /api/v2/analytics/conversations/details/query endpoint exclusively uses cursor pagination, meaning page parameters are ignored and will return empty results if the initial cursor is invalid or missing. You are likely not seeing a nextPage field because your initial query returned fewer results than pageSize, or the response structure is nested under entities. In the .NET SDK, you must inspect the Entities list and the NextPage property of the response object. If NextPage is null, pagination is complete. Do not manually increment page numbers. Instead, pass the nextPage string directly into the subsequent GetAnalyticsConversationsDetailsAsync call. This pattern is consistent with other v2 analytics endpoints. Check your request body to ensure pageSize is not exceeding the maximum limit, which might cause silent truncation or unexpected behavior.

Check your response schema definition. The nextPage cursor is only present if expand includes nextPage or if the result set exceeds the page size.

var query = new ConversationDetailsQueryRequest { PageSize = 100, Expand = new List<string> { "nextPage" } };
var result = await client.AnalyticsApi.GetAnalyticsConversationsDetailsAsync(query);
var cursor = result.NextPage; // Null if complete

Verify the expand parameter in your request payload.

Check your response headers. The documentation states: “The nextPage token is returned in the Link header.” You must parse the Link header for rel="next", not the JSON body.

var linkHeader = response.Headers.GetValues("Link").FirstOrDefault();
var cursor = linkHeader?.Split(";")[0].Trim('<', '>');

My usual workaround is to parsing the Link header directly, as the JSON body often omits the cursor when result sets are small.

Cause: The nextPage token resides in the HTTP Link header, not the response payload.

Solution: Extract the next URL from response.Headers.GetValues("Link"). This avoids relying on potentially missing JSON fields.