GitLab API

GitlabTool

Actions1095

Deploy_tokens → getApiV4ProjectsIdDeployTokens

AI-generated

Summary

Retrieve a list of deploy tokens for a specific GitLab project by its ID or URL-encoded path, optionally filtering by pagination and active status.

Inputs

  • id (required) — The ID or URL-encoded path of the project owned by the authenticated user.
  • page — The page number of results to return (pagination). Defaults to 1 if not set.
  • per_page — The number of deploy tokens to return per page. Defaults to 20 if not set.
  • active — Filter deploy tokens by their active status (true or false).

Output shape

a JSON array of deploy token objects associated with the specified project, paginated as per parameters

Pagination can be controlled via 'page' and 'per_page' query parameters. The 'active' query parameter can limit results to active or inactive deploy tokens. The operation returns standard API error responses if the project is not found or authentication fails.

Examples

Example 1: Get first page of deploy tokens for project with ID '123'

Set 'id' path parameter to '123', default 'page'=1 and 'per_page'=20, omit 'active' filter.

Example 2: Get all active deploy tokens for project with path 'group/project-path'

Set 'id' path parameter to 'group%2Fproject-path', set 'active' query parameter to true, optionally specify page and per_page for pagination.

Links

Discussion