GitLab API

GitlabTool

Actions905

Overview

This node operation rotates an access token for a specific project in GitLab. It is useful for maintaining security by periodically updating access tokens without needing to create new ones manually. For example, a user can automate the rotation of project access tokens to ensure that tokens are regularly refreshed, reducing the risk of unauthorized access.

Use Case Examples

  1. Automate rotation of a GitLab project access token to enhance security.
  2. Rotate a specific access token for a project to invalidate the old token and generate a new one.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to POST for this operation.
Path Parameters Parameters for the request path, including the project ID and the token ID to rotate.

Output

JSON

  • rotated_token - The new rotated access token details returned from GitLab.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and token ID are correct and exist in GitLab to avoid 404 errors.
  • Verify that the API key used has sufficient permissions to rotate access tokens.
  • Check network connectivity and base URL correctness if requests fail to reach GitLab.

Links

Discussion