GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to retrieve a specific GPG key associated with the authenticated user by its key ID. It is useful for scenarios where you need to fetch details about a user's GPG keys for verification, security audits, or user profile management within GitLab.

Use Case Examples

  1. Fetch details of a specific GPG key for the authenticated user by providing the key ID.
  2. Use in automation workflows to verify or manage user GPG keys in GitLab.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication process for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request, defaulting to GET.
Path Parameters The path parameter containing the GPG key ID to specify which key to retrieve.

Output

JSON

  • id - The unique identifier of the GPG key.
  • key - The actual GPG 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 authenticated user can edit the GPG key.
  • can_delete - Indicates if the authenticated user can delete the GPG key.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the provided key_id path parameter is valid and corresponds to an existing GPG key for the authenticated user.
  • Verify that the GitLab API key credential is correctly configured and has sufficient permissions to access user GPG keys.
  • Check the baseUrl to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 404 Not Found if the key_id does not exist or 401 Unauthorized if authentication fails. Verify parameters and credentials accordingly.

Links

Discussion