GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation resets the registration token for runners associated with a specific GitLab project. It is useful for GitLab administrators or DevOps engineers who 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 needs to be rotated, this operation allows resetting it via the GitLab API.

Use Case Examples

  1. Resetting the runner registration token for a project to enhance security.
  2. Automating token rotation for CI/CD runners in GitLab projects.

Properties

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

Output

JSON

  • id - The ID of the project for which the runner registration token was reset.
  • runner_token - The new runner registration token generated after reset.
  • message - Any message returned by the API, such as confirmation or error messages.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the authenticated user.
  • Verify that the authentication credentials are valid and have sufficient permissions to reset runner tokens.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages may include authorization errors (e.g., 401 Unauthorized) if credentials are invalid, or 404 Not Found if the project ID does not exist.

Links

Discussion