GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the raw content of a specific blob (file) from a GitLab project's repository using the GitLab API v4. It is useful for scenarios where you need to access the exact file content at a particular commit hash, such as fetching source code files, configuration files, or any repository blob data for further processing or analysis.

Use Case Examples

  1. Fetching the raw content of a README file at a specific commit to display or analyze it.
  2. Downloading a configuration file from a repository at a given commit for deployment automation.

Properties

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

Output

Binary

The node outputs the raw binary content of the blob file from the repository, allowing direct use or saving of the file content.

JSON

  • data - Raw content of the blob file retrieved from the repository.

Dependencies

  • Requires GitLab API authentication credentials unless skipping authentication is enabled.

Troubleshooting

  • Ensure the project ID and commit SHA are correctly specified and URL-encoded if necessary.
  • Authentication errors may occur if the API key is missing or invalid; verify credentials.
  • The blob may not exist at the specified commit SHA, resulting in a 404 error from the API.

Links

Discussion