GitLab API

GitlabTool

Actions1000

Overview

This node interacts with the GitLab API to revoke tokens for a specified top-level group. It is useful in scenarios where you need to programmatically manage group access tokens, such as revoking compromised or outdated tokens to maintain security.

Use Case Examples

  1. Revoke a specific token for a GitLab group by providing the group ID.
  2. Automate token management for GitLab groups in CI/CD pipelines or administrative scripts.

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 key 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 but can be changed to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to be included in the request path, specifically the 'id' of the top-level group whose tokens are to be revoked.

Output

JSON

  • statusCode - HTTP status code returned by the API indicating the result of the revoke operation.
  • body - Response body from the API, typically containing details about the revoked tokens or confirmation of the action.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the provided group ID is correct and the authenticated user has sufficient permissions to revoke tokens for the group.
  • Check that the baseUrl is correctly set to the GitLab instance you are targeting.
  • If skipping authentication, verify that the endpoint supports unauthenticated requests, otherwise authentication errors will occur.
  • Common error messages include 401 Unauthorized (authentication failure), 403 Forbidden (insufficient permissions), and 404 Not Found (invalid group ID). Resolving these involves verifying credentials, permissions, and input parameters.

Links

Discussion