GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves a specific GPG key associated with a user in GitLab by their user ID and the GPG key ID. It is useful for scenarios where you need to verify or manage a user's GPG keys programmatically, such as in automated security audits or user management workflows.

Use Case Examples

  1. Fetch a user's GPG key details to verify their cryptographic identity.
  2. Automate the retrieval of GPG keys for users in a GitLab instance for compliance checks.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, typically an API key credential.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method The HTTP method used for the request, default is GET.
Path Parameters Parameters used in the request path to specify the user ID and GPG key ID.

Output

JSON

  • id - The unique identifier of the GPG key.
  • key - The actual GPG public key string.
  • created_at - Timestamp when the GPG key was created.
  • expires_at - Timestamp when the GPG key expires, if applicable.
  • can_edit - Indicates if the GPG key can be edited.
  • user_id - The ID of the user to whom the GPG key belongs.

Dependencies

  • An API key credential for GitLab authentication

Troubleshooting

  • Ensure the user ID and GPG key ID are correct and exist in the GitLab instance.
  • Verify that the API key credential has sufficient permissions to access user GPG keys.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error: 404 Not Found - The specified user or GPG key does not exist.
  • Common error: 401 Unauthorized - Authentication failed, check API key validity.

Links

Discussion