GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the raw content of a specific file from a GitLab snippet using the GitLab API v4. It is useful for scenarios where you need to access the exact raw data of a file stored in a snippet, such as for code review, analysis, or integration into other workflows. For example, you can fetch the raw source code of a snippet file at a particular commit or branch reference.

Use Case Examples

  1. Fetching the raw content of a snippet file to display in a custom dashboard.
  2. Downloading the raw file content for automated code analysis or testing.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, default is GET.
Path Parameters Parameters required in the request path to specify the snippet file to retrieve.

Output

JSON

  • raw - The raw content of the specified snippet file.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the snippet ID, file path, and reference are correctly URL encoded and valid.
  • Authentication errors may occur if the API token is missing or invalid; verify credentials.
  • Permission errors if the snippet or file is private and the token lacks access rights.
  • 404 errors if the snippet, file path, or reference does not exist.

Links

Discussion