Skip to main content

Token

Token is the built-in node label of tokens, which authenticate requests. capabilities limits a token to a part of the capabilities of its user, see roles and capabilities. The API sets name, expirationDate and state (ACTIVE, REVOKED or EXPIRED) itself; the hash of the secret is internal and never returned. Nothing is required, because tokens of older versions don’t have all properties. Properties which start with _ are internal to the API and not part of any schema.

The definition below is generated from the code of the API. Schemas of built-in types can extend it, but never overrule it, see built-in schemas.

{
"name": "Token",
"kind": "node",
"mode": "partial",
"properties": {
"name": {
"type": "string",
"required": false
},
"hash": {
"type": "string",
"required": false,
"visibility": "internal"
},
"expirationDate": {
"type": "datetime",
"required": false
},
"state": {
"type": "string",
"required": false,
"enum": [
"ACTIVE",
"REVOKED",
"EXPIRED"
]
},
"capabilities": {
"type": "list",
"required": false,
"items": {
"type": "string",
"nullable": false
}
}
},
"files": null,
"rules": [],
"placement": null
}