GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific cluster agent from a GitLab project using the GitLab API. It is useful for managing and cleaning up cluster agents associated with projects, especially in automated workflows where cluster agents need to be programmatically removed based on project or agent lifecycle events.

Use Case Examples

  1. Automatically remove a cluster agent when a project is archived or deleted.
  2. Clean up unused cluster agents in a CI/CD pipeline to maintain security and resource management.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request, which is DELETE for this operation.
Path Parameters Parameters used in the API request path to specify the project and cluster agent to delete.

Output

JSON

  • success - Indicates whether the cluster agent was successfully deleted.
  • statusCode - HTTP status code returned by the API.
  • message - Additional message or error information from the API response.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID and agent ID are correct and exist in the GitLab instance.
  • Verify that the API authentication token has sufficient permissions to delete cluster agents.
  • Check the base URL to confirm it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the project or agent does not exist, and 403 Forbidden if the authentication lacks delete permissions.

Links

Discussion