REST API (Beta)
Use the Panther REST API to interact with your Panther entities
Overview
Panther offers a REST API to interact with certain parts of your Panther instance. Currently, you can interact with the following entities through the REST API:
Additional operations are available in the GraphQL API.
Discover the Panther REST API schema
Discover the REST API schema by downloading the OpenAPI specification file:
You can discover the API schema by browsing the API Playground in your Panther Console. Learn more on API Playground.
How to use the Panther REST API
Step 1: Identify your Panther REST API URL
To locate your REST API URL:
In the upper-right corner of your Panther Console, click the gear icon, then API Tokens. At the top of the page, see the API URL.
If you are running a SaaS deployment of Panther, your REST URL will be the portion shown below:

If you are running a Cloud Connected or self-hosted deployment of Panther, the URL will be the portion shown below (inclusive of
/v1):

Note that all REST URLs exclude /public/graphql from the end of the value.
Step 2: Generate an API token
See these instructions on how to create an API token. You can find required permissions for each REST API operation on each entity's page (nested under this one).
Step 3: Invoke the Panther REST API
In addition to testing with the API Playground in the Console, you can invoke the REST API using Swagger, Postman, or this documentation:
Using Swagger to access the REST API
In a web browser, navigate to the Swagger Editor.
In the code editor on the left-hand side, paste in the Panther REST OpenAPI specification file found above, in Discover the Panther REST API schema.
On the right-hand side, under Server variables, in api_host, enter your Panther REST API URL without the protocol (i.e., excluding
https://).
Click Authorize.

In the Available authorizations modal:
Under Value, enter your API token value.
Click Authorize.
Click Close.

You can now try invoking the API:
Choose an endpoint, and expand it by clicking the arrow pointing down.
Click Try it out.

Click Execute.
Using Postman to access the REST API
You will import the Panther Postman collection, create a new environment with URL and API variables, then try making a request.
Download the
Panther_REST_API_postman_collection.jsonfile at the bottom of this tab.In your Postman application, click File > Import.
Choose the
Panther_REST_API_postman_collection.jsonfile.Under Collections, there will now be a Panther Rest API collection.
Click Environments, then click the plus sign (+).

Enter a name for your environment—e.g., "Panther."
In the table on the right-hand side, enter the following two variables:
restHost: For the Current value, enter your full Panther REST API URL.You can find this value by following the instructions in Step 1: Identify your Panther REST API URL.
restApiToken: For the Current value, enter your Panther API token. In the Type column, select secret.\
In the upper-right corner, click Save.
You can now try making a request:
In the upper-right hand corner, click the environment dropdown, and select the one you created in the previous step.

Click Collections.
Expand the Panther Rest API collection, then select a request.
Click Send.
Using the Panther documentation to access the REST API
Navigate to one of the REST API entity pages (nested under this page), and locate the operation you'd like to perform.
In the bottom-right corner of the operation's Request tile, click ▶Test it.

In the modal that pops up, in the endpoint displayed at the top, click
{api_host}.
In the api_host field, enter the REST API URL you identified in Step 1, without the protocol (i.e., excluding
https://).
In the Authentication section, click the Auth Type dropdown.
Under Required authentication, check the box next to ApiKeyAuth.

Under Authentication, Name and Value fields will populate. In Value, enter the API token you generated in Step 2.
In the Variables section, if the operation has required path variables, such as
{id}, provide value(s) in theVALUEcolumn.
If there are values in the Query Parameters section, if you would like them to apply to this invocation, click their checkboxes in the right-hand column.

If a request body is required for your request, add content within Body.
Click Send Request.
Last updated
Was this helpful?

