User Token

The user token endpoint allows to manage the user tokens of the Query Server.

POST

The user token endpoint allows to create a new user token.

POST /_/user-token

Headers

NameTypeDescriptionRequired
AuthorizationstringThe bearer token to connect to the server.true

Body

NameTypeDescriptionDefaultRequired
emailstringThe email of the user.-true
writebooleanIf the token has write permissions.truefalse
expiration_datenumberThe expiration date in milliseconds.= updated_atfalse

Example:

{
  "email": "example@example.com",
  "write": true,
  "expiration_date": 1632960000000
}

GET

The user token endpoint allows to get a list of all the user tokens.

GET /_/user-token

Headers

NameTypeDescriptionRequired
AuthorizationstringThe bearer token to connect to the server.true

PUT

The user token endpoint allows to update a user token.

PUT /_/user-token

Headers

NameTypeDescriptionRequired
AuthorizationstringThe bearer token to connect to the server.true

Body

NameTypeDescriptionDefaultRequired
emailstringThe email of the user.-true
writebooleanIf the token has write permissions.falsefalse
expiration_datenumberThe expiration date in milliseconds.= updated_atfalse

Example:

{
  "email": "example@example.com",
  "write": true,
  "expiration_date": 1632960000000
}

DELETE

The user token endpoint allows to delete a user token.

DELETE /_/user-token

Headers

NameTypeDescriptionRequired
AuthorizationstringThe bearer token to connect to the server.true

Body

NameTypeDescriptionRequired
emailstringThe email of the user.true

Example:

{
  "email": "example@example.com"
}

GET Value

The user token endpoint allows to get the value of a user token having an access token.

GET /_/user-token/value?email=<EMAIL>

Headers

NameTypeDescriptionRequired
AuthorizationstringThe bearer token to connect to the server.true

Query String

NameTypeDescriptionRequired
emailstringThe email of the user.true

Example:

GET /_/user-token/value?email=example@example.com

POST Value

The user token endpoint allows to create a new user token without having an access token.

POST /_/user-token/value

Body

NameTypeDescriptionRequired
emailstringThe email of the user.true
passwordstringThe password of the user.true

Example:

{
  "email": "example@example.com",
  "password": "example"
}