GitLab API

GitlabTool

Actions1095

Users → getApiV4UsersUserIdImpersonationTokens

AI-generated

Summary

Retrieve a list of impersonation tokens for a specified GitLab user, optionally filtering by token state and paginating the results.

Inputs

  • user_id (required) — The ID of the user whose impersonation tokens are to be fetched.
  • page — Current page number to fetch from the paginated results.
  • per_page — Number of impersonation tokens to return per page.
  • state — Filter tokens by state: all, active, or inactive.

Output shape

a paginated list of impersonation token objects corresponding to the specified user

Supports pagination via 'page' and 'per_page' query parameters. The 'state' query parameter filters tokens based on their activation status. User authentication credentials configured under 'gitlabApi' are required unless skipping authentication.

Examples

Example 1: Fetch the first page of all impersonation tokens for user with ID 123, showing up to 20 tokens per page.

Set user_id=123, page=1, per_page=20, state=all.

Links

Discussion