Error:
An unexpected error occurred. Please click Reload to try again.
Error:
An unexpected error occurred. Please click Reload to try again.
Prisma Cloud: Generating Spreadsheet For Alerts Through Prisma ... - Knowledge Base - Palo Alto Networks

Prisma Cloud: Generating Spreadsheet For Alerts Through Prisma Cloud APIs

1525
Created On 06/22/22 23:58 PM - Last Modified 02/15/24 21:08 PM


Objective


How to successfully generate and download a spreadsheet of alerts by making calls to Prisma Cloud CSPM APIs.

Environment


  • Prisma Cloud CSPM
  • API (Application Programming Interface)
  • Postman


Procedure


  1. Make sure you’re logged in and have access to your tenant. You’ll use the Login Generate Token call in the Prisma Cloud Collection.
 
GUI path: Collections > Prisma Cloud > Login > Login Generate Token

Screen Shot 2022-06-07 at 10.42.47 AM.png

Note:  200 OK status code confirms a successful login attempt and tenant connection
 

  1. Submit a CSV job by using the Submit Alert CSV Generation Job call.
Screen Shot 2022-06-22 at 3.26.39 PM.png
  • To implement filters for your alerts, add them to the body of your payload as shown in the screenshot above
 
  1. Get the Job ID from the response of the Submit Alert CSV Generation Job call.
Screen Shot 2022-06-22 at 3.49.59 PM.png
 
  1. Use the Job ID from the response of the previous API call in the GET https://{{api-endpoint}}/alert/csv/jobId/status.
Screen Shot 2022-06-22 at 4.00.22 PM.png
 
  1. Run the previous call again until you see the status in the response change to "READY_TO_DOWNLOAD."
Screen Shot 2022-06-22 at 4.23.42 PM.png
 
  1. Run the GET https://{{api-endpoint}}/alert/csv/jobId/download
Screen Shot 2022-06-22 at 4.31.29 PM.png
Note: The response of the above API call contains all the detailed alerts according to the filters applied
 
  1. Click on Save Response > Save to a file to download all the alerts in spreadsheet.
Screen Shot 2022-06-22 at 4.41.28 PM.png
  1. Open the downloaded spreadsheet.
Screen Shot 2022-06-22 at 4.56.12 PM.png
 


Additional Information


Accessing Prisma Cloud Through API Calls

For you to be able to call Prisma Cloud APIs, you’ll need to have your access keys generated. To generate an access key for yourself please follow these steps. Two popular ways to call APIs are Postman and cURL. This documentation will mostly talk about Postman. Please go through these steps to generate JSON Web Tokens (JWT) in Prisma Cloud.

Setting Up Postman

Prisma Cloud CSPM has a Github repository with a collection of not all but most API calls that you can use. This repository also contains instructions for setting up Postman.

Note: some calls in this collection might be incomplete. For these incomplete calls, please refer to our API documentation for Prisma Cloud CSPM.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000Cq9PCAS&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail