GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves the project deploy keys for a specific user from the GitLab API. It is useful for scenarios where you need to manage or audit deploy keys associated with a user's projects, such as in DevOps automation or security audits. For example, you can use it to list all deploy keys for a user's projects to verify access or update keys programmatically.

Use Case Examples

  1. Retrieve all deploy keys for user with ID '123' to audit project access keys.
  2. Automate the process of fetching deploy keys for a user to integrate with a security compliance tool.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance to send the request to, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters to control pagination of results.
Path Parameters Path parameters required for the API endpoint, specifically the user ID or username to identify the user whose project deploy keys are being retrieved.

Output

JSON

  • ``
    • id - The unique identifier of each deploy key.
    • title - The title or name of the deploy key.
    • key - The actual deploy key string.
    • created_at - Timestamp when the deploy key was created.
    • can_push - Boolean indicating 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 and corresponds to an existing user in GitLab.
  • Verify that the GitLab API key credential has sufficient permissions to access user project deploy keys.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 401 Unauthorized (due to missing or invalid API key) and 404 Not Found (if the user_id does not exist).

Links

Discussion