cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pagination not working and nextPageKey is null even after providing value of pageSize query param

manjunathcr22
Participant

https://xxxxxxxx.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:host.cpu.gcpu.usage:names,builtin:host.cpu.msu.avg:names,builtin:host.cpu.msu.capacity:names,builtin:host.cpu.ziip.eligible:names,builtin:host.cpu.entConfig:names,&from=1652853660000&to=1652940060000&resolution=60m 

For above request we are getting 876KB of data.

So we need pagination support.


We are getting results like this without pageSize param.

{
"totalCount": 1292,
"nextPageKey": null,
"resolution": "1h",
...

}

 

Even in above uri if I add pageSize param with values 50,75 and 100 there is no change in response and size of data returned. Still nextPageKey is null.


How to make pagination working so that we get nextPageKey so that we can navigate using nextPageKey.

1 REPLY 1

Radu
Dynatrace Champion
Dynatrace Champion

Hi @manjunathcr22 

 

Pagination is not supported for this API.

As you can read in the documentation, the nextPageKey attribute is deprecated and only included in the JSON response for backwards compatibility purposes.

 

If the total payload you are extracting is too large, one suggestion is to break up the metric query into multiple queries (using the "from" and "to" query parameters to divide into smaller timeframes).

 

I hope this helps.

 

Radu

Featured Posts