GIT endpoints
Version 1.11 by Outhman Moustaghfir on 2021/05/05 14:31
Introduction
Git endpoints take advantage of all git commands known and needed to create versions of files.
Endpoints
URL [method] | Description | Input example | Output example |
/rest/git/getstatus [GET] | get all files that have been modified or untracked | (no input required) | { "timestamp": 1620216790744, "status": "200", "data": [ { "fileName": "FileToF.txt", "status": "Untracked" }, { "fileName": "newfile.txt", "status": "Modified" } ] } |
/rest/git/history [GET] | get all commits history, with their IDs ,authors ,messages, dates and if considired as current version or not | (no input required) | { "timestamp": 1620217014704, "status": "200", "data": [ { "date": "Tue May 04 16:37:49 GMT+01:00 2021", "current": "true", "author": "person1232", "id": "11e8707eb50e25c00a62e4efedb5f6071ec7e27e", "message": "version 2" }, { "date": "Tue May 04 13:28:12 GMT+01:00 2021", "current": "false", "author": "person1", "id": "4b64d02451f47d9cb91d08faa986c941deef0f5c", "message": "version 1" } ] } |
/rest/git/commit [POST] | commit changes in files with a message | { "files": [ {"fileName" : "newFile.xml"}, {"fileName" : "/dir/modifiedFile.pdf"} ], "message": "this is a commit message" } | it returns a String with the commit message meaning that the commit has passed successfully. eg : { |