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)
-
Attachments (0 modified, 0 added, 1 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,25 +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 -**PS :** __//For all those endpoints, the env params is andatory on the header, otherwise you got an error 400 (BAD PARAMS).//__ 12 - 13 - 14 -|(% style="width:166px" %)**URL [method]**|(% style="width:238px" %)**Description**|(% style="width:599px" %)**Input example**|(% style="width:449px" %)**Output example** 15 -|(% style="width:166px" %)((( 16 -/rest/trackingType [GET] 17 - 18 - 19 -hedear : Authorization + env => Mandatory 20 - 21 -)))|(% style="width:238px" %)((( 22 -get **all **tracking Type of the giving environment ==> 23 - 24 -order, orderLine... 25 -)))|(% 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 +{ 26 26 "timestamp": 1620216790744, 27 27 "status": "200", 28 28 "data": [ ... ... @@ -36,7 +36,7 @@ 36 36 } 37 37 ] 38 38 }{{/code}} 39 -|(% 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"}}{ 40 40 "timestamp": 1620217014704, 41 41 "status": "200", 42 42 "data": [ ... ... @@ -56,7 +56,7 @@ 56 56 } 57 57 ] 58 58 }{{/code}} 59 -|(% 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"}}{ 60 60 "files": 61 61 [ 62 62 {"fileName" : "newFile.xml"}, ... ... @@ -78,13 +78,13 @@ 78 78 /rest/git/switchComit/{id} 79 79 80 80 [GET] 81 -)))|(% style="width: 238px" %)(((69 +)))|(% style="width:189px" %)((( 82 82 switch to a certain version and return the history of all commits. 83 83 84 84 **__NB __**: if there are some modified files in the current version, these files will be moved to a new directory called : 85 85 86 86 .../archive/git-{timestamp} 87 -)))|(% style="width: 599px" %)(((75 +)))|(% style="width:383px" %)((( 88 88 the {id} in the URL should be replaced by the id of the wanted commit. 89 89 90 90 eg : ... ... @@ -116,9 +116,9 @@ 116 116 } 117 117 {{/code}} 118 118 ))) 119 -|(% style="width:166px" %)/rest/git/update [GET]|(% style="width: 238px" %)(((107 +|(% style="width:166px" %)/rest/git/update [GET]|(% style="width:189px" %)((( 120 120 Integrates and pulls changes from a remote repository into the current branch. 121 -)))|(% style="width: 599px" %)(no input required)|(% style="width:449px" %)(((109 +)))|(% style="width:383px" %)(no input required)|(% style="width:449px" %)((( 122 122 it returns a success message. 123 123 124 124 eg : ... ... @@ -131,13 +131,13 @@ 131 131 } 132 132 {{/code}} 133 133 ))) 134 -|(% style="width:166px" %)/rest/environment/init [POST]|(% style="width: 238px" %)(((122 +|(% style="width:166px" %)/rest/environment/init [POST]|(% style="width:189px" %)((( 135 135 Clone a git repository into the directory of the current environment, 136 136 137 137 if it doesn't exist it creates a new directory and initialize the repo, 138 138 139 -if the directory exists, the endpoint rename sthe directory and createsa new one and clonesthe repository.140 -)))|(% 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" %)((( 141 141 it returns a "success" message : 142 142 143 143 eg : ... ... @@ -146,86 +146,9 @@ 146 146 { 147 147 "timestamp": 1620229625932, 148 148 "status": "200", 149 - "data": " Repository initialized successfully !"137 + "data": "ok" 150 150 } 151 151 {{/code}} 152 152 ))) 153 -|(% style="width:166px" %)/rest/git/checkout/{branch} [POST]|(% style="width:238px" %)switch to a certain branch|(% style="width:599px" %)((( 154 -the {branch} must be replaced by the name of the branch destination. 155 155 156 -eg : /rest/git/checkout/master 157 - 158 - /rest/git/checkout/develop 159 -)))|(% style="width:449px" %)((( 160 -it returns a "success" message of checkout branch. 161 - 162 -eg : 163 - 164 -{{code language="JSON"}} 165 -{ 166 - "timestamp": 1620229625932, 167 - "status": "200", 168 - "data": "switched to branch : master" 169 -} 170 -{{/code}} 171 -))) 172 -|(% style="width:166px" %)((( 173 -/rest/git/newbranch/{branch} 174 - 175 -[POST] 176 -)))|(% style="width:238px" %)create and switch to a new branch |(% style="width:599px" %)((( 177 -the {branch} must be replaced by the name of the branch destination. 178 - 179 -eg : 180 - 181 - /rest/git/checkout/newBranch 182 -)))|(% style="width:449px" %)((( 183 -it returns a "success" message of the branch creation. 184 - 185 -eg : 186 - 187 -{{code language="JSON"}} 188 -{ 189 - "timestamp": 1620229625932, 190 - "status": "200", 191 - "data": "new branch has been created : newBranch" 192 -} 193 -{{/code}} 194 -))) 195 -|(% 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"}}{ 196 -"files": 197 -[ 198 -{"fileName" : "newFile.xml"}, 199 -{"fileName" : "/dir/modifiedFile.pdf"} 200 -] 201 -}{{/code}}|(% style="width:449px" %)((( 202 -it returns a "success" message. 203 - 204 -eg : 205 - 206 -{{code language="JSON"}} 207 -{ 208 - "timestamp": 1620229625932, 209 - "status": "200", 210 - "data": "the selected files has been synchronized to HEAD successfully !" 211 -} 212 -{{/code}} 213 -))) 214 - 215 -= Errors = 216 - 217 -below, you can find an example of technical and functional errors : 218 - 219 -{{code language="JSON"}} 220 -{ 221 - "timestamp": 1620221672951, 222 - "status": "500", 223 - "error": "JSON file is not valid", 224 - "thechnicalError": "JSONObject[\"fileName\"] not found." 225 -} 226 -{{/code}} 227 - 228 -the functional error is shown with the JSON key "error", while technical error is stored in the "thechnicalError" key. 229 - 230 - 231 231 == ==
- TrackingTypes.json
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.aelkari - Size
-
... ... @@ -1,1 +1,0 @@ 1 -4.8 KB - Content
-
... ... @@ -1,151 +1,0 @@ 1 -{ 2 - "timestamp": 1637833049208, 3 - "status": "200", 4 - "data": [ 5 - { 6 - "trkTypeID": null, 7 - "alias": "orderLine", 8 - "env": "iXPath", 9 - "label": { 10 - "fr": "Commande", 11 - "en": "Order" 12 - }, 13 - "dataTypes": [ 14 - { 15 - "alias": "orderLineNumber", 16 - "label": { 17 - "fr": "Numéro de commande", 18 - "en": "Order Number" 19 - }, 20 - "type": "NUMBER", 21 - "trackingType": null, 22 - "size": 10, 23 - "format": null, 24 - "defaultValue": null, 25 - "mandatory": true, 26 - "list": false 27 - }, 28 - { 29 - "alias": "Column1", 30 - "label": { 31 - "fr": "Column 1", 32 - "en": "C1" 33 - }, 34 - "type": "TRACKING", 35 - "trackingType": "comment", 36 - "size": null, 37 - "format": null, 38 - "defaultValue": null, 39 - "mandatory": false, 40 - "list": false 41 - } 42 - ] 43 - }, 44 - { 45 - "trkTypeID": null, 46 - "alias": "order", 47 - "env": "iXPath", 48 - "label": { 49 - "fr": "Commande", 50 - "en": "Order" 51 - }, 52 - "dataTypes": [ 53 - { 54 - "alias": "orderNumber", 55 - "label": { 56 - "fr": "Numéro de commande", 57 - "en": "Order Number" 58 - }, 59 - "type": "NUMBER", 60 - "trackingType": null, 61 - "size": 10, 62 - "format": null, 63 - "defaultValue": null, 64 - "mandatory": true, 65 - "list": false 66 - }, 67 - { 68 - "alias": "creationDate", 69 - "label": { 70 - "fr": "Date de création", 71 - "en": "Creation Date" 72 - }, 73 - "type": "DATE", 74 - "trackingType": null, 75 - "size": null, 76 - "format": "YYYY/MM/DD", 77 - "defaultValue": null, 78 - "mandatory": false, 79 - "list": false 80 - }, 81 - { 82 - "alias": "buyerCode", 83 - "label": { 84 - "fr": "Code fournisseur", 85 - "en": "Code fournisseur" 86 - }, 87 - "type": "STRING", 88 - "trackingType": null, 89 - "size": null, 90 - "format": null, 91 - "defaultValue": "01", 92 - "mandatory": false, 93 - "list": false 94 - }, 95 - { 96 - "alias": "orderLine", 97 - "label": { 98 - "fr": "Ligne de commande", 99 - "en": "Order Lines" 100 - }, 101 - "type": "TRACKING", 102 - "trackingType": "orderLine", 103 - "size": null, 104 - "format": null, 105 - "defaultValue": null, 106 - "mandatory": true, 107 - "list": false 108 - } 109 - ] 110 - }, 111 - { 112 - "trkTypeID": null, 113 - "alias": "comment", 114 - "env": "iXPath", 115 - "label": { 116 - "fr": "Commande", 117 - "en": "Order" 118 - }, 119 - "dataTypes": [ 120 - { 121 - "alias": "description1", 122 - "label": { 123 - "fr": "Comment 1", 124 - "en": "Order Number" 125 - }, 126 - "type": "STRING", 127 - "trackingType": null, 128 - "size": 10, 129 - "format": null, 130 - "defaultValue": null, 131 - "mandatory": false, 132 - "list": false 133 - }, 134 - { 135 - "alias": "description2", 136 - "label": { 137 - "fr": "Column 1", 138 - "en": "C1" 139 - }, 140 - "type": "STRING", 141 - "trackingType": null, 142 - "size": null, 143 - "format": null, 144 - "defaultValue": null, 145 - "mandatory": false, 146 - "list": false 147 - } 148 - ] 149 - } 150 - ] 151 -}