Retrieve a file from a repository
GET
/api/v4/projects/{id}/repository/files/{file_path}
Retrieves information about a specified file in a repository. This includes information like the name, size, and the file contents. File content is Base64 encoded.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
The project ID
Example
gitlab-org/gitlabfile_path
required
string
The URL-encoded path to the file.
Example
lib%2Fclass%2ErbQuery Parameters
Section titled “Query Parameters”ref
required
string
The name of branch, tag or commit
Example
mainResponses
Section titled “Responses”OK
Bad Request
Not Found