foliot docs

API reference / Workspaces / Close a workspace

Close a workspace

POST/workspaces/{workspaceId}/close

Authenticate with a signed-in Foliot Console session.

An owner of the workspace, signed in. Never an app key. At once: every app in the workspace stops (its API key stops authenticating, nothing more is pushed to its handler, and runs in motion are not picked up again), its unfinished bulk jobs are cancelled, its pending invitations are suspended, and every member, the owners included, loses access: on every route the workspace and its apps answer 404 as if they did not exist. Its owners still see it in GET /me, with closedAt and purgeAfter, and any owner can restore it until purgeAfter, when it is purged with everything it holds. Its slug stays held until then. The reason is required and recorded, with the caller as the actor. confirmName must be the workspace’s name. A workspace that is already closed answers 404 here, as on every route but restore and purge.

Path parameters

workspaceId
string (uuid)
REQUIRED

The workspace.

Request body

confirmName
string
REQUIRED

The workspace's name, typed out, so the wrong workspace is not closed by mistake. Surrounding spaces are ignored; case is not.

min length 1 · max length 100

reason
string
REQUIRED

Why. Required, and recorded on the workspace, in its history and on each app the closure deletes.

min length 8 · max length 1000

Responses

200 object OK
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.