create_admin_key
Creates an admin key, which may do everything: projects, their keys, admin keys.
- Call it
- only to hand full access to an operator or to replace an admin key before revoking it; for one project’s work create a project key with
create_api_keyinstead. - Needs
- an admin key.
- Returns
- the key with
key, the key string, shown this once and never again. The same asPOST /api/v1/admin/keys.
Arguments
- object
-
namestringrequiredWhat the key is for: 1 to 128 characters.
example
ops -
expires_atstring · date-time | nullWhen the key stops working, RFC 3339, later than now; null or left out: never.
No other arguments are accepted.
Result
The result comes back as structuredContent, with the same JSON as a text block.
- object · all fields required
-
created_atstring · date-time -
expires_atstring · date-time | null -
idstring · uuid -
keystringThe key string to send as
Authorization: Bearer. It is not stored and no other call shows it: hand it to its user now. -
kindKeyKindThe kind of an API key.
adminEverything, projects and admin keys included.projectOne project, within its scopes. -
last_used_atstring · date-time | null -
namestring -
prefixstring -
project_idstring · uuid | null -
revoked_atstring · date-time | null -
scopesarray of KeyScope
Definitions
KeyKind
The kind of an API key.
string · enum
admin Everything, projects and admin keys included.
project One project, within its scopes.
KeyScope
A right of a project key. An admin key has all of them.
string · enum
- read
- write
- send
- keys
Errors
A failed call answers isError: true with a code from the same table as the HTTP API, and detail. How tools report errors
HTTP API
The same operation over HTTP: POST /api/v1/admin/keys