GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves all snippets from the GitLab API (version 4). It is useful for scenarios where you need to fetch a comprehensive list of code snippets stored in GitLab, such as for auditing, backup, or integration with other tools.

Use Case Examples

  1. Fetch all snippets created after a specific date to monitor recent code changes.
  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 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 Collection of optional query parameters to filter and paginate the snippets retrieved.

Output

JSON

  • id - Unique identifier of the snippet.
  • title - Title of the snippet.
  • description - Description of the snippet.
  • author
    • id - ID of the author who created the snippet.
    • name - Name 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., public, private).
  • files - List of files included in the snippet.

Dependencies

  • GitLab API authentication

Troubleshooting

  • Ensure the GitLab API credentials are correctly configured and have the necessary permissions to access snippets.
  • Verify the base URL is correct and accessible from the n8n environment.
  • Check that query parameters are formatted correctly, especially date-time strings for filtering by creation date.
  • If authentication is skipped, ensure the GitLab instance allows unauthenticated access to snippets, otherwise requests will fail.

Links

Discussion