This API creates a personal access token associated with a specific user, based on the user ID.
Enterprise Edition only
POST /api/v3/user/{id}/token
Note
You must enable Personal Access Tokens to successfully call this API.
{
"label": "my-token-description"
"millisecondsToExpire": <time in milliseconds>
}
Where:
Returns the token as a string.
LAkitH6lOFyUKIxWQp8ACfiD0ApvfPvWa12dmx8fpe7WYtqdP+mfkxIGguIoS4Zqzgd/43EoDNGM5GBGzVz5Immv
403
: The token user must be an admin.404
: User entity not found.curl --request POST \
--url http://localhost:9047/api/v3/user/<uid>/token \
--header 'authorization: _dremioha5lrg03obu079o4fkaev5e4r8n' \
-d '{
"label": "my-token-description",
"millisecondsToExpire": "604800000"
}'