DocumentationAPI reference

Rust · 0.1.0

List Personal Access Tokens

GET /api/v1/users/{user}/personalAccessTokens

UserService · UserService_ListPersonalAccessTokens

Protocol-derived reference. Authorization and instance policy still apply. Schema descriptions are inherited from the MIT-licensed application contract; examples here are not executed against a live server.

Access

Requires the named account's owner or an instance administrator. Field-specific and lifecycle restrictions still apply; owner access does not allow changing administrator-only fields.

Small collection without pagination

The current implementation returns the whole permitted collection and leaves nextPageToken empty. The protocol's pageSize/pageToken inputs do not split this collection. PAT listing exposes metadata only, never previously created token values.

Request

ListPersonalAccessTokens returns a list of Personal Access Tokens (PATs) for a user. PATs are long-lived tokens for API/script access, distinct from short-lived JWT access tokens.

GET/api/v1/users/{user}/personalAccessTokens

Parameters

Name / locationType / requirementDescription
user
path
string
Required
The user id.
pageSize
query
integer (int32)
Not marked required in OpenAPI
Optional. The maximum number of tokens to return.
pageToken
query
string
Not marked required in OpenAPI
Optional. A page token for pagination.

Request body

No request body is declared.

Responses

200 · OK

application/json · ListPersonalAccessTokensResponse

default · Default error response

application/json · Status

Complete operation definition

All declared constraints, media types and response details are retained below. Schema references link to their complete definitions.

Open JSON definition
{
  "tags": [
    "UserService"
  ],
  "description": "ListPersonalAccessTokens returns a list of Personal Access Tokens (PATs) for a user.\n PATs are long-lived tokens for API/script access, distinct from short-lived JWT access tokens.",
  "operationId": "UserService_ListPersonalAccessTokens",
  "parameters": [
    {
      "name": "user",
      "in": "path",
      "description": "The user id.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "pageSize",
      "in": "query",
      "description": "Optional. The maximum number of tokens to return.",
      "schema": {
        "type": "integer",
        "format": "int32"
      }
    },
    {
      "name": "pageToken",
      "in": "query",
      "description": "Optional. A page token for pagination.",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ListPersonalAccessTokensResponse"
          }
        }
      }
    },
    "default": {
      "description": "Default error response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Status"
          }
        }
      }
    }
  }
}