GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows users to retrieve snippets from the GitLab API (version 4). It supports fetching snippets with optional query parameters such as creation date filters and pagination controls. This is useful for automating the retrieval of code snippets or notes stored in GitLab, enabling integration with other workflows or systems.

Use Case Examples

  1. Fetch all snippets created after a specific date to monitor recent additions.
  2. Retrieve snippets with pagination to process them in batches.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication 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.
Query Parameters Optional query parameters to filter and paginate the snippets retrieved, including created_after, created_before, page, and per_page.

Output

JSON

  • id - Unique identifier of the snippet.
  • title - Title of the snippet.
  • file_name - Name of the file in the snippet.
  • description - Description of the snippet.
  • author
    • id - ID of the author who created the snippet.
    • name - Name of the author.
    • username - Username of the author.
  • created_at - Timestamp when the snippet was created.
  • updated_at - Timestamp when the snippet was last updated.
  • visibility - Visibility level of the snippet (e.g., private, internal, public).

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has the necessary permissions to access snippets.
  • Verify the baseUrl is correct and accessible, especially if using a self-hosted GitLab instance.
  • Check that query parameters are formatted correctly, especially date-time strings for created_after and created_before.
  • Common error messages include authentication failures (401 Unauthorized) and resource not found (404 Not Found), which can be resolved by verifying credentials and API endpoint paths respectively.

Links

Discussion