PaloAltoNetworks / pan.dev

Palo Alto Networks for Developers
https://pan.dev
MIT License
38 stars 53 forks source link

PATH_TO_CONSOLE/api/v32.06/cloud/discovery/entities does not return results based on request payload #690

Open jluevan13 opened 3 months ago

jluevan13 commented 3 months ago

Documentation link

https://pan.dev/prisma-cloud/api/cwpp/get-cloud-discovery-entities/

Describe the problem

Request for improvement: example, trying to retrieve all undefended azure-acr registries, I define the payload as below. However, this does not impact the response and all records for all service types are returned.

payload = { "provided": ["azure"], "serviceType": ["azure-acr"], }

Hardcoding the url as below will return the requested information.

"https://app0.cloud.twistlock.com/app0-xxxxxxxx/api/v32.06/cloud/discovery/entities?serviceType=azure-acr&defended=false"

Suggested fix

Response should provide only the information that is passed in the payload in request.