Get contents of multiple files in a single request
POST
/api/v4/projects/{id}/repository/blobs/batch
Each blob is truncated to the first 1 MB; the truncated field indicates when this happens.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
files
required
Array of file objects to retrieve (max 20)
Array<object>
object
path
required
The file path
string
Example
app/models/user.rbref
The branch, tag, or commit. Defaults to the default branch
string
Example
mainResponses
Section titled “Responses”OK
Media typeapplication/json
object
path
string
ref
string
size
integer
truncated
boolean
encoding
string
content
string
Example
{ "path": "app/models/user.rb", "ref": "main", "size": 1476, "truncated": false, "encoding": "base64", "content": "VGhpcyBpcyBhIGZpbGU="}Bad Request
Unauthorized
Forbidden
Not Found