Api referenceEndpointsAdmin
Create an API key for a tenant (instance admin)
POST
As ohs admin key create --tenant makes. The whole key is in this answer only;
Idempotency-Key is not honoured. Recorded as key.create in the caller's audit log and in
the tenant's.
tenantKeyheader
AuthorizationBearer <token>Tenant API key, ohs_sk_ + 43 base62 characters.
tenant_id*stringThe id of a tenant; any other value is a 404.
Format
uuidEmpty, or an empty object.
application/json- body
The key, with its secret. Sent with Cache-Control: no-store.
application/json- response
id*stringFormat
uuidprefix*stringThe start of the key, kept in clear to tell keys apart.
created_at*stringFormat
date-timelast_used_at*|Format
date-timerevoked_at*|Format
date-timecurrent*booleanTrue for the key making the call.
key*stringThe whole key, returned this once.
curl -X POST 'http://localhost:8080/v1/admin/tenants/497f6eca-6276-4993-bfeb-53cbbbba6f08/keys' \ -H 'Authorization: Bearer ohs_sk_...' \ -H 'Content-Type: application/json' \ -d '{}'{ "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"}