Prisma Cloud-API 'List Alerts V2 - GET' results generating unusually long 'nextpagetoken' response
589
Created On 08/20/24 13:54 PM - Last Modified 01/20/26 20:12 PM
Symptom
When using API 'List Alert V2-GET' the results are ingested correctly however, with the 'nextpagetoken' field, it produces a very long response that was showing 99,000 plus characters.
Environment
- Prisma Cloud
- API
Cause
Alerts Overview is paginated and as you scroll, data loads on-demand. The API uses a 'nextPageToken' to fetch the next page of data. NextPageToken carries filters with accessible account for non-system admins and the nextPageToken size depends on number of cloud accounts.
Resolution
Using the curl command below, this will alleviate any long response and generate desired results.
curl -i 'https://api.prismacloud.io/v2/alert' \ --data-raw '{"filters":[{"name":"alert.status","operator":"=","value":"open"}, {"name":"timeRange.type","operator":"=","value":"ALERT_OPENED"}], "timeRange":{"type":"to_now","value":"epoch"}, "sortBy":["alertCount:desc","severity:desc"], "size":10'} \ -H 'Accept: */*' \ -H "x-redlock-auth: {{token}}" \ -H "Content-Type: application/json"Additional Information
Additional information regarding API can be found here .