API

PersonalAccessToken

The calling user's personal access tokens: list, create or revoke one.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/personal_access_tokens create Success
GET /api/v1/personal_access_tokens load Success
DELETE /api/v1/personal_access_tokens/{id} remove Success

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

personal_access_token, err := client.PersonalAccessToken(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(personal_access_token)
created, err := client.PersonalAccessToken(nil).Create(map[string]any{}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
removed, err := client.PersonalAccessToken(nil).Remove(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local personal_access_token, err = client:PersonalAccessToken():load({ id = "example_id" })
local created, err = client:PersonalAccessToken():create({  })
local removed, err = client:PersonalAccessToken():remove({ id = "example_id" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$personal_access_token = $client->PersonalAccessToken()->load(["id" => "example_id"]);
$created = $client->PersonalAccessToken()->create([]);
$client->PersonalAccessToken()->remove(["id" => "example_id"]);

Python

Construct client as shown in the Python setup, then call the operations:

personal_access_token = client.PersonalAccessToken().load({"id": "example_id"})
created = client.PersonalAccessToken().create({  })
client.PersonalAccessToken().remove({"id": "example_id"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

personal_access_token = client.PersonalAccessToken.load({ "id" => "example_id" })
created = client.PersonalAccessToken.create({  })
client.PersonalAccessToken.remove({ "id" => "example_id" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const personal_access_token = await client.PersonalAccessToken().load({ id: "example_id" })
const created = await client.PersonalAccessToken().create({  })
await client.PersonalAccessToken().remove({ id: "example_id" })

Fields

Field Type Required Description
id string No Id

create

POST /api/v1/personal_access_tokens

Operation ID: post_api_v1_personal_access_tokens.

Authentication: bearer token (bearerAuth).

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/personal_access_tokens

Operation ID: api_v1_personal_access_tokens.

Authentication: bearer token (bearerAuth).

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

remove

DELETE /api/v1/personal_access_tokens/{id}

Operation ID: api_v1_personal_access_token.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway