Create the first tenant and its API key with the setup token
The first run without a terminal: the body carries OHS_SETUP_TOKEN (compared in
constant time) instead of a bearer credential. It works once: while the instance
has no tenant, it creates one with its first API key and returns the key, shown only
this once. Any tenant existing, however it was created, closes it for good (409).
The body is at most 4 KiB. The creation is recorded in the new tenant's audit log
(tenant.create, actor system / setup). With no OHS_SETUP_TOKEN the route is
not mounted (404). See docs/setup.md.
application/json- body
setup_token*stringThe instance's OHS_SETUP_TOKEN.
tenant_name?stringName of the tenant; surrounding spaces are trimmed. Empty or absent means default. No control character.
length <= 100The tenant and its first API key. Sent with Cache-Control: no-store.
application/json- response
tenant_id*stringuuidapi_key*stringThe tenant API key (ohs_sk_...), shown only this once.
curl -X POST 'http://localhost:8080/v1/setup' \ -H 'Content-Type: application/json' \ -d '{ "setup_token": "string"}'{ "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "api_key": "string"}