Api referenceEndpointsAdmin
Create a tenant and its first API key (instance admin)
POST
A new tenant, never an instance admin (making one stays ohs admin tenant, run on the
server), with its first key, as ohs admin tenant create makes. The whole key is in this
answer only. Idempotency-Key is not honoured: a replay would mean storing the key.
Recorded as tenant.create in the caller's audit log and in the new tenant's.
tenantKeyheader
AuthorizationBearer <token>Tenant API key, ohs_sk_ + 43 base62 characters.
application/json- body
name*stringSurrounding spaces are trimmed; what is left must be 1 to 100 characters, none of them a control character.
Length
length <= 100The tenant, with its first key and the key's secret. Sent with Cache-Control: no-store.
application/json- response
id*stringFormat
uuidname*stringadmin*booleanTrue for an instance admin tenant, whose keys reach the /v1/admin routes.
created_at*stringFormat
date-timeactive_keys*integerThe tenant's keys that are not revoked.
key*The tenant's first key, with its secret, returned this once.
curl -X POST 'http://localhost:8080/v1/admin/tenants' \ -H 'Authorization: Bearer ohs_sk_...' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "admin": true, "created_at": "2019-08-24T14:15:22Z", "active_keys": 0, "key": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "prefix": "string", "created_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z", "current": true, "key": "string" }}