GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes a GitLab runner using the GitLab API. It is useful for managing CI/CD runners by removing those that are no longer needed or are compromised. For example, a DevOps engineer can automate the cleanup of inactive runners to maintain a secure and efficient CI/CD environment.

Use Case Examples

  1. Deleting a runner by providing its authentication token to revoke its access and remove it from the GitLab instance.
  2. Automating runner management by integrating this node in workflows that handle runner lifecycle.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication step for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request, defaulting to GET but can be set to DELETE for this operation.
Parameter Schema Defines the required query parameter 'token' which is the runner's authentication token used to identify the runner to delete.
Request Body Schema No request body is required for this operation.
Request Path The API endpoint path for deleting runners, set to '/api/v4/runners'.
Query Parameters Collection of query parameters including the required 'token' parameter to specify the runner's authentication token.

Output

JSON

  • statusCode - HTTP status code returned by the API indicating the result of the delete operation.
  • responseBody - The JSON response body from the API, typically empty or containing confirmation of deletion.

Dependencies

  • GitLab API key credential for authentication unless skipping authentication is enabled.

Troubleshooting

  • Ensure the 'token' query parameter is provided and valid; missing or incorrect tokens will cause the API to reject the request.
  • If authentication is not skipped, verify that the GitLab API key credential is correctly configured and has sufficient permissions to delete runners.
  • Check the baseUrl to ensure it points to the correct GitLab instance; incorrect URLs will cause connection failures.
  • Common error messages include 401 Unauthorized (authentication failure), 404 Not Found (runner not found), and 403 Forbidden (insufficient permissions). Resolving these involves verifying credentials, token validity, and user permissions.

Links

  • GitLab API - Delete a Runner - Official GitLab API documentation for deleting a runner, detailing required parameters and expected responses.

Discussion