GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves a specific project access token from GitLab using the GitLab API. It is useful for scenarios where you need to fetch details about a particular access token associated with a project, such as for auditing, managing permissions, or integrating with other systems that require token information. For example, a DevOps engineer might use this node to verify the validity and scope of a project access token before automating deployment processes.

Use Case Examples

  1. Fetch details of a project access token by providing the project ID and token ID to ensure the token has the correct permissions.
  2. Audit project access tokens to identify and revoke tokens that are no longer needed or pose a security risk.

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.
Path Parameters Parameters required in the URL path to identify the project and the specific access token to retrieve.

Output

JSON

  • id - The unique identifier of the access token.
  • name - The name of the access token.
  • scopes - The scopes or permissions granted to the access token.
  • created_at - Timestamp when the access token was created.
  • expires_at - Expiration date of the access token, if any.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and token ID are correctly provided and URL-encoded if necessary.
  • Verify that the GitLab API key credential has sufficient permissions to access project tokens.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the project or token does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion