foliot docs

API reference / Workspaces / List every workspace

List every workspace

GET/workspaces

Authenticate with an operator token.

Operator token only: this is every workspace on the server, with how many members, owners and apps it holds, in id order, limit at a time. With needsOwner=true it lists only the workspaces that need an owner and have none (holding apps or members, and with no owner): exactly the ones the foliot_workspaces_without_owner metric counts. Give such a workspace an owner by making one of its members an owner (PUT /workspaces/{workspaceId}/members/{userId}/role), or, when nobody is left to promote, by inviting one with the operator token (POST /workspaces/{workspaceId}/invitations, role owner; this needs FOLIOT_CLERK_SECRET_KEY, which a production server cannot start without). A person sees their own workspaces with GET /me.

Query parameters

needsOwner
boolean
OPTIONAL

Only workspaces that need an owner and have none.

limit
integer (int64)
OPTIONAL

Page size.

min 1 · max 500 · default 100

cursor
string (uuid)
OPTIONAL

Opaque; the previous page's nextCursor.

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.
503 Error A dependency this route needs is unreachable.