Edit File
Create, update, or delete specified file. Return hash of resulting commit
- Http Method
- POST
- End Point
-
/~api/repositories/{projectId}/files/{branchAndFile:.*}
Placeholder Description Example {projectId} Project Id 1 {branchAndFile} Branch And File test-branch/path/to/file - Request Body
- Response
-
- Operation Successful
-
- Status Code
- 200
- Response Body
-
- Content Type
- application/json
- Example
- "46c001b04cba0ca41588841f1ca32f50b582ee9b"
- Operation Failed
-
- Status code
- Status code other than 200 indicating the error type
- Response Body
- Error detail of content type "text/plain"
- cURL Example
-
$ curl -u <login name>:<password or access token> -X POST [email protected] -H "Content-Type: application/json" https://git.codedune.app/~api/repositories/1/files/test-branch/path/to/file