GitLab API

GitlabTool

Actions905

Overview

This node operation fetches the raw content of a specific snippet from the GitLab API (version 4). It is useful for retrieving the exact raw data of a snippet identified by its ID, which can be used in automation workflows that require snippet content for further processing or integration.

Use Case Examples

  1. Retrieve the raw content of a snippet by its ID to use in a code review automation.
  2. Fetch raw snippet data to analyze or transform it before saving to another system.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, hidden unless Skip Authentication is false.
baseUrl The base URL of the GitLab instance to send the request to.
Method HTTP method to use for the request (GET, POST, PUT, DELETE, HEAD, PATCH).
Parameter Schema Defines the path parameter 'id' which is the ID of the snippet to retrieve.
Request Body Schema Schema for the request body, null for this operation.
Request Path The API endpoint path template to fetch the raw snippet content, with {id} as a placeholder for the snippet ID.
Path Parameters Collection of path parameters, specifically the snippet ID to be used in the request path.

Output

JSON

  • data - Raw content of the snippet retrieved from the GitLab API.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the snippet ID provided in the path parameters is valid and exists in the GitLab instance.
  • If authentication is enabled, verify that the GitLab API credentials are correctly configured and have sufficient permissions to access snippets.
  • Check the baseUrl to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion