GitLab API icon

GitLab API

Gitlab

Actions880

Overview

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

Use Case Examples

  1. Fetching the raw content of a README file at a specific commit in a GitLab project.
  2. Accessing configuration files stored in a GitLab repository for automated deployment scripts.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication The authentication method used for the API request, typically an API key credential for GitLab.
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 required in the API path to specify the project and blob.

Output

Binary

The raw binary content of the blob retrieved from the GitLab repository.

JSON

  • id - The project ID or URL-encoded path used in the request.
  • sha - The commit hash used to identify the blob.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID and commit hash (sha) are correct and exist in the GitLab repository.
  • Verify that the authentication token has sufficient permissions to access the repository and read blobs.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated access to the requested resource.
  • Common errors include 404 Not Found if the project or blob does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion