- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
08-24-2023 08:17 AM
Hi,
Was looking for some guidance in using the Prisma Cloud API to retrieve information. I am wanting to list all inventory assets (and hopefully their detail) via the API. Basically similar to information that can viewed via the portal e.g. listing all assets in the explorer for say Resource Type=EC2 Instance....
...I can see the total number of assets using the /v2/Inventory endpoint...
...but would like to retrieve all the assets/details of those 15408 resources. I can see /uai/v1/asset call but that requires an asset ID to passed. Is there a way to list all assets based on a filter and return detailed information about them via the API?
Thanks
08-25-2023 07:50 AM
Hello,
Please refer the following link https://github.com/PaloAltoNetworks/prismacloud-api-python/tree/main/prismacloud/api/cspm
08-27-2023 10:13 PM
Hi,
Following up on Asset Inventory API, please let us know if any questions. Complete resource inventory from Prisma Cloud can be pulled using the below API https://github.com/PaloAltoNetworks/prismacloud-api-python/blob/feature/add-asset-inventory-v2/scrip...pcs_resources_export.py. Output will be full inventory of the assets and related metadata. Ref: s3 inventory attached
09-11-2023 09:11 PM
Hello Flipcode,
You can also use the following endpoint to get the list of resources similar to what you have in your screenshot
https://pan.dev/prisma-cloud/api/cspm/post-resource-scan-info/
You can use the example payload as below ;
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!