<
From version < 7.1 >
edited by Achraf El Kari
on 2021/11/23 09:57
To version < 9.2 >
edited by Achraf El Kari
on 2021/11/25 11:26
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -8,22 +8,48 @@
8 8  
9 9  = Endpoints =
10 10  
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 - "timestamp": 1620216790744,
14 - "status": "200",
15 - "data": [
16 - {
17 - "fileName": "FileToF.txt",
18 - "status": "Untracked"
19 - },
20 - {
21 - "fileName": "newfile.txt",
22 - "status": "Modified"
23 - }
24 - ]
25 -}{{/code}}
26 -|(% 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"}}{
11 +**PS:** __//For all those endpoints, the env params are mandatory on the header, otherwise you got an error 400 (BAD PARAMS).//__
12 +
13 +
14 +|(% style="width:202px" %)**URL [method]**|(% style="width:126px" %)**Description**|(% style="width:250px" %)**Input example**|(% style="width:449px" %)**Output example**
15 +|(% style="width:202px" %)(((
16 +/rest/trackingType [GET]
17 +
18 +
19 +hedear : Authorization + env => Mandatory
20 +
21 +)))|(% style="width:126px" %)(((
22 +get **all **tracking Types of the giving environment ==>
23 +
24 +order, orderLine...
25 +)))|(% style="width:250px" %)(no input required)|(% style="width:449px" %)[[attach:TrackingTypes.json||target="_blank"]]
26 +|(% style="width:202px" %)/rest/trackingType [POST]|(% style="width:126px" %)Insert or update new TrackingType|(% style="width:250px" %){{code language="json"}}{
27 +  "alias": "order",
28 +  "env": "iXPath",
29 +  "label": {
30 +    "fr": "Commande de Merde",
31 +    "en": "Order"
32 +  },
33 +  "dataTypes": [
34 +    {
35 +      "alias": "orderNumber",
36 +      "label": {
37 +        "fr": "Numéro de commande",
38 +        "en": "Order Number"
39 +      },
40 +    {
41 +      "alias": "orderLine",
42 +      "label": {
43 +        "fr": "Ligne de commande",
44 +        "en": "Order Lines"
45 +      },
46 +      "type": "TRACKING",
47 +      "trackingType": "orderLine",
48 +      "mandatory": true,
49 +      "isList": false
50 +    }
51 +  ]
52 +}{{/code}}|(% style="width:449px" %){{code language="JSON"}}{
27 27   "timestamp": 1620217014704,
28 28   "status": "200",
29 29   "data": [
... ... @@ -43,7 +43,7 @@
43 43   }
44 44   ]
45 45  }{{/code}}
46 -|(% style="width:166px" %)/rest/git/commit [POST]|(% style="width:189px" %)commit changes in files with a message|(% style="width:383px" %){{code language="JSON"}}{
72 +|(% style="width:202px" %)/rest/git/commit [POST]|(% style="width:126px" %)commit changes in files with a message|(% style="width:250px" %){{code language="JSON"}}{
47 47  "files":
48 48  [
49 49  {"fileName" : "newFile.xml"},
... ... @@ -61,23 +61,19 @@
61 61   "data": "this is a commit message"
62 62  }{{/code}}
63 63  )))
64 -|(% style="width:166px" %)(((
90 +|(% style="width:202px" %)(((
65 65  /rest/git/switchComit/{id}
66 66  
67 67  [GET]
68 -)))|(% style="width:189px" %)(((
94 +)))|(% style="width:126px" %)(((
69 69  switch to a certain version and return the history of all commits.
70 70  
71 71  **__NB __**: if there are some modified files in the current version, these files will be moved to a new directory called :
72 72  
73 73  .../archive/git-{timestamp}
74 -)))|(% style="width:383px" %)(((
75 -the {id} in the URL should be replaced by the id of the wanted commit.
100 +)))|(% style="width:250px" %)(((
101 +
76 76  
77 -eg :
78 -
79 -rest/git/switchComit/4b64d02451f47d9cb91d08faa986c941deef0f5c
80 -
81 81  
82 82  )))|(% style="width:449px" %)(((
83 83  {{code language="JSON"}}
... ... @@ -103,9 +103,9 @@
103 103  }
104 104  {{/code}}
105 105  )))
106 -|(% style="width:166px" %)/rest/git/update [GET]|(% style="width:189px" %)(((
128 +|(% style="width:202px" %)/rest/git/update [GET]|(% style="width:126px" %)(((
107 107  Integrates and pulls changes from a remote repository into the current branch.
108 -)))|(% style="width:383px" %)(no input required)|(% style="width:449px" %)(((
130 +)))|(% style="width:250px" %)(no input required)|(% style="width:449px" %)(((
109 109  it returns a success message.
110 110  
111 111  eg :
... ... @@ -118,13 +118,13 @@
118 118  }
119 119  {{/code}}
120 120  )))
121 -|(% style="width:166px" %)/rest/environment/init [POST]|(% style="width:189px" %)(((
143 +|(% style="width:202px" %)/rest/environment/init [POST]|(% style="width:126px" %)(((
122 122  Clone a git repository into the directory of the current environment,
123 123  
124 124  if it doesn't exist it creates a new directory and initialize the repo,
125 125  
126 126  if the directory exists, the endpoint renames the directory and creates a new one and clones the repository.
127 -)))|(% style="width:383px" %)(no input required)|(% style="width:449px" %)(((
149 +)))|(% style="width:250px" %)(no input required)|(% style="width:449px" %)(((
128 128  it returns a "success" message :
129 129  
130 130  eg :
... ... @@ -137,7 +137,7 @@
137 137  }
138 138  {{/code}}
139 139  )))
140 -|(% style="width:166px" %)/rest/git/checkout/{branch} [POST]|(% style="width:189px" %)switch to a certain branch|(% style="width:383px" %)(((
162 +|(% style="width:202px" %)/rest/git/checkout/{branch} [POST]|(% style="width:126px" %)switch to a certain branch|(% style="width:250px" %)(((
141 141  the {branch} must be replaced by the name of the branch destination.
142 142  
143 143  eg : /rest/git/checkout/master
... ... @@ -156,11 +156,11 @@
156 156  }
157 157  {{/code}}
158 158  )))
159 -|(% style="width:166px" %)(((
181 +|(% style="width:202px" %)(((
160 160  /rest/git/newbranch/{branch}
161 161  
162 162  [POST]
163 -)))|(% style="width:189px" %)create and switch to a new branch |(% style="width:383px" %)(((
185 +)))|(% style="width:126px" %)create and switch to a new branch |(% style="width:250px" %)(((
164 164  the {branch} must be replaced by the name of the branch destination.
165 165  
166 166  eg :
... ... @@ -179,13 +179,7 @@
179 179  }
180 180  {{/code}}
181 181  )))
182 -|(% style="width:166px" %)/rest/git/revert [POST]|(% style="width:189px" %)switch the modified file to the initial head version. |(% style="width:383px" %){{code language="JSON"}}{
183 -"files":
184 -[
185 -{"fileName" : "newFile.xml"},
186 -{"fileName" : "/dir/modifiedFile.pdf"}
187 -]
188 -}{{/code}}|(% style="width:449px" %)(((
204 +|(% style="width:202px" %)/rest/git/revert [POST]|(% style="width:126px" %)switch the modified file to the initial head version. |(% style="width:250px" %) |(% style="width:449px" %)(((
189 189  it returns a "success" message.
190 190  
191 191  eg :
TrackingTypes.json
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.aelkari
Size
... ... @@ -1,0 +1,1 @@
1 +4.8 KB
Content
... ... @@ -1,0 +1,151 @@
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 +}
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian