Appearance
API tokens
Fjordrun's API (https://api.fjordrun.com/api/v1) accepts a bearer token:
bash
curl -H "Authorization: Bearer $FJORDRUN_TOKEN" https://api.fjordrun.com/api/v1/teamsSee the API overview for a walkthrough and the full endpoint reference.
There are two kinds of tokens.
Team API tokens (for CI)
Team tokens belong to one team and are meant for automation: CI pipelines, deploy scripts, monitoring.
- Create them in Team settings → API tokens (admin role). Give each a name, such as
github-actions. - Scope: the whole team (All projects), or a single project. A project token can only access that project.
- The token is shown once, when it is created. Store it as a secret in your CI system.
- Tokens start with
fjr_. The list shows each token's prefix, scope and when it was last used. - A token acts with the role of the person who created it, within its team (and project).
- Tokens cannot create other tokens.
- Revoke a token by deleting it. Requests with it fail immediately.
Use the most restricted scope that works: a project token for a pipeline that deploys one project.
Personal access tokens
Personal access tokens (prefix fjr_pat_) act as you, with your roles in all your teams. The CLI creates one when you run fjordrun login.
List and revoke them in Account settings. Revoke a token if a machine is lost or no longer used.
Prefer team tokens for CI, so that pipelines keep working when people leave the team and never get access to other teams.
Using a token with the CLI
bash
FJORDRUN_TOKEN=fjr_... fjordrun deploy --team acme --project shop --service web --waitKeeping tokens safe
- Never commit tokens to a repository or put them in client-side code.
- Store them in your CI's secret store (for example GitHub Actions secrets).
- Rotate tokens: create a new one, update the secret, delete the old one.