Links

Panther API

Interact with Panther entities using the REST and GraphQL APIs

Overview

Panther offers a REST API and a GraphQL-over-HTTP API. You can use the API Playground in the Panther Console to explore the GraphQL API. Before making API calls, you will need to generate an API token.

Supported operations

The Panther APIs support an ever-growing set of operations that allow you to build your security workflows:

How to create a Panther API token

After you have successfully created an API token, remember to periodically rotate it. See instructions for token rotation in Rotating API tokens, below.
  1. 1.
    In the upper right corner of your Panther Console, click the gear icon. In the dropdown menu, click API Tokens.
  2. 2.
    Click Create an API Token.
    The image shows the API Tokens page in the Panther Console. The screen says "You haven't created any tokens yet" and there is a red circle around the "Create an API Token" button at the bottom.
    • If a token already exists, click Create New Token.
  3. 3.
    Provide a Name, and choose the permissions you'd like to grant the token.
  4. 4.
    In the IP Restrictions section, in the CIDR Blocks field, enter one or more IP addresses to which you'd like to restrict usage of the token, if any.
    • Enter the IP address(es) in CIDR notation, e.g., 10.0.0.0/8 or 8.8.8.8/32.
    • If no IP addresses are specified, the token will be usable by any IP address.
  5. 5.
    Click Create API Token.
    • You will see a success screen that displays the value of the API token. Copy the API token and store it in a secure location, as it will not be displayed again.
The image shows the success screen after you create an API Key. At the top, it says "API Key Created". There is a drawing of two people holding up a green checkmark. The API Key in this screen shot is blurred out. Beneath the key there is a blue button labeled "Done."

How to test your Panther API token

There may be a propagation delay of 30 to 60 seconds after adding an API token.
After generating an API token, you can test to verify that it works as expected:
  1. 1.
    On the API token creation success screen, click the link that says Give it a go on our Playground.
  2. 2.
    Locate the REQUEST HEADERS tab at the bottom-left corner of the Playground screen. Under this tab, change the default value of the X-API-Key header from <ENTER_YOUR_KEY_HERE> to the value of your API token.
  3. 3.
    In the upper left corner, press the "play" icon to run the test.
The image shows the API Playground from the Panther Console. At the top, a play icon button is circled. On the left, a code box contains an example query. Beneath that, the header "Request Header" is circled. On the right, there is a section labeled "Documentation Explorer".

Rotating API tokens

API tokens are used to authenticate against and authorize access to Panther’s public API. As with username and password credentials, you should store API tokens securely to protect them from bad actors. Rotating your token periodically may lessen the likelihood of it being compromised. The Center for Internet Security (CIS) and National Institute of Standards and Technology (NIST) recommend rotating API tokens every 90 days.
You can rotate your API token either in your Panther Console, or by calling Panther's API itself. Once you've rotated your token, the previous one is no longer valid.
Panther Console
Panther API
Rotate an API token in the Panther Console
To rotate your API token in the Panther Console:
  1. 1.
    In the upper right corner of your Panther Console, click the gear icon, then API Tokens.
  2. 2.
    Locate the token you'd like to rotate. In the upper right corner of its tile, click the three dots icon, then Rotate.
    The API Tokens page in the Console shows a token called "Example Key." It has info about who created and modified the token, as well as when it expires. The three dot menu is open, and three options are displayed: Edit, Rotate, and Delete.
  3. 3.
    On the confirmation modal that pops up, click Continue.
    A modal titled "Rotate Example Key" asks the user if they're sure they want to refresh the key. There are Cancel and Continue buttons.
  4. 4.
    The modal will display your new API token. You will only see this once, so be sure to copy and store it in a secure location.
    The key rotation modal displays the new API token. There is a note saying "Please copy it since we won't show it to you again."
Rotate an API token using the Panther API
You can rotate your API key by calling Panther's API, using the rotateAPIToken operation.
Learn more about how to use this endpoint on Token Rotation.

Troubleshooting the Panther APIs

Visit the Panther Knowledge Base to view articles about the Panther APIs that answer frequently asked questions and help you resolve common errors and issues.