GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves the SSH keys associated with the authenticated user from the GitLab API (version 4). It is useful for scenarios where you need to programmatically access or manage a user's SSH keys, such as in automation workflows for user management or security audits.

Use Case Examples

  1. Fetch the current user's SSH keys to verify access credentials.
  2. Automate the retrieval of user keys for backup or synchronization purposes.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public endpoints or testing.
Authentication Select the authentication method, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance to which the API requests are sent.
Method HTTP method used for the API request, default is GET.
Query Parameters Optional query parameters to paginate the results, including 'page' for the current page number and 'per_page' for the number of items per page.

Output

JSON

  • id - Unique identifier of the SSH key.
  • title - Title or name of the SSH key.
  • key - The actual SSH public key string.
  • created_at - Timestamp when the SSH key was created.
  • expires_at - Timestamp when the SSH key expires, if applicable.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has the necessary permissions to access user keys.
  • Verify the baseUrl is correct and points to a valid GitLab instance.
  • Check that the query parameters 'page' and 'per_page' are valid integers if used.
  • Common error messages include authentication failures (401 Unauthorized) and resource not found (404) if the user keys endpoint is incorrect or inaccessible.

Links

Discussion