GitLab API

GitlabTool

Actions1095

Projects → getApiV4ProjectsIdRepositoryBlobsShaRaw

AI-generated

Summary

Retrieve the raw content of a repository blob at a specific commit SHA from a GitLab project.

Inputs

  • Skip Authentication — Whether to skip authentication; defaults to false.
  • baseUrl — The base URL of the GitLab instance; defaults to https://gitlab.com.
  • Method (required) — The HTTP method to use; default and typical is GET.
  • Path Parameters (required) — The path parameters including 'id' (the ID or URL-encoded path of the GitLab project) and 'sha' (the commit hash of the blob to retrieve). Both are strings and required.

Output shape

a binary/raw response of the blob content

Returns the raw file content for the specified blob SHA from the project repository. The operation uses the endpoint '/api/v4/projects/{id}/repository/blobs/{sha}/raw'. Authentication is required unless explicitly skipped. No pagination applies.

Examples

Example 1: Get raw content of a file blob at a given commit

Set the 'id' path parameter to the project identifier (ID or URL-encoded path), 'sha' to the commit hash of the blob, use the GET method, and invoke the operation to receive the raw file contents as output.

Links

Discussion