Get File Blob
GET/api/v5/repos/:owner/:repo/git/blobs/:sha
Request
Path Parameters
owner stringrequired
Repository space address (organization or individual's address path)
repo stringrequired
Repository path (path)
sha stringrequired
The Blob SHA of the file, which can be obtained via the [Get Contents in Specific Repository Path] API.
Query Parameters
access_token string
User authorization code
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
shastring
sizeinteger
urlstring
contentstring
encodingstring
{
"sha": "string",
"size": 0,
"url": "string",
"content": "string",
"encoding": "string"
}
{
"sha": "e5699fe1b360d6c799ee58b24fb5a670b1e14851",
"size": 19,
"url": "https://gitcode.com/api/v5/repos/daming_1/zhu_di/git/blobs/e5699fe1b360d6c799ee58b24fb5a670b1e14851",
"content": "JXU2RDRCJXU4QkQ1d2ViaG9vaw==",
"encoding": "base64"
}