GitLab API

GitlabTool

Actions905

Overview

This node operation resets the registration token for a specific project in GitLab. It is useful when you need to invalidate the current runner registration token and generate a new one for security or operational reasons. For example, if a runner's token is compromised or you want to rotate tokens regularly, this operation helps maintain secure CI/CD pipelines.

Use Case Examples

  1. Resetting the registration token of a project to prevent unauthorized runner registrations.
  2. Automating token rotation for project runners as part of a security policy.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, typically an API key credential.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method The HTTP method used for the request, here it is POST for this operation.
Path Parameters The path parameters for the request, specifically the project ID whose runner registration token is to be reset.

Output

JSON

  • id - The ID of the project for which the token was reset.
  • runner_registration_token - The new runner registration token generated after reset.

Dependencies

  • An API key credential for GitLab authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the authenticated user.
  • Verify that the API key credential has sufficient permissions to reset runner tokens for the project.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the project ID is invalid or inaccessible, and 401 Unauthorized if authentication fails.

Links

Discussion