跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support
This is the documentation of 22.6.1, which is no longer the latest release. See the latest release.

Gets the blob of a repository.

GET
/repos/{owner}/{repo}/git/blobs/{sha}
curl --request GET \
--url https://gitea.example.com/api/v1/repos/example/example/git/blobs/example \
--header 'Authorization: Basic <credentials>'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

sha
required
string

Sha of the commit

GitBlobResponse

Media typeapplication/json

GitBlobResponse represents a git blob

object
content
string
encoding
string
sha
string
size
integer format: int64
url
string
Examplegenerated
{
"content": "example",
"encoding": "example",
"sha": "example",
"size": 1,
"url": "example"
}

APIError is error format response

Media typeapplication/json
message
string
url
string

APINotFound is a not found empty response

Media typeapplication/json