GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves the GPG keys associated with a specific user in GitLab via the GitLab API. It is useful for scenarios where you need to manage or audit user GPG keys, such as verifying user identities or managing security credentials in a GitLab environment. For example, an administrator might use this operation to fetch all GPG keys for a user to ensure compliance with security policies.

Use Case Examples

  1. Fetch GPG keys for a user with ID 123 to verify their cryptographic signatures on commits.
  2. List all GPG keys for a user to audit their security credentials.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API calls.
Authentication Type of authentication used for the API request, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance to which the API request is sent, default is https://gitlab.com.
Method HTTP method used for the API request, default is GET.
Query Parameters Optional query parameters for pagination, including page number and items per page.
Path Parameters Path parameters required for the API endpoint, specifically the user ID whose GPG keys are being retrieved.

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 - Boolean indicating if the GPG key can be edited by the user.
  • user_id - The ID of the user to whom the GPG key belongs.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists 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 messages include 404 Not Found if the user ID does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion