GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to rotate their personal access tokens on GitLab via the API endpoint `/api/v4/personal_access_tokens/self/rotate`. It is useful for automating the renewal of personal access tokens to maintain security without manual intervention. For example, a user can schedule this node to run periodically to ensure their token is always up to date.

Use Case Examples

  1. Automate personal access token rotation for GitLab to enhance security.
  2. Integrate token rotation into CI/CD pipelines to avoid token expiration issues.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip the authentication step, useful for testing or when authentication is handled externally.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication. Hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, defaulting to GET but typically POST for this operation.

Output

JSON

  • token - The new personal access token returned after rotation.
  • expires_at - The expiration date of the new personal access token.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the GitLab API key has sufficient permissions to rotate personal access tokens.
  • If authentication is skipped, the request will likely fail unless handled externally.
  • Verify the baseUrl is correct for your GitLab instance to avoid connection errors.
  • Common error messages include authentication failures and permission denied errors; verify credentials and token scopes.

Links

Discussion