Skip to main content
GET
/
repos
/
{owner}
/
{repo}
/
git
/
blobs
/
{sha}
Get a git blob
curl --request GET \
  --url https://gogs.example.com/api/v1/repos/{owner}/{repo}/git/blobs/{sha} \
  --header 'Authorization: <api-key>'
{
  "content": "<string>",
  "encoding": "base64",
  "url": "<string>",
  "sha": "<string>",
  "size": 123
}

Authorizations

Authorization
string
header
required

Personal access token. Use format: token {YOUR_ACCESS_TOKEN}

Path Parameters

owner
string
required

Owner of the repository

repo
string
required

Name of the repository

sha
string
required

SHA of the git blob

Response

Success

content
string

Base64-encoded blob content

encoding
string
Example:

"base64"

url
string
sha
string
size
integer