> For the complete documentation index, see [llms.txt](https://docs.panther.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.panther.com/~/changes/Dd8nx2iqd1Pp2OzWJaWk/panther-developer-workflows/api/api-playground.md).

# API Playground

Panther offers an API Playground to try out operations. Users must have the `View API Tokens` permission to access the Playground - see [Panther's Role-Based Access Control](/~/changes/Dd8nx2iqd1Pp2OzWJaWk/system-configuration/rbac.md) documentation for instructions on modifying user roles.

To access the Playground:

1. Log in to your Panther Console.
2. In the upper right corner, click the gear icon. In the dropdown menu, click **API Playground**.

After you enter a valid API Token, click the "play" icon in the upper left corner to force your GraphQL query to run.

{% hint style="warning" %}
Note:

* If you just issued an API Token, please wait between 30-60 seconds for the new token to become available to related distributed AWS services.
* For security purposes, the API Token will **not** persist in the Playground when you refresh the page or navigate to a different page. You will need to re-enter the API Token each time you use the Playground.
  {% endhint %}

<figure><img src="https://4011785613-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2F4dQcIe1p3a7dFSZOALDv%2Fapi-playground.png?alt=media&amp;token=9b8577bb-aa25-4536-b5bc-b15742e3fff9" alt="The API Playground&#x27;s default view shows an example query in a code editor on the left. On the right, there is a column labeled Documentation Explorer."><figcaption></figcaption></figure>

### Documentation Explorer

The Documentation Explorer in the Panther Console is one way to examine the Panther API schema. To learn about other ways, including a downloadable schema file, see [Discover the schema](/~/changes/Dd8nx2iqd1Pp2OzWJaWk/panther-developer-workflows/api.md#step-4-discover-the-schema).

See the **Documentation Explorer** on the right side of the Playground. It displays the available queries and mutations, along with descriptions and types on every field and entity:

<figure><img src="https://4011785613-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2FXBOcpuimM2K8O7OTvvZR%2Fdocumentation-explorer.png?alt=media&amp;token=ef10c710-a8c8-4dd8-b5f2-4165f8c6430d" alt="The image shows the Documentation Explorer that appears on the right side of the API Playground. It has a search field at the top, and a header labeled &#x22;Root Types.&#x22; Under &#x22;Root Types,&#x22; it lists &#x22;query: Query&#x22; and &#x22;mutation: Mutation&#x22;."><figcaption></figcaption></figure>

### Writing Your Own Query

The autocomplete functionality and the Documentation Explorer assist with writing your own query. Additionally, there are three utility buttons near the top of the page:&#x20;

* **Prettify** to help you format your query according to the GraphQL standards
* **Copy** to copy your query in order to paste it to the client that's going to issue the request
* **Copy curl** to copy a complete curl operation that you can paste into any UNIX system with the curl command-line tool installed.

An example of the curl command that would be copied from the Panther web application:

```
curl 'PANTHER_GRAPHQL_API_URL' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Connection: keep-alive' \
-H 'DNT: 1' \
-H 'Origin: http://{PANTHER_GRAPHQL_API_URL}/public/graphql' \
-H 'X-API-Key: {FAKE_API_KEY_WITH_USER_READ_PERMISSIONS}' \
--data-binary '{"query":"\n # Example query which lists users in your organization\n query Users {\n users {\n\t\t\tgivenName\n familyName\n email\n }\n }","variables":{}}' \
--compressed
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.panther.com/~/changes/Dd8nx2iqd1Pp2OzWJaWk/panther-developer-workflows/api/api-playground.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
