Api referenceEndpointsTenant
Create an API key for the tenant
POST
A new key of the calling key's tenant, as ohs admin key create makes. The whole key is in
this answer only. To rotate: deploy the new key, then revoke the old one. Recorded in the
audit log as key.create.
tenantKeyheader
AuthorizationBearer <token>Tenant API key, ohs_sk_ + 43 base62 characters.
Empty, 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/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"}