PaloAltoNetworks / prisma.pan.dev

The home of Developer docs for Prisma by Palo Alto Networks
https://prisma.pan.dev
MIT License
21 stars 38 forks source link

Issue with "Alerts API" - List Alerts V2 - GET may return HTTP 413 #279

Open tylercamp opened 1 year ago

tylercamp commented 1 year ago

Describe the problem

The List Alerts V2 - GET endpoint returns HTTP 413 under certain (unclear) conditions. The List Alerts V2 - POST endpoint does not seem to have this issue. HTTP 413 is not mentioned as a possible response code for the GET endpoint, and there doesn't seem to be anything to suggest that these endpoints would behave differently such that the POST endpoint would be unaffected.

https://prisma.pan.dev/api/cloud/cspm/alerts#operation/get-alerts-v2

(This issue is based on support case 02378102.)

Suggested fix

Any of the following:

Additional Information

In our support case we made a request to the GET endpoint specifying timeUnit=day&timeAmount=10&detailed=true&limit=1&alert.status=open. The first request succeeded, but attempting to get the next page using the pageToken param led to HTTP 413. Using the same filter with pagination for the POST endpoint, as recommended by support, did not have this issue.

We did not see this error in our test environment, with ~120 alerts, but saw it in a larger production environment with substantially more alerts.

welcome-to-palo-alto-networks[bot] commented 1 year ago

:tada: Thanks for opening your first issue here! Welcome to the community!