Basic API Usage

You can execute many of Panoptica's functions using a RESTful API.

To consume Panoptica APIs, you first need to obtain an API Key from the Panoptica console.

Generate API Key

Log into Panoptica and select Settings in the navigation pane, then the API Keys tab.

Click Create Key to open a popup overlay, where you can generate the key.

πŸ“˜

Permissions required

Users must have an Owner or Ops role to generate API Keys.
See User Management for details on User Roles

Enter a logical Key name, and click Generate Key.

Promote to Ops user

A newly generated API Key has a Viewer role. To enable your API Key to fully interact with Panoptica using REST API, you need to promote it to Ops.

  1. Browse to the Users & Scopes tab in the Settings pane
  2. Search for the API Key you just created
  3. Click the three dots (β€’β€’β€’) at the end of the row to open a drop-down list of actions you can perform.
  4. Select Edit to modify the role of your API Key from from Viewer to Ops,

See User Management for details on User Roles

Use API Key

Once you have created a key, you can use any of the endpoints available in the API Reference.
For convenience, you'll also find an "API Reference" button at the top of our documentation.

Simply copy your API Key and use it as the value for the Authorization header in every request you make to the API. For example, this is how you would get a list of aggregated statistics on assets, broken down by service:

curl --request GET \
     --url 'https://api.us1.console.panoptica.app/api/cspm/assets/aggregated/by_service?group_by=none&searchQueryLanguage=false' \
     --header 'Authorization: REST_API_KEY_FROM_PANOPTICA' \
     --header 'accept: application/json' 

Open API Spec

You can download the Panoptica API specification via this link.

The Base URL for the REST API is: https://api.us1.console.panoptica.app/api