GitLab API

GitlabTool

Actions905

Overview

This node operation fetches snippets from the GitLab API v4 endpoint `/api/v4/snippets`. It allows users to retrieve code snippets with optional filtering by creation date and pagination controls. This is useful for automating the retrieval of code snippets stored in GitLab for review, backup, or integration with other tools.

Use Case Examples

  1. Retrieve all snippets created after a specific date to monitor recent code additions.
  2. Paginate through snippets to process or display them in batches within an automation workflow.

Properties

Name Meaning
Skip Authentication If true, the node will skip using authentication for the API request.
Authentication Selects the authentication method to use for the API request, hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method HTTP method to use for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).
Query Parameters Optional query parameters to filter and paginate the snippets retrieved.

Output

JSON

  • snippets - Array of snippet objects returned from the GitLab API, each representing a code snippet with its metadata.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the GitLab API credentials are correctly configured and have the necessary permissions to access snippets.
  • Verify the baseUrl is correct and accessible from the network where the node runs.
  • Check that date-time strings for created_after and created_before are in valid ISO 8601 format to avoid API errors.
  • Pagination parameters (page and per_page) should be positive integers; invalid values may cause request failures.

Links

Discussion