GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific SSH key associated with a user in GitLab. It is useful for managing user access by removing outdated or compromised SSH keys from a user's account. For example, an administrator can automate the removal of a user's SSH key when the key is no longer needed or when a user leaves an organization.

Use Case Examples

  1. Deleting an SSH key for a user by specifying the user ID and the SSH key ID to revoke access.
  2. Automating cleanup of SSH keys for users in bulk by iterating over user and key IDs.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method The HTTP method used for the request, defaulting to DELETE for this operation.
Path Parameters The path parameters required for the API call, specifically the user ID and the SSH key ID to delete.

Output

JSON

  • statusCode - The HTTP status code returned by the API indicating the result of the delete operation.
  • responseBody - The body of the response from the API, typically empty for a successful delete operation.

Dependencies

  • Requires GitLab API key authentication credentials to authorize the request.

Troubleshooting

  • Ensure the user ID and SSH key ID are correct and exist in GitLab; otherwise, the API will return an error indicating the resource was not found.
  • Check that the API key used has sufficient permissions to delete user SSH keys.
  • If authentication is skipped, the request will likely fail due to lack of authorization.

Links

Discussion