GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → getApiV4ProjectsIdRepositoryBlobsShaRaw

AI-generated

Summary

Fetch the raw content of a repository blob identified by its commit hash (sha) from a specified GitLab project.

Inputs

  • Skip Authentication — Whether to bypass authentication for this request. Defaults to false.
  • Authentication (required) — The authentication credential to use for the GitLab API, hidden unless Skip Authentication is false.
  • baseUrl — The base URL of the GitLab instance; defaults to https://gitlab.com.
  • Method (required) — HTTP method to use; defaults to GET and typically should not be changed.
  • Path Parameters (required) — Includes 'id' (the ID or URL-encoded path of the project) and 'sha' (the commit hash identifying the blob) to specify the resource to fetch.

Output shape

a raw binary or text stream representing the contents of the repository blob at the specified commit hash.

The output is the raw file data from the repository blob. The operation uses a GET request to the path /api/v4/projects/{id}/repository/blobs/{sha}/raw of the specified GitLab instance. Authentication is required unless explicitly skipped.

Examples

Example 1: Retrieve the raw content of a file from a GitLab repository at a specific commit.

Set 'id' to the project ID or URL-encoded path, 'sha' to the commit hash, use GET method with default GitLab API credentials, and receive the raw file content in the output.

Links

Discussion