Update a file in a repository
PUT
/api/v4/projects/{id}/repository/files/{file_path}
Updates a specified file in a repository. Use the Commits API to update multiple files with a single request.
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%2ErbRequest Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
object
file
required
The file content to be updated (generated by Multipart middleware)
string format: binary
Responses
Section titled “Responses”OK
Bad Request
Not Found