Changes for page Tracking Type
Last modified by Achraf El Kari on 2022/06/13 13:17
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -T rackingType1 +GIT endpoints - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.a elkari1 +XWiki.omoustaghfir - Content
-
... ... @@ -4,18 +4,13 @@ 4 4 5 5 = Introduction = 6 6 7 - We willgo throughallendpointsneeded tomanageheTrackingtypeentity.7 +Git endpoints take advantage of all git commands known and needed to create versions of files. 8 8 9 9 = Endpoints = 10 10 11 -|(% style="width:166px" %)**URL [method]**|(% style="width:238px" %)**Description**|(% style="width:599px" %)**Input example**|(% style="width:449px" %)**Output example** 12 -|(% style="width:166px" %)((( 13 -/rest/trackingType [GET] 14 - 15 - 16 -hedear : Authorization + env => Mandatory 17 -\\PS : If the env does not exist on the header, you got an error 400 (bad params) 18 -)))|(% style="width:238px" %)get all tracking Type of the giving environment|(% style="width:599px" %)(no input required)|(% style="width:449px" %){{code language="JSON"}}{ 11 +|(% style="width:166px" %)**URL [method]**|(% style="width:189px" %)**Description**|(% style="width:383px" %)**Input example**|(% style="width:449px" %)**Output example** 12 +|(% style="width:166px" %)/rest/git/getstatus [GET]|(% style="width:189px" %)get all files that have been modified or untracked|(% style="width:383px" %)(no input required)|(% style="width:449px" %){{code language="JSON"}} 13 +{ 19 19 "timestamp": 1620216790744, 20 20 "status": "200", 21 21 "data": [ ... ... @@ -29,7 +29,7 @@ 29 29 } 30 30 ] 31 31 }{{/code}} 32 -|(% style="width:166px" %)/rest/git/history [GET]|(% style="width: 238px" %)get all commits history, with their IDs ,authors ,messages, dates and if considired as current version or not |(% style="width:599px" %)(no input required)|(% style="width:449px" %){{code language="JSON"}}{27 +|(% style="width:166px" %)/rest/git/history [GET]|(% style="width:189px" %)get all commits history, with their IDs ,authors ,messages, dates and if considired as current version or not |(% style="width:383px" %)(no input required)|(% style="width:449px" %){{code language="JSON"}}{ 33 33 "timestamp": 1620217014704, 34 34 "status": "200", 35 35 "data": [ ... ... @@ -49,7 +49,7 @@ 49 49 } 50 50 ] 51 51 }{{/code}} 52 -|(% style="width:166px" %)/rest/git/commit [POST]|(% style="width: 238px" %)commit changes in files with a message|(% style="width:599px" %){{code language="JSON"}}{47 +|(% style="width:166px" %)/rest/git/commit [POST]|(% style="width:189px" %)commit changes in files with a message|(% style="width:383px" %){{code language="JSON"}}{ 53 53 "files": 54 54 [ 55 55 {"fileName" : "newFile.xml"}, ... ... @@ -71,13 +71,13 @@ 71 71 /rest/git/switchComit/{id} 72 72 73 73 [GET] 74 -)))|(% style="width: 238px" %)(((69 +)))|(% style="width:189px" %)((( 75 75 switch to a certain version and return the history of all commits. 76 76 77 77 **__NB __**: if there are some modified files in the current version, these files will be moved to a new directory called : 78 78 79 79 .../archive/git-{timestamp} 80 -)))|(% style="width: 599px" %)(((75 +)))|(% style="width:383px" %)((( 81 81 the {id} in the URL should be replaced by the id of the wanted commit. 82 82 83 83 eg : ... ... @@ -109,9 +109,9 @@ 109 109 } 110 110 {{/code}} 111 111 ))) 112 -|(% style="width:166px" %)/rest/git/update [GET]|(% style="width: 238px" %)(((107 +|(% style="width:166px" %)/rest/git/update [GET]|(% style="width:189px" %)((( 113 113 Integrates and pulls changes from a remote repository into the current branch. 114 -)))|(% style="width: 599px" %)(no input required)|(% style="width:449px" %)(((109 +)))|(% style="width:383px" %)(no input required)|(% style="width:449px" %)((( 115 115 it returns a success message. 116 116 117 117 eg : ... ... @@ -124,13 +124,13 @@ 124 124 } 125 125 {{/code}} 126 126 ))) 127 -|(% style="width:166px" %)/rest/environment/init [POST]|(% style="width: 238px" %)(((122 +|(% style="width:166px" %)/rest/environment/init [POST]|(% style="width:189px" %)((( 128 128 Clone a git repository into the directory of the current environment, 129 129 130 130 if it doesn't exist it creates a new directory and initialize the repo, 131 131 132 -if the directory exists, the endpoint rename sthe directory and createsa new one and clonesthe repository.133 -)))|(% style="width: 599px" %)(no input required)|(% style="width:449px" %)(((127 +if the directory exists, the endpoint rename the directory with and create a new one and clone the repository. 128 +)))|(% style="width:383px" %)(no input required)|(% style="width:449px" %)((( 134 134 it returns a "success" message : 135 135 136 136 eg : ... ... @@ -139,86 +139,9 @@ 139 139 { 140 140 "timestamp": 1620229625932, 141 141 "status": "200", 142 - "data": " Repository initialized successfully !"137 + "data": "ok" 143 143 } 144 144 {{/code}} 145 145 ))) 146 -|(% style="width:166px" %)/rest/git/checkout/{branch} [POST]|(% style="width:238px" %)switch to a certain branch|(% style="width:599px" %)((( 147 -the {branch} must be replaced by the name of the branch destination. 148 148 149 -eg : /rest/git/checkout/master 150 - 151 - /rest/git/checkout/develop 152 -)))|(% style="width:449px" %)((( 153 -it returns a "success" message of checkout branch. 154 - 155 -eg : 156 - 157 -{{code language="JSON"}} 158 -{ 159 - "timestamp": 1620229625932, 160 - "status": "200", 161 - "data": "switched to branch : master" 162 -} 163 -{{/code}} 164 -))) 165 -|(% style="width:166px" %)((( 166 -/rest/git/newbranch/{branch} 167 - 168 -[POST] 169 -)))|(% style="width:238px" %)create and switch to a new branch |(% style="width:599px" %)((( 170 -the {branch} must be replaced by the name of the branch destination. 171 - 172 -eg : 173 - 174 - /rest/git/checkout/newBranch 175 -)))|(% style="width:449px" %)((( 176 -it returns a "success" message of the branch creation. 177 - 178 -eg : 179 - 180 -{{code language="JSON"}} 181 -{ 182 - "timestamp": 1620229625932, 183 - "status": "200", 184 - "data": "new branch has been created : newBranch" 185 -} 186 -{{/code}} 187 -))) 188 -|(% style="width:166px" %)/rest/git/revert [POST]|(% style="width:238px" %)switch the modified file to the initial head version. |(% style="width:599px" %){{code language="JSON"}}{ 189 -"files": 190 -[ 191 -{"fileName" : "newFile.xml"}, 192 -{"fileName" : "/dir/modifiedFile.pdf"} 193 -] 194 -}{{/code}}|(% style="width:449px" %)((( 195 -it returns a "success" message. 196 - 197 -eg : 198 - 199 -{{code language="JSON"}} 200 -{ 201 - "timestamp": 1620229625932, 202 - "status": "200", 203 - "data": "the selected files has been synchronized to HEAD successfully !" 204 -} 205 -{{/code}} 206 -))) 207 - 208 -= Errors = 209 - 210 -below, you can find an example of technical and functional errors : 211 - 212 -{{code language="JSON"}} 213 -{ 214 - "timestamp": 1620221672951, 215 - "status": "500", 216 - "error": "JSON file is not valid", 217 - "thechnicalError": "JSONObject[\"fileName\"] not found." 218 -} 219 -{{/code}} 220 - 221 -the functional error is shown with the JSON key "error", while technical error is stored in the "thechnicalError" key. 222 - 223 - 224 224 == ==