Skip to main content

Create an access token for a user

POST 

/v1/users/:username/tokens

Create an access token for a user

Request

Path Parameters

    username anyrequired

    target user's name

Body

required

    ttlnumber

    token expiration in seconds

    Possible values: >= 300 and <= 31536000

    namestringrequired

    Possible values: non-empty and <= 255 characters

    token_typestring

    Possible values: [read_write, read_scaling]

    Default value: read_write

Responses

Successful response

Schema

    tokenstringrequired

    access token

    iduuidrequired
    namestring
    expire_atstring

    Time token expires at

    created_tsstringrequired

    Time token was originally created

    read_onlybooleanrequired
    token_typestringrequired

    Possible values: [read_write, read_scaling]