GitLab API

GitlabTool

Actions905

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 or managing project permissions.

Use Case Examples

  1. Fetch details of a specific access token for a project to verify its permissions or expiration.
  2. Retrieve an access token's information to display in a project management dashboard.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
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, defaulting to GET.
Path Parameters Parameters for the API path including project ID and token ID.

Output

JSON

  • id - ID of the access token
  • name - Name of the access token
  • scopes - Scopes or permissions granted by the token
  • created_at - Creation timestamp of the token
  • expires_at - Expiration date of the 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 API key used has sufficient permissions to access project tokens.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error: 404 Not Found - The specified project or token ID does not exist or is inaccessible.
  • Common error: 401 Unauthorized - Authentication failed, check API key validity and permissions.

Links

Discussion