GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to retrieve user SSH keys via the API v4 endpoint `/api/v4/user/keys`. It supports pagination through query parameters, allowing users to specify the page number and the number of items per page. This node is useful for automating the retrieval of SSH keys associated with a GitLab user, which can be beneficial for managing access and security in DevOps workflows.

Use Case Examples

  1. Retrieve the first page of SSH keys for the authenticated user with default pagination.
  2. Fetch a specific page of SSH keys with a custom number of keys per page to handle large sets of keys.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the request.
Authentication The authentication method used for the API request, 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.
Query Parameters Optional query parameters to control pagination of the user keys list.

Output

JSON

  • response - The JSON response containing the list of user SSH keys retrieved from the GitLab API.

Dependencies

  • GitLab API key credential for authentication

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 for pagination (page and per_page) are valid integers if provided.
  • Common error messages may include authentication failures (401 Unauthorized) or permission errors (403 Forbidden) if the API key lacks required scopes.

Links

Discussion