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:11
on 2021/11/29 15:11
edited by Outhman Moustaghfir
on 2021/11/29 15:04
on 2021/11/29 15:04
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, deleting ,or getting DataLists.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 ironment.7 +All datalists are grouped by the current envrionment. 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,93 +193,7 @@ 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 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 - 199 -{{code language="json"}} 200 -{ 201 - "alias" : "city", 202 - "label" : { 203 - "fr" : "Ville", 204 - "en" : "City" 205 - }, 206 - "global" : false, 207 - "values" : [ { 208 - "alias" : "Casablanca", 209 - "label" : { 210 - "fr" : "Casablanca", 211 - "en" : "Casablanca" 212 - }, 213 - "value" : "Casablanca" 214 - }, 215 - { 216 - "alias" : "Fez", 217 - "label" : { 218 - "fr" : "Fes", 219 - "en" : "Fez" 220 - }, 221 - "value" : "Fez" 222 - }, 223 - { 224 - "alias" : "London", 225 - "label" : { 226 - "fr" : "Londres", 227 - "en" : "London" 228 - }, 229 - "value" : "london" 230 - }] 231 -} 232 -{{/code}} 233 - 234 -we added a new value to datalist's values list. 235 - 236 - 237 -)))|(% style="width:460px" %)((( 238 -the response is the object updated to the database. 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" %) 196 +|(% style="width:261px" %)/rest/datalist/{alias} [PUT]|(% style="width:318px" %)update an existing datalist by alias|(% style="width:405px" %) |(% style="width:460px" %) |(% style="width:205px" %) 283 283 |(% style="width:261px" %)/rest/datalist/{alias} [DELETE]|(% style="width:318px" %)delete a datalist by alias.|(% style="width:405px" %) |(% style="width:460px" %) |(% style="width:205px" %) 284 284 285 285