files

Update a file in a repository

Updates a specified file in a repository. Use the Commits API to update multiple files with a single request.

put/api/v4/projects/{id}/repository/files/{file_path}

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Path parameters

idstring required

The project ID

file_pathstring required

The URL-encoded path to the file.

Request body

filestring binary required

The file content to be updated (generated by Multipart middleware)

Response

Update a file in a repository

Changes

No recorded changes to this operation across all 5 revisions of this API.