GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves all snippets from the GitLab API (version 4) using a GET request to the endpoint `/api/v4/snippets/all`. It supports filtering and pagination through query parameters such as creation date range, page number, items per page, and repository storage filter. This operation is useful for users who want to programmatically access and manage all snippets available in their GitLab instance, for example, to audit, backup, or analyze code snippets stored in GitLab.

Use Case Examples

  1. Fetch all snippets created after a specific date to review recent code snippets.
  2. Retrieve snippets with pagination to process them in batches.
  3. Filter snippets by repository storage to manage storage usage.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
Authentication The authentication method used for the request, hidden unless Skip Authentication is false. Defaults to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the request is sent. Defaults to https://gitlab.com.
Method HTTP method used for the request. Defaults to GET.
Query Parameters Collection of optional query parameters to filter and paginate the snippets list.

Output

JSON

  • ``
    • id - Unique identifier of each snippet.
    • title - Title of the snippet.
    • file_name - File name of the snippet.
    • author - Author information of the snippet.
    • created_at - Creation timestamp of the snippet.
    • updated_at - Last update timestamp of the snippet.
    • content - Content of the snippet.
    • visibility - Visibility level of the snippet (e.g., private, internal, public).

Dependencies

  • GitLab API key credential (unless Skip Authentication is true)

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has sufficient permissions to access snippets.
  • Verify the baseUrl is correct and accessible from the network where the node runs.
  • Check that query parameters are formatted correctly, especially date-time strings in ISO 8601 format.
  • If authentication is skipped, ensure the GitLab instance allows unauthenticated access to snippets, otherwise requests will fail.

Links

Discussion