GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation resets the authentication token of a specific GitLab runner by making a POST request to the GitLab API endpoint `/api/v4/runners/{id}/reset_authentication_token`. It is useful for managing CI/CD runners in GitLab, especially when you need to invalidate and regenerate the runner's authentication token for security or operational reasons.

Use Case Examples

  1. Resetting the authentication token of a GitLab runner identified by its ID to ensure secure access.
  2. Automating the process of token reset for multiple runners in a CI/CD pipeline management workflow.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the API request.
Authentication The authentication method used for the API request, hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request, default is POST for this operation.
Path Parameters The path parameters for the API request, specifically the runner ID to reset the token for.

Output

JSON

  • id - The ID of the runner whose authentication token was reset.
  • token - The new authentication token generated for the runner.
  • created_at - Timestamp when the new token was created.

Dependencies

  • GitLab API credentials for authentication

Troubleshooting

  • Ensure the runner ID provided in the path parameters is valid and exists in the GitLab instance.
  • If authentication is not skipped, verify that the GitLab API credentials are correctly configured and have sufficient permissions.
  • Check the baseUrl to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages may include 404 Not Found if the runner ID does not exist, or 401 Unauthorized if authentication fails. Verify credentials and permissions to resolve these issues.

Links

Discussion