Skip to main content

Usage

GraphQL

Performaar's APIs use the GraphQL specification. To learn more about GraphQL and how to use it visit https://graphql.org/. Peformaar's GraphQL API is available at http://<server url>/api/graphql and works over HTTP POST requests.

Documentation & Playground

Performaar comes built-in with documentation and interactive playground for the API in the form of GraphiQL, available at /api/graphql.

Personal Access Tokens

Personal Access Tokens (PATs) are a way to authenticate with Performaar Server especially suited to using the API programmatically.

Create a Personal Access Token

  1. In the Performaar UI, navigate to the My Profile page using your user icon at the top-left.
  2. Click the + New Personal Access Token button.
  3. Give your new Personal Access Token a name and, optionally, an expiry date.
  4. Click the Create button.
warning

Once created, your new token will be shown in the dialog. Make sure you save it - you won't be able to view it again.

Using Personal Access Tokens

When calling API endpoints, a Personal Access Token can be added to HTTP request as a Basic Authentication header. For example, if using cURL you can add the token as follows:

curl --request POST \
--url http://<server url>/api/graphql \
--header 'Authorization: Basic <personal access token>' \
--header 'Content-Type: application/json' \
--data ...