Links

API Playground

Panther offers an API Playground to try out operations. To access the Playground:
  1. 1.
    Log in to your Panther Console.
  2. 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.
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.
The API Playground's default view shows an example query in a code editor on the left. On the right, there is a column labeled Documentation Explorer.

Documentation Explorer

The Documentation Explorer on the right side of the Playground displays the available queries and mutations, along with descriptions and types on every field and entity:
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 "Root Types." Under "Root Types," it lists "query: Query" and "mutation: Mutation".

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:
  • 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 UI:
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
Last modified 3d ago