Miscellaneous

Get a git blob

Returns the content of a git blob object, base64 encoded.

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

Request

  • Base URL
    https://gogs.example.com/api/v1
  • Auth
    API key in header Authorization

Path parameters

ownerstring required

Owner of the repository

repostring required

Name of the repository

shastring required

SHA of the git blob

Response

Success

contentstring

Base64-encoded blob content

encodingstring
urlstring
shastring
sizeinteger

Example response

{
  "encoding": "base64"
}

Changes

No recorded changes to this operation across all 3 revisions of this API.