Changes for page DataList Endpoints
Last modified by Outhman Moustaghfir on 2022/06/13 13:17
<
>
edited by Outhman Moustaghfir
on 2021/11/29 15:09
on 2021/11/29 15:09
edited by Outhman Moustaghfir
on 2021/11/29 15:15
on 2021/11/29 15:15
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,10 +1,10 @@ 1 1 = Introduction = 2 2 3 -The endpoints below help in creating, updating 3 +The endpoints below help in creating, updating, deleting, or getting DataLists. 4 4 5 5 = Endpoints = 6 6 7 -All datalists are grouped by the current env rionment.7 +All datalists are grouped by the current environment. 8 8 9 9 |(% style="width:261px" %)**URL [method]**|(% style="width:318px" %)**Description**|(% style="width:405px" %)**Input example**|(% style="width:460px" %)**Output example**|(% style="width:205px" %)**Comments** 10 10 |(% style="width:261px" %)/rest/datalist [GET]|(% style="width:318px" %)get all datalists of the current environment.|(% style="width:405px" %)(no input required)|(% style="width:460px" %)((( ... ... @@ -193,8 +193,8 @@ 193 193 } 194 194 {{/code}} 195 195 )))|(% style="width:205px" %) 196 -|(% style="width:261px" %)/rest/datalist/{alias} [PUT]|(% style="width:318px" %)update an existing datalist by alias|(% style="width:405px" %)((( 197 -to update the adatalist,we need to replace the {alias} bracketsbythe concerned datalist's alias **And **add a JSON body like:196 +|(% style="width:261px" %)/rest/datalist/{alias} [PUT]|(% style="width:318px" %)update an existing datalist by the alias|(% style="width:405px" %)((( 197 +to update the datalist, we need to replace the {alias} brackets with the concerned datalist's alias **And **add a JSON body like: 198 198 199 199 {{code language="json"}} 200 200 { ... ... @@ -231,10 +231,73 @@ 231 231 } 232 232 {{/code}} 233 233 234 -we added a nnew value to datalist's values list.234 +we added a new value to datalist's values list. 235 235 236 236 237 -)))|(% style="width:460px" %) |(% style="width:205px" %)238 - |(% style="width:261px"%)/rest/datalist/{alias}[DELETE]|(% style="width:318px"%)deleteadatalist by alias.|(% style="width:405px"%) |(% style="width:460px" %) |(%style="width:205px" %)237 +)))|(% style="width:460px" %)((( 238 +the response is the object updated to the database. 239 239 240 +{{code language="json"}} 241 +{ 242 + "timestamp": 1638194808497, 243 + "status": "200", 244 + "data": { 245 + "datalistid": null, 246 + "alias": "city", 247 + "label": { 248 + "fr": "Ville", 249 + "en": "City" 250 + }, 251 + "env": "iXPath", 252 + "global": false, 253 + "values": [ 254 + { 255 + "alias": "Casablanca", 256 + "label": { 257 + "fr": "Casablanca", 258 + "en": "Casablanca" 259 + }, 260 + "value": "Casablanca" 261 + }, 262 + { 263 + "alias": "Fez", 264 + "label": { 265 + "fr": "Fes", 266 + "en": "Fez" 267 + }, 268 + "value": "Fez" 269 + }, 270 + { 271 + "alias": "London", 272 + "label": { 273 + "fr": "Londres", 274 + "en": "London" 275 + }, 276 + "value": "london" 277 + } 278 + ] 279 + } 280 +} 281 +{{/code}} 282 +)))|(% style="width:205px" %) 283 +|(% style="width:261px" %)/rest/datalist/{alias} [DELETE]|(% style="width:318px" %)delete a datalist by alias.|(% style="width:405px" %)((( 284 +the {alias} must be replaced by the wanted alias. 285 + 286 +eg : 287 + 288 +/rest/datalist/city 289 + 290 +/rest/datalist/country 291 +)))|(% style="width:460px" %)((( 292 +the response returned is only a message confirming the delete of datalist. 293 + 294 +{{code language="JSON"}} 295 +{ 296 + "timestamp": 1638195209684, 297 + "status": "200", 298 + "data": "dataList removed successfully" 299 +} 300 +{{/code}} 301 +)))|(% style="width:205px" %) 302 + 240 240