List the caller's organizations
GEThttps://api.spice.ai/v1/orgs
Returns every organization the authenticated caller belongs to, each with the caller's effective membership role. A caller with no memberships gets an empty array, not a 404 — clients read 404 as "this deployment does not serve the endpoint", which is a different state. name is the organization handle used in <org>/<app> addressing.
Authorizations
AuthorizationstringRequiredBearer <token>. Authentication lists the tokens it accepts.
Header parameters
X-Org-NamestringOptional for every credential, a portal session token included: this listing is how a session finds the organizations it can name elsewhere. When sent, it is authorized as on any other route, so a handle the caller does not belong to is
org_forbidden.- Pattern:
^[A-Za-z0-9._-]{1,255}$
- Pattern:
Responses
200The organizations the caller is a member of, possibly emptyapplication/json
orgsarray of objectRequired3 properties
idintegerRequirednamestringRequiredrolestringRequiredThe caller's highest-privilege role in the organization.
- Allowed values:
owner,admin,member,viewer
- Allowed values:
400X-Org-Name is not a valid organization handle (invalid_org_assertion)
401Unauthorized
403Forbidden
Insufficient scope (insufficient_scope), or X-Org-Name names an organization the caller cannot act for (org_forbidden, org_assertion_mismatch, org_deleted)
500Internal server error
OpenAPIapi.spice.ai/openapi.json
curl "https://api.spice.ai/v1/orgs" \
-H "Authorization: Bearer <token>"GET /v1/orgs HTTP/1.1
Host: api.spice.ai
Authorization: Bearer <token>{
"orgs": [
{
"id": 0,
"name": "string",
"role": "owner"
}
]
}application/json
No response body
No response body
No response body
No response body