Instructions on how to setup the Postman Collections and Environments relating to Prisma Cloud (including Compute Console) API requests
To use these Collections and Environment, there are a few setup pieces after importing the 4 files into Postman:
- Import the 4 files in root of this repo (3 Collections and 1 Environment) into Postman.
- Set some Postman Environment variables. You will need to set:
-
To get the address/URL for your Console, go to Compute > Manage > System > Downloads, and copy the string under Path to Console The URL should look something like this: https://us-east1.cloud.twistlock.com/us-1-123456789
- You will be replacing the compute-api-endpoint variable
-
To get the address/URL for your Microsegmentation, click on the key icon at the bottom of any page on *Cloud Network Security The URL should look something like this: https://api.east-01.network.prismacloud.io
- You will be replacing the aporeto-api-endpoint variable
-
Depending on what Admin console you see when you log in will determine which API Endpoint you will use.
- The corresponding value below will replace the api-endpoint variable.
The rest of the variables shouldn't need altered, and are either auto-generated or for future or other scenarios.
The below table shows an example of what a completed Environment should look like before generating any JWT tokens
Postman Variable | Use | Value/Example |
---|---|---|
api-endpoint | Main API endpoint for Prisma Cloud requests | api.prismacloud.io |
token | JWT token auto-generated after the /login request | |
compute-api-endpoint | API endpoint for all things within the Compute tab | https://us-east1.cloud.twistlock.com/us-1-123456789 |
compute-token | JWT token auto-generated after the Compute /authenticate request | |
api-version | Used only for the Compute collection for future API versions | v1 |
console-port | Used only for self-hosted versions of the Compute Console | |
aporeto-api-endpoint | API endpoint for all things within the Microsegmentation tab | https://api.east-01.network.prismacloud.io |
aporeto-token | JWT token auto-generated after the Microsegmentation /issue request | |
namespace | The namespace on CNS where you will be operating | /859889522116745232/my-cloud-account/Application |
In the Collection_Runner folder, there are specific examples for use-cases where using Postman's Collection Runner makes sense.
This is an easy way to iterate through files/CSVs/etc for a specific subset of API calls you want to make. More instructions in the README within this folder.
That's it! The Collections are not fully complete, so if you find a request that hasn't been created (or needs updated) please feel free to submit a PR.
You can easily switch between Prisma Cloud Tenants by creating multiple Environments. To do this just import the Prisma Cloud.postman_environment.json
file again and set the new api endpoints and credentials. Be sure to change the environment name so you can tell your environments apart!