POST /user/{id}/token

Creates a personal access token associated with a specific user, based on the user ID.

[info] Enterprise Edition only

Syntax

POST /api/v3/user/{id}/token

Request Input

{
  label: "my_token_description"
  lifeTime: <time in milliseconds>
}

Where:

  • label - A description for your token.
  • lifeTime - Time (milliseconds) for the token to stay in effect. Through the UI, lifetime is in terms of days.

Response Output

Returns the token as a string.

LAkitH6lOFyUKIxWQp8ACfiD0ApvfPvWa12dmx8fpe7WYtqdP+mfkxIGguIoS4Zqzgd/43EoDNGM5GBGzVz5Immv

Response codes

404 - User entity not found.

Example: Curl

curl --request POST \
  --url http://localhost:9047/api/v3/user/<uid>/token \
  --header 'authorization: _dremioha5lrg03obu079o4fkaev5e4r8n' \
  -d '{
    "label": "Token description",
    "lifeTime": "86400000"
    }'

results matching ""

    No results matching ""