GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation resets the registration token for a specific project in GitLab. It is useful when you need to invalidate the current registration token for project runners and generate a new one, enhancing security or managing runner access. For example, if a runner's token is compromised or you want to rotate tokens regularly, this operation helps automate that process.

Use Case Examples

  1. Resetting the registration token for a project with ID '123' to ensure only authorized runners can register.
  2. Automating token rotation for project runners as part of a CI/CD security policy.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Default is false.
Authentication The authentication method used, 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 POST is used for this operation.
Path Parameters The path parameters for the request, specifically the project ID to identify which project's runner token to reset.

Output

JSON

  • id - The ID of the project for which the runner registration token was reset.
  • runners_token - The new registration token for the project's runners.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and the authenticated user has permission to reset the runner token for that project.
  • If authentication is skipped, the request will likely fail unless the GitLab instance allows unauthenticated access for this operation.
  • Check the baseUrl to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion