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
- In the Performaar UI, navigate to the My Profile page using your user icon at the top-left.
- Click the + New Personal Access Token button.
- Give your new Personal Access Token a name and, optionally, an expiry date.
- Click the Create button.
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 ...