ApiTokenDto

ApiTokenDto
ApiTokenDto

Metadata of one API token. It carries no token, digest or key material

JSON Example
{
    "tokenId": "string",
    "ownerUserId": 0,
    "name": "string",
    "access": "string",
    "status": "string",
    "createdAt": "string",
    "createdBy": "string",
    "expiresAt": "string",
    "lastUsedAt": "string",
    "revokedAt": "string"
}
string
tokenId
Required  

Public token id, 12 lowercase base32 characters. It identifies the token in the console and in audit records and is not a secret

integer As int64 As int64
ownerUserId
Required  

Id of the local console user that owns the token

string
name
Required  
Constraints: minLength: 1 maxLength: 64

Name the administrator gave the token, unique among the owner's non-revoked tokens

access
Required  

What an API token may do, on top of its owner's role and the approved bearer routes

  • READ_ONLY: Read-only. Allows GET and HEAD on the approved read routes only
  • FULL: Full. Also allows the approved write routes, still limited by the owner's role
Enumeration: READ_ONLY, FULL
status
Required  

Where an API token is in its life, derived from its revocation and expiry times

  • ACTIVE: Active. The token is accepted until it expires or is revoked
  • EXPIRED: Expired. The expiry time has passed and the token is refused
  • REVOKED: Revoked. An administrator revoked the token and it is refused
Enumeration: ACTIVE, EXPIRED, REVOKED
string As date-time As date-time
createdAt
Required  

Time at which an administrator issued the token

string
createdBy
Required  

Username of the administrator who created the token; absent when that account was deleted

string As date-time As date-time
expiresAt
Required  

When the token stops being accepted

string As date-time As date-time
lastUsedAt
Required  

When the token was last used, to within one minute; absent when it was never used

string As date-time As date-time
revokedAt
Required  

When the token was revoked; absent while it is not revoked