16 Jun 2026 05:24 AM
I’m trying to retrieve Kubernetes events from the last month using the Dynatrace API, but I can only get 20 events at a time. How can I fetch all events for the past month? api details: {{baseUrl}}/it_prod-dynatrace-environment-apac/v2/events?entitySelector=entityId(KUBERNETES_CLUSTER-0FB79669080C9DD5)&from=now-30d&to=now&pageSize=500
16 Jun 2026 06:35 AM
@Arunkumarbnp How are you querying the API? Does the initial response include nextPageKey ?
16 Jun 2026 07:03 AM - edited 16 Jun 2026 07:05 AM
Hi @p_devulapalli
Thanks for your response
I use this api in postman
api details: {{baseUrl}}/it_prod-dynatrace-environment-apac/v2/events?entitySelector=entityId(KUBERNETES_CLUSTER-0FB79669080C9DD5)&from=now-30d&to=now&pageSize=500
I tried with nextpagekey, I got the below error
"path": "entitySelector",
"message": "must not be used in combination with nextPageKey query parameter.",
"parameterLocation": "QUERY",
"location": null
"path": "to",
"message": "must not be used in combination with nextPageKey query parameter.",
"parameterLocation": "QUERY",
"location": null
"path": "pageSize",
"message": "must not be used in combination with nextPageKey query parameter.",
"parameterLocation": "QUERY",
"location": null
16 Jun 2026 08:03 AM
@Arunkumarbnp When using nextpagekey, you need to omit all other query parameters and just use nextpagekey in the request to get a response.
16 Jun 2026 08:11 AM
Thanks for your reply,
If an entity is not explicitly specified in the API request, will nextPageKey still fetch all events for hosts and Kubernetes clusters within the management zone? Or does it only return events for entities that are directly referenced in the query?
I need k8 events only
17 Jun 2026 12:08 AM
@Arunkumarbnp Yes, the nextPageKey would fetch the response from next page with the filters set in first response. You would see only events of the specific cluster set in your first query
17 Jun 2026 05:32 AM
@p_devulapalli
Can you please share me the right api, I'll check and let you know if it works
Featured Posts