Create Workspace
HTTPBearerAuthorizationBearer <token>Bearer credential. API keys look like sqk_<geo>_<key_id>_<secret>: treat them as opaque and never put one in a browser. Older keys without the geo part stay valid until rotated. Find a geo's endpoints through GET /.well-known/sparq-discovery before sending a key.
Sparq-Workspace?stringFor a person signed in to a console with several workspaces: the workspace this call is for, one of their memberships (listMyMemberships). Without it such a person gets workspace_required (400); a workspace they are not a member of is forbidden. It never grants anything, and other callers' credentials ignore it.
uuidIdempotency-Key?stringMakes a retry safe: the same key, route and body within 24 hours returns the stored response and the same result id. The same key with a different body or route is idempotency_conflict; while the first request runs, idempotency_in_progress.
8 <= length <= 128application/json- body
slug*SlugLower-case name: a letter, then letters, digits, '_' or '-'. Max 63.
^[a-z][a-z0-9_-]{0,62}$name*Name1 <= length <= 500home_region?|Where the workspace's data lives by default (ADR-0010).
allowed_regions?array<>|Regions its clients may be placed in, inside the offered geos. Default: the home region only.
Successful Response
application/json- response
Top-level owner: an organisation using Sparq.
workspace_id*Workspace Iduuidslug*SlugLower-case name: a letter, then letters, digits, '_' or '-'. Max 63.
^[a-z][a-z0-9_-]{0,62}$name*Namestatus*StatusA suspended workspace's runtime calls are refused (not enforced yet).
"active""suspended"created_at*Created Atdate-timehome_region?|nullallowed_regions?array<>geo_id?|The geo that serves this workspace.
api_endpoint?|The geo's runtime API endpoint (geo discovery, D-37).
admin_endpoint?|The geo's Admin API endpoint.
curl -X POST 'http://dev-sparq.centralindia.cloudapp.azure.com:8000/v1/admin/workspaces' \ -H 'Content-Type: application/json' \ -d '{ "slug": "string", "name": "string"}'{ "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9", "slug": "string", "name": "string", "status": "active", "created_at": "2019-08-24T14:15:22Z", "home_region": "westeurope", "allowed_regions": [ "westeurope" ], "geo_id": "eu", "api_endpoint": "http://example.com", "admin_endpoint": "http://example.com"}