GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves access tokens for a specific project in GitLab using the GitLab API. It is useful for managing and auditing project access tokens, filtering them by their state (active or inactive). For example, a user can fetch all active access tokens for a project to review current access permissions.

Use Case Examples

  1. Fetch all active access tokens for a project with a given project ID.
  2. Retrieve inactive access tokens to audit or revoke them.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for testing or public endpoints.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters to filter the request, such as the state of the tokens (active or inactive).
Path Parameters Path parameters required for the request, specifically the project ID or URL-encoded path.

Output

JSON

  • id - The unique identifier of the access token.
  • name - The name of the access token.
  • scopes - The scopes or permissions granted by the access token.
  • created_at - The creation timestamp of the access token.
  • expires_at - The expiration date of the access token, if any.
  • revoked - Indicates if the access token has been revoked.
  • active - Indicates if the access token is currently active.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID or URL-encoded path is correctly provided in the path parameters to avoid 404 errors.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to access project tokens.
  • If filtering by state, ensure the state value is either 'active' or 'inactive' to avoid invalid query parameter errors.

Links

Discussion