GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves access tokens for a specific group in GitLab using the GitLab API v4. It is useful for scenarios where you need to manage or audit group access tokens, such as checking which tokens are active or inactive for a group. For example, an administrator can use this node to list all access tokens associated with a group to ensure security compliance or to revoke tokens if necessary.

Use Case Examples

  1. Retrieve all active access tokens for a GitLab group by specifying the group's ID and filtering by the 'active' state.
  2. Fetch all access tokens regardless of state for a group to audit permissions.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for testing or public endpoints.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to 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 filtering tokens by their state (active or inactive).
Path Parameters Path parameters required for the request, specifically the group ID or URL-encoded path of the group.

Output

JSON

  • id - Unique identifier of the access token.
  • name - Name of the access token.
  • scopes - Permissions granted by the access token.
  • created_at - Timestamp when the access token was created.
  • expires_at - Expiration date of the access token, if any.
  • revoked - Boolean indicating if the token has been revoked.
  • active - Boolean indicating if the token is currently active.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID provided in the path parameters is correct and URL-encoded if necessary.
  • Verify that the API key used for authentication has sufficient permissions to access group access tokens.
  • If filtering by state, ensure the value is either 'active' or 'inactive' as per the API specification.
  • Common error messages include 401 Unauthorized (check API key), 404 Not Found (invalid group ID), and 400 Bad Request (invalid query parameters).

Links

Discussion