GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the project deploy keys associated with a specific user in GitLab via the GitLab API v4. It is useful for scenarios where you need to manage or audit deploy keys for user projects, such as in DevOps workflows or security audits. For example, you can fetch deploy keys to verify which keys have access to a user's projects or to automate key management tasks.

Use Case Examples

  1. Fetch deploy keys for a user to audit access to projects.
  2. Automate retrieval of deploy keys for integration with other security tools.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance to which the API request is sent.
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 parameter specifying the user ID or username whose project deploy keys are being retrieved.

Output

JSON

  • ``
    • id - ID of the deploy key.
    • title - Title of the deploy key.
    • key - The deploy key itself.
    • created_at - Timestamp when the deploy key was created.
    • can_push - Indicates if the deploy key has push access.
    • projects - List of projects associated with the deploy key.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the user_id path parameter is correctly set; otherwise, the API will return an error indicating a missing or invalid user identifier.
  • Check that the GitLab API key credential has sufficient permissions to access user project deploy keys.
  • If pagination parameters (page, per_page) are set incorrectly, the response may be incomplete or empty; adjust these parameters as needed.
  • Common error messages include 401 Unauthorized (invalid or missing API key) and 404 Not Found (user or deploy keys not found). Verify credentials and user existence to resolve these.

Links

Discussion