GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows revoking a GPG key for a specific user in GitLab by making a POST request to the GitLab API endpoint `/api/v4/users/{id}/gpg_keys/{key_id}/revoke`. It is useful for managing user security by invalidating GPG keys that should no longer be trusted or used. For example, an administrator can revoke a compromised or outdated GPG key associated with a user account.

Use Case Examples

  1. Revoke a GPG key for a user by specifying the user ID and the GPG key ID to enhance security management in GitLab.
  2. Automate the process of invalidating GPG keys for users who no longer require access or have left the organization.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for testing or public endpoints.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to specify the user ID and the GPG key ID to revoke.

Output

JSON

  • success - Indicates whether the GPG key revocation was successful.
  • message - Additional message or information returned from the API about the revocation process.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the user ID and GPG key ID are correct and exist in GitLab to avoid 404 errors.
  • Check that the API key used has sufficient permissions to revoke GPG keys for users.
  • If authentication is skipped, the request may fail due to lack of authorization.
  • Verify the base URL is correct for the GitLab instance being accessed.

Links

Discussion