repository

Gets the blob of a repository.

Changed on
get/repos/{owner}/{repo}/git/blobs/{sha}

Request

  • Base URL
    https://demo.gitea.com/api/v1
  • Auth
    • HTTP basic
    • or API key in query parameter token
    • or API key in query parameter access_token
    • or API key in header Authorization
    • or API key in query parameter sudo
    • or API key in header Sudo
    • or API key in header X-GITEA-OTP
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Path parameters

ownerstring required

owner of the repo

repostring required

name of the repo

shastring required

sha of the commit

Response

GitBlobResponse

contentstring

The content of the git blob (may be base64 encoded)

encodingstring

The encoding used for the content (e.g., "base64")

lfs_oidstring

The LFS object ID if this blob is stored in LFS

lfs_sizeinteger

The size of the LFS object if this blob is stored in LFS

shastring

The SHA hash of the git blob

sizeinteger

The size of the git blob in bytes

urlstring

The URL to access this git blob

Changes

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status