foliot docs

API reference / Apps / Register an app in a workspace

Register an app in a workspace

POST/workspaces/{workspaceId}/apps

Authenticate with an operator token or a signed-in Foliot Console session.

Creates an app that belongs to the workspace, in the same statement, so it never exists half-made. The app’s id is generated and name is its display name, unique within this workspace (409 if it is already used here, never because of another workspace). A member with the operator or owner role may do this; a viewer may not. An operator token may too. An app key may not. A workspace the caller is not in answers 404, exactly as one that does not exist. The API key in the response is shown once; the signing secret is only ever read through the audited reveal. For anyone but an operator token the handlerBaseUrl must be an https URL that is not a private, loopback or link-local address (400 otherwise); a server run for development with FOLIOT_HANDLER_EGRESS=open checks only that it is an absolute http(s) URL without credentials.

Path parameters

workspaceId
string (uuid)
REQUIRED

The workspace the app will belong to.

Request body

description
string
OPTIONAL

max length 500

handlerBaseUrl
string (uri)
REQUIRED

Where tasks are pushed.

name
string
REQUIRED

The app's name. With POST /apps it also becomes the app's id; in a workspace the id is generated and the name only has to be unique in that workspace. Lower-case kebab.

min length 1 · max length 100 · pattern ^[a-z0-9][a-z0-9-]*$

Responses

201 object Created
400 Error Invalid request.
401 Error Missing, malformed or unknown bearer token.
403 Error The token is valid but not permitted on this route.
404 Error No such resource.
409 Error Conflicts with existing state.
503 Error A dependency this route needs is unreachable.