tokens

Create a new token

This can only be done by a logged in user who has the required privileges.

post/api/v1/tokens

Request body

inquirerstring required

Id of user or a service running on behalf of the user. Who wants the token to be created.

initiatorstring

user or a a service who initiated this token request. Who is requesting the token creation (must have the permission to create a token). Defaults to requester id.

accountIdstring required

Affected account the token is created for

tokenstring
type'EPHEMERAL_SERVICE_ACCOUNT' | 'PERSISTENT' | 'SELF'
permissionsPermissions[]
expiresInstring

Sets the lifespan of the token. Possible values are -1 for permanent token and a string expression describing a time span, e.g. 2m, 5h

Response

Id of created user

tokenstring

Changes

Changed in 3 of the 19 revisions of this API.212

    • the request property accountId became required

      request-property-became-required

    • the request property inquirer became required

      request-property-became-required

    • removed the request property tokenLifeSpan

      request-property-removed

    • added the new optional request property expiresIn

      new-optional-request-property

    • endpoint added

      endpoint-added

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog