Personal Access Tokens
Personal Access Tokens (PATs) are a way to authenticate with Performaar Server.
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 with the API
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 ...
Using Personal Access Tokens with the UI
Personal Access Tokens can also be used as an alternative to manually logging in to the Performaar user interface. This can be useful in scenarios where the UI (or part of it) is embedded inside another application or webpage.
To use a Personal Access Token with the UI, append it to the end of URL as a query parameter with the key pat. For
example, to access the Sessions page the URL would look like:
http://<server url>/sessions?pat=<personal access token>
This also works to access specific Sessions, Recordings and Dashboards. For example, to see the dashboard for a
Recording with id <recording id>:
http://<server url>/recordings/<recording id>/dashboard?pat=<personal access token>