GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the raw content of a specific project snippet from GitLab using the GitLab API. It is useful for scenarios where you need to access the raw data of code snippets stored within a GitLab project, such as for code review automation, snippet analysis, or integration with other development tools.

Use Case Examples

  1. Fetch the raw content of a snippet to display it in a custom dashboard.
  2. Download snippet raw data for backup or migration purposes.

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, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET.
Parameter Schema Defines the required path parameters for the API call, including project ID and snippet ID.
Request Body Schema Schema for the request body, not used in this GET operation.
Request Path The API endpoint path template for retrieving the raw snippet content.
Path Parameters Collection of path parameters including 'id' (project ID or URL-encoded path) and 'snippet_id' (ID of the project snippet).

Output

JSON

  • rawContent - The raw content of the specified project snippet retrieved from GitLab.

Dependencies

  • GitLab API authentication credentials

Troubleshooting

  • Ensure the project ID and snippet ID are correct and exist in the GitLab instance.
  • Verify that the authentication credentials are valid and have sufficient permissions to access the snippet.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the snippet or project does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion