GET /api/users/:user_id/personal_access_tokens
List all Personal Access Tokens for a user

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

user_id
required

ID of the user

Validations:

  • String

search
optional

filter results

Validations:

  • String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, 'all' to return all results

Validations:

  • Must match regular expression /\A([1-9]\d*|all)\Z$/.

Search fields

Field name Type Possible values
name string
user_id integer

GET /api/users/:user_id/personal_access_tokens/:id
Show a Personal Access Token for a user

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

user_id
required

ID of the user

Validations:

  • String


POST /api/users/:user_id/personal_access_tokens
Create a Personal Access Token for a user

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

user_id
required

ID of the user

Validations:

  • String

personal_access_token
required

Validations:

  • Hash

personal_access_token[name]
required

Validations:

  • String

personal_access_token[expires_at]
optional , nil allowed

Expiry Date

Validations:

  • DateTime


DELETE /api/users/:user_id/personal_access_tokens/:id
Revoke a Personal Access Token for a user

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • String

user_id
required

ID of the user

Validations:

  • String