Session cookie, for the studio
People sign in through the studio, and the server sets a session cookie. A browser app that calls the API sends that cookie with each request. The studio itself works this way.API key, for scripts, servers and the CLI
An API key is created in Settings → API keys with an expiry. It is shown once, when it is created. It is sent in thex-api-key header.
{ "items": [...], "nextCursor": ... }. The route GET /api/me requires a signed-in person and does not accept an API key.
A key belongs to one workspace and only works there.
Permissions of a key
Each key carries a map from an area to the actions it allows. A call outside that map is refused withFORBIDDEN.
permissions map. For example, devias plan and devias apply need { "module": ["manage"] }. A key should have only what it needs and should be deleted when no longer used.
Related
- Errors: what
FORBIDDENandUNAUTHORIZEDlook like. - Access and permissions: roles, keys, workflows and agents.