GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves access tokens for a specific project in GitLab using the GitLab API. It is useful for scenarios where you need to manage or audit project access tokens, such as checking which tokens are active or inactive for a given project. For example, a DevOps engineer might use this node to automate the monitoring of project access tokens to ensure security compliance.

Use Case Examples

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

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for testing or public endpoints.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The 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 project ID or URL-encoded path of the project.

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.
  • active - Indicates whether the access token is currently active.

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and URL-encoded if necessary.
  • Verify that the GitLab API authentication token has sufficient permissions to access project access tokens.
  • If filtering by state, ensure the value is either 'active' or 'inactive' as per the API specification.
  • Check the base URL to confirm it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion