GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a deploy key from a specified GitLab project using the GitLab API. It is useful for managing project security by removing deploy keys that are no longer needed or should be revoked. For example, a user can automate the removal of deploy keys from projects when access needs to be restricted or cleaned up.

Use Case Examples

  1. Automate removal of deploy keys from GitLab projects to maintain security.
  2. Remove a deploy key from a project after a team member leaves or changes roles.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is used for this operation.
Path Parameters Parameters for the API path, including project ID and deploy key ID.

Output

JSON

  • success - Indicates if the deploy key was successfully deleted.
  • statusCode - HTTP status code returned by the API.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and deploy key ID are correct and exist in the GitLab instance.
  • Verify that the API key used has sufficient permissions to delete deploy keys.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the project or key does not exist, and 403 Forbidden if the API key lacks permissions.

Links

Discussion