JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 1 | { |
| 2 | "info": { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 3 | "_postman_id": "e864733f-4781-45b6-8ea2-0b841a703dae", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 4 | "name": "CPS-CORE", |
| 5 | "description": "A collection of the endpoints in CPS-CORE. This is not an exhaustive collection but captures the main functionality.\n\nTo perform this functionality execute the API calls in order to create a dataspace, schema set (file is provided), anchor, and data node. Then GET the nodes to retrieve the information. The APIs in CPS-ADMIN can be used after initial POST requests.\n\nbookstore-model.yang can be found at cps/postman-collections/bookstore-model.yang", |
| 6 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", |
| 7 | "_exporter_id": "17907116" |
| 8 | }, |
| 9 | "item": [ |
| 10 | { |
| 11 | "name": "CPS-ADMIN", |
| 12 | "item": [ |
| 13 | { |
| 14 | "name": "Get all dataspaces", |
| 15 | "request": { |
| 16 | "method": "GET", |
| 17 | "header": [ |
| 18 | { |
| 19 | "key": "Accept", |
| 20 | "value": "application/json" |
| 21 | } |
| 22 | ], |
| 23 | "url": { |
| 24 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/admin/dataspaces", |
| 25 | "protocol": "http", |
| 26 | "host": [ |
| 27 | "{{CPS_HOST}}" |
| 28 | ], |
| 29 | "port": "{{CPS_PORT}}", |
| 30 | "path": [ |
| 31 | "cps", |
| 32 | "api", |
| 33 | "v2", |
| 34 | "admin", |
| 35 | "dataspaces" |
| 36 | ] |
| 37 | }, |
| 38 | "description": "Read all dataspaces" |
| 39 | }, |
| 40 | "response": [] |
| 41 | }, |
| 42 | { |
| 43 | "name": "Get a dataspace", |
| 44 | "request": { |
| 45 | "method": "GET", |
| 46 | "header": [ |
| 47 | { |
| 48 | "key": "Accept", |
| 49 | "value": "application/json" |
| 50 | } |
| 51 | ], |
| 52 | "url": { |
| 53 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/admin/dataspaces/my-store", |
| 54 | "protocol": "http", |
| 55 | "host": [ |
| 56 | "{{CPS_HOST}}" |
| 57 | ], |
| 58 | "port": "{{CPS_PORT}}", |
| 59 | "path": [ |
| 60 | "cps", |
| 61 | "api", |
| 62 | "v2", |
| 63 | "admin", |
| 64 | "dataspaces", |
| 65 | "my-store" |
| 66 | ] |
| 67 | }, |
| 68 | "description": "Read a dataspace given a dataspace name" |
| 69 | }, |
| 70 | "response": [] |
| 71 | }, |
| 72 | { |
| 73 | "name": "Get anchors", |
| 74 | "request": { |
| 75 | "method": "GET", |
| 76 | "header": [ |
| 77 | { |
| 78 | "key": "Accept", |
| 79 | "value": "application/json" |
| 80 | } |
| 81 | ], |
| 82 | "url": { |
| 83 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors", |
| 84 | "protocol": "http", |
| 85 | "host": [ |
| 86 | "{{CPS_HOST}}" |
| 87 | ], |
| 88 | "port": "{{CPS_PORT}}", |
| 89 | "path": [ |
| 90 | "cps", |
| 91 | "api", |
| 92 | "v2", |
| 93 | "dataspaces", |
| 94 | "my-store", |
| 95 | "anchors" |
| 96 | ] |
| 97 | }, |
| 98 | "description": "Read all anchors, given a dataspace" |
| 99 | }, |
| 100 | "response": [] |
| 101 | }, |
| 102 | { |
| 103 | "name": "Get an anchor", |
| 104 | "request": { |
| 105 | "method": "GET", |
| 106 | "header": [ |
| 107 | { |
| 108 | "key": "Accept", |
| 109 | "value": "application/json" |
| 110 | } |
| 111 | ], |
| 112 | "url": { |
| 113 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor", |
| 114 | "protocol": "http", |
| 115 | "host": [ |
| 116 | "{{CPS_HOST}}" |
| 117 | ], |
| 118 | "port": "{{CPS_PORT}}", |
| 119 | "path": [ |
| 120 | "cps", |
| 121 | "api", |
| 122 | "v2", |
| 123 | "dataspaces", |
| 124 | "my-store", |
| 125 | "anchors", |
| 126 | "bookstore-anchor" |
| 127 | ] |
| 128 | }, |
| 129 | "description": "Read all anchors, given a dataspace" |
| 130 | }, |
| 131 | "response": [] |
| 132 | }, |
| 133 | { |
| 134 | "name": "Get schema sets", |
| 135 | "request": { |
| 136 | "method": "GET", |
| 137 | "header": [ |
| 138 | { |
| 139 | "key": "Accept", |
| 140 | "value": "application/json" |
| 141 | } |
| 142 | ], |
| 143 | "url": { |
| 144 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets", |
| 145 | "protocol": "http", |
| 146 | "host": [ |
| 147 | "{{CPS_HOST}}" |
| 148 | ], |
| 149 | "port": "{{CPS_PORT}}", |
| 150 | "path": [ |
| 151 | "cps", |
| 152 | "api", |
| 153 | "v2", |
| 154 | "dataspaces", |
| 155 | "my-store", |
| 156 | "schema-sets" |
| 157 | ] |
| 158 | }, |
| 159 | "description": "Read all schema sets, given a dataspace" |
| 160 | }, |
| 161 | "response": [] |
| 162 | }, |
| 163 | { |
| 164 | "name": "Get a schema set", |
| 165 | "request": { |
| 166 | "method": "GET", |
| 167 | "header": [ |
| 168 | { |
| 169 | "key": "Accept", |
| 170 | "value": "application/json" |
| 171 | } |
| 172 | ], |
| 173 | "url": { |
| 174 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets/stores-module", |
| 175 | "protocol": "http", |
| 176 | "host": [ |
| 177 | "{{CPS_HOST}}" |
| 178 | ], |
| 179 | "port": "{{CPS_PORT}}", |
| 180 | "path": [ |
| 181 | "cps", |
| 182 | "api", |
| 183 | "v2", |
| 184 | "dataspaces", |
| 185 | "my-store", |
| 186 | "schema-sets", |
| 187 | "stores-module" |
| 188 | ] |
| 189 | }, |
| 190 | "description": "Read a schema set given a schema set name and a dataspace" |
| 191 | }, |
| 192 | "response": [] |
| 193 | } |
| 194 | ], |
| 195 | "description": "Some endpoints of CPS-ADMIN not mentioed in the CPS-CORE folder" |
| 196 | }, |
| 197 | { |
| 198 | "name": "Create Dataspace", |
| 199 | "request": { |
| 200 | "method": "POST", |
| 201 | "header": [], |
| 202 | "url": { |
| 203 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces?dataspace-name=my-store", |
| 204 | "protocol": "http", |
| 205 | "host": [ |
| 206 | "{{CPS_HOST}}" |
| 207 | ], |
| 208 | "port": "{{CPS_PORT}}", |
| 209 | "path": [ |
| 210 | "cps", |
| 211 | "api", |
| 212 | "v2", |
| 213 | "dataspaces" |
| 214 | ], |
| 215 | "query": [ |
| 216 | { |
| 217 | "key": "dataspace-name", |
| 218 | "value": "my-store" |
| 219 | } |
| 220 | ] |
| 221 | } |
| 222 | }, |
| 223 | "response": [] |
| 224 | }, |
| 225 | { |
| 226 | "name": "Create Schema Set", |
| 227 | "request": { |
| 228 | "method": "POST", |
| 229 | "header": [ |
| 230 | { |
| 231 | "key": "Content-Type", |
| 232 | "value": "multipart/form-data", |
| 233 | "type": "text", |
| 234 | "disabled": true |
| 235 | } |
| 236 | ], |
| 237 | "body": { |
| 238 | "mode": "formdata", |
| 239 | "formdata": [ |
| 240 | { |
| 241 | "key": "file", |
| 242 | "type": "file", |
| 243 | "src": "cps/postman-collections/bookstore.zip" |
| 244 | } |
| 245 | ] |
| 246 | }, |
| 247 | "url": { |
| 248 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets?schema-set-name=stores-module", |
| 249 | "protocol": "http", |
| 250 | "host": [ |
| 251 | "{{CPS_HOST}}" |
| 252 | ], |
| 253 | "port": "{{CPS_PORT}}", |
| 254 | "path": [ |
| 255 | "cps", |
| 256 | "api", |
| 257 | "v2", |
| 258 | "dataspaces", |
| 259 | "my-store", |
| 260 | "schema-sets" |
| 261 | ], |
| 262 | "query": [ |
| 263 | { |
| 264 | "key": "schema-set-name", |
| 265 | "value": "stores-module" |
| 266 | } |
| 267 | ] |
| 268 | }, |
| 269 | "description": "Make sure in the body there is form data. key = file and value will be the zip/yang file." |
| 270 | }, |
| 271 | "response": [] |
| 272 | }, |
| 273 | { |
| 274 | "name": "Create Anchor", |
| 275 | "request": { |
| 276 | "method": "POST", |
| 277 | "header": [], |
| 278 | "url": { |
| 279 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors?schema-set-name=stores-module&anchor-name=bookstore-anchor", |
| 280 | "protocol": "http", |
| 281 | "host": [ |
| 282 | "{{CPS_HOST}}" |
| 283 | ], |
| 284 | "port": "{{CPS_PORT}}", |
| 285 | "path": [ |
| 286 | "cps", |
| 287 | "api", |
| 288 | "v2", |
| 289 | "dataspaces", |
| 290 | "my-store", |
| 291 | "anchors" |
| 292 | ], |
| 293 | "query": [ |
| 294 | { |
| 295 | "key": "schema-set-name", |
| 296 | "value": "stores-module" |
| 297 | }, |
| 298 | { |
| 299 | "key": "anchor-name", |
| 300 | "value": "bookstore-anchor" |
| 301 | } |
| 302 | ] |
| 303 | } |
| 304 | }, |
| 305 | "response": [] |
| 306 | }, |
| 307 | { |
| 308 | "name": "Create DataNodes", |
| 309 | "request": { |
| 310 | "method": "POST", |
| 311 | "header": [], |
| 312 | "body": { |
| 313 | "mode": "raw", |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 314 | "raw": "{\n \"bookstore-address\": [\n {\n \"bookstore-name\": \"Easons\",\n \"address\": \"Dublin,Ireland\",\n \"postal-code\": \"D02HA21\"\n }\n ],\n \"bookstore\": {\n \"bookstore-name\": \"Easons\",\n \"premises\": {\n \"addresses\": [\n {\n \"house-number\": 2,\n \"street\": \"Main Street\",\n \"town\": \"Maynooth\",\n \"county\": \"Kildare\"\n },\n {\n \"house-number\": 24,\n \"street\": \"Grafton Street\",\n \"town\": \"Dublin\",\n \"county\": \"Dublin\"\n }\n ]\n },\n \"categories\": [\n {\n \"code\": 1,\n \"name\": \"Children\",\n \"books\" : [\n {\n \"title\": \"Matilda\",\n \"lang\": \"English\",\n \"authors\": [\"Roald Dahl\"],\n \"editions\": [1988, 2000],\n \"price\": 20\n },\n {\n \"title\": \"The Gruffalo\",\n \"lang\": \"English\",\n \"authors\": [\"Julia Donaldson\"],\n \"editions\": [1999],\n \"price\": 15\n }\n ]\n },\n {\n \"code\": 2,\n \"name\": \"Thriller\",\n \"books\" : [\n {\n \"title\": \"Annihilation\",\n \"lang\": \"English\",\n \"authors\": [\"Jeff VanderMeer\"],\n \"editions\": [2014],\n \"price\": 15\n }\n ]\n },\n {\n \"code\": 3,\n \"name\": \"Comedy\",\n \"books\" : [\n {\n \"title\": \"Good Omens\",\n \"lang\": \"English\",\n \"authors\": [\"Neil Gaiman\", \"Terry Pratchett\"],\n \"editions\": [2006],\n \"price\": 13\n },\n {\n \"title\": \"The Colour of Magic\",\n \"lang\": \"English\",\n \"authors\": [\"Terry Pratchett\"],\n \"editions\": [1983],\n \"price\": 12\n },\n {\n \"title\": \"The Light Fantastic\",\n \"lang\": \"English\",\n \"authors\": [\"Terry Pratchett\"],\n \"editions\": [1986],\n \"price\": 14\n },\n {\n \"title\": \"A Book with No Language\",\n \"lang\": \"\",\n \"authors\": [\"Joe Bloggs\"],\n \"editions\": [2023],\n \"price\": 20\n }\n ]\n },\n {\n \"code\": 4,\n \"name\": \"Computing\",\n \"books\" : [\n {\n \"title\": \"Debian GNU/Linux\",\n \"lang\": \"German\",\n \"authors\": [\"Peter H. Ganten\", \"Wulf Alex\"],\n \"editions\": [2007, 2013, 2021],\n \"price\": 39\n },\n {\n \"title\": \"Logarithm tables\",\n \"lang\": \"N/A\",\n \"authors\": [\"Joe Bloggs\"],\n \"editions\": [2009],\n \"price\": 11\n }\n ]\n },\n {\n \"code\": 5,\n \"name\": \"Discount books\",\n \"books\" : [\n {\n \"title\": \"Book 1\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 1\n },\n {\n \"title\": \"Book 2\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 2\n },\n {\n \"title\": \"Book 3\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 3\n },\n {\n \"title\": \"Book 4\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 4\n },\n {\n \"title\": \"Book 5\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 5\n },\n {\n \"title\": \"Book 6\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 6\n },\n {\n \"title\": \"Book 7\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 7\n },\n {\n \"title\": \"Book 8\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 8\n },\n {\n \"title\": \"Book 9\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 9\n },\n {\n \"title\": \"Book 10\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 10\n }\n ]\n }\n ]\n }\n}\n", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 315 | "options": { |
| 316 | "raw": { |
| 317 | "language": "json" |
| 318 | } |
| 319 | } |
| 320 | }, |
| 321 | "url": { |
| 322 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes", |
| 323 | "protocol": "http", |
| 324 | "host": [ |
| 325 | "{{CPS_HOST}}" |
| 326 | ], |
| 327 | "port": "{{CPS_PORT}}", |
| 328 | "path": [ |
| 329 | "cps", |
| 330 | "api", |
| 331 | "v2", |
| 332 | "dataspaces", |
| 333 | "my-store", |
| 334 | "anchors", |
| 335 | "bookstore-anchor", |
| 336 | "nodes" |
| 337 | ] |
| 338 | } |
| 339 | }, |
| 340 | "response": [] |
| 341 | }, |
| 342 | { |
| 343 | "name": "Get Root Node All Descendants", |
| 344 | "request": { |
| 345 | "method": "GET", |
| 346 | "header": [], |
| 347 | "url": { |
| 348 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/&descendants=all", |
| 349 | "protocol": "http", |
| 350 | "host": [ |
| 351 | "{{CPS_HOST}}" |
| 352 | ], |
| 353 | "port": "{{CPS_PORT}}", |
| 354 | "path": [ |
| 355 | "cps", |
| 356 | "api", |
| 357 | "v2", |
| 358 | "dataspaces", |
| 359 | "my-store", |
| 360 | "anchors", |
| 361 | "bookstore-anchor", |
| 362 | "node" |
| 363 | ], |
| 364 | "query": [ |
| 365 | { |
| 366 | "key": "xpath", |
| 367 | "value": "/" |
| 368 | }, |
| 369 | { |
| 370 | "key": "descendants", |
| 371 | "value": "all" |
| 372 | } |
| 373 | ] |
| 374 | } |
| 375 | }, |
| 376 | "response": [] |
| 377 | }, |
| 378 | { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 379 | "name": "Get Node Categories No Descendants", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 380 | "request": { |
| 381 | "method": "GET", |
| 382 | "header": [], |
| 383 | "url": { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 384 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/categories&descendants=none", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 385 | "protocol": "http", |
| 386 | "host": [ |
| 387 | "{{CPS_HOST}}" |
| 388 | ], |
| 389 | "port": "{{CPS_PORT}}", |
| 390 | "path": [ |
| 391 | "cps", |
| 392 | "api", |
| 393 | "v2", |
| 394 | "dataspaces", |
| 395 | "my-store", |
| 396 | "anchors", |
| 397 | "bookstore-anchor", |
| 398 | "node" |
| 399 | ], |
| 400 | "query": [ |
| 401 | { |
| 402 | "key": "xpath", |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 403 | "value": "/bookstore/categories" |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 404 | }, |
| 405 | { |
| 406 | "key": "descendants", |
| 407 | "value": "none" |
| 408 | } |
| 409 | ] |
| 410 | } |
| 411 | }, |
| 412 | "response": [] |
| 413 | }, |
| 414 | { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 415 | "name": "Get Node Premises All Descendants", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 416 | "request": { |
| 417 | "method": "GET", |
| 418 | "header": [], |
| 419 | "url": { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 420 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/premises&descendants=all", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 421 | "protocol": "http", |
| 422 | "host": [ |
| 423 | "{{CPS_HOST}}" |
| 424 | ], |
| 425 | "port": "{{CPS_PORT}}", |
| 426 | "path": [ |
| 427 | "cps", |
| 428 | "api", |
| 429 | "v2", |
| 430 | "dataspaces", |
| 431 | "my-store", |
| 432 | "anchors", |
| 433 | "bookstore-anchor", |
| 434 | "node" |
| 435 | ], |
| 436 | "query": [ |
| 437 | { |
| 438 | "key": "xpath", |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 439 | "value": "/bookstore/premises" |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 440 | }, |
| 441 | { |
| 442 | "key": "descendants", |
| 443 | "value": "all" |
| 444 | } |
| 445 | ] |
| 446 | } |
| 447 | }, |
| 448 | "response": [] |
| 449 | }, |
| 450 | { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 451 | "name": "Get Node Categories with code 2 Direct Descendants", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 452 | "request": { |
| 453 | "method": "GET", |
| 454 | "header": [], |
| 455 | "url": { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 456 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/categories[@code='2']&descendants=direct", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 457 | "protocol": "http", |
| 458 | "host": [ |
| 459 | "{{CPS_HOST}}" |
| 460 | ], |
| 461 | "port": "{{CPS_PORT}}", |
| 462 | "path": [ |
| 463 | "cps", |
| 464 | "api", |
| 465 | "v2", |
| 466 | "dataspaces", |
| 467 | "my-store", |
| 468 | "anchors", |
| 469 | "bookstore-anchor", |
| 470 | "node" |
| 471 | ], |
| 472 | "query": [ |
| 473 | { |
| 474 | "key": "xpath", |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 475 | "value": "/bookstore/categories[@code='2']" |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 476 | }, |
| 477 | { |
| 478 | "key": "descendants", |
| 479 | "value": "direct" |
| 480 | } |
| 481 | ] |
| 482 | } |
| 483 | }, |
| 484 | "response": [] |
| 485 | }, |
| 486 | { |
| 487 | "name": "Query Path Leaf Condition All Descendants", |
| 488 | "request": { |
| 489 | "method": "GET", |
| 490 | "header": [], |
| 491 | "url": { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 492 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes/query?cps-path=/bookstore/categories[@name=\"Discount books\"]&descendants=-1", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 493 | "protocol": "http", |
| 494 | "host": [ |
| 495 | "{{CPS_HOST}}" |
| 496 | ], |
| 497 | "port": "{{CPS_PORT}}", |
| 498 | "path": [ |
| 499 | "cps", |
| 500 | "api", |
| 501 | "v2", |
| 502 | "dataspaces", |
| 503 | "my-store", |
| 504 | "anchors", |
| 505 | "bookstore-anchor", |
| 506 | "nodes", |
| 507 | "query" |
| 508 | ], |
| 509 | "query": [ |
| 510 | { |
| 511 | "key": "cps-path", |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 512 | "value": "/bookstore/categories[@name=\"Discount books\"]" |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 513 | }, |
| 514 | { |
| 515 | "key": "descendants", |
| 516 | "value": "-1" |
| 517 | } |
| 518 | ] |
| 519 | } |
| 520 | }, |
| 521 | "response": [] |
| 522 | }, |
| 523 | { |
| 524 | "name": "Query Path Ancestor No Descendants", |
| 525 | "request": { |
| 526 | "method": "GET", |
| 527 | "header": [], |
| 528 | "url": { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 529 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes/query?cps-path=//books[@lang=\"German\"]/ancestor::categories&descendants=0", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 530 | "protocol": "http", |
| 531 | "host": [ |
| 532 | "{{CPS_HOST}}" |
| 533 | ], |
| 534 | "port": "{{CPS_PORT}}", |
| 535 | "path": [ |
| 536 | "cps", |
| 537 | "api", |
| 538 | "v2", |
| 539 | "dataspaces", |
| 540 | "my-store", |
| 541 | "anchors", |
| 542 | "bookstore-anchor", |
| 543 | "nodes", |
| 544 | "query" |
| 545 | ], |
| 546 | "query": [ |
| 547 | { |
| 548 | "key": "cps-path", |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 549 | "value": "//books[@lang=\"German\"]/ancestor::categories" |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 550 | }, |
| 551 | { |
| 552 | "key": "descendants", |
| 553 | "value": "0" |
| 554 | } |
| 555 | ] |
| 556 | } |
| 557 | }, |
| 558 | "response": [] |
| 559 | }, |
| 560 | { |
| 561 | "name": "Patch Nodes", |
| 562 | "request": { |
| 563 | "method": "PATCH", |
| 564 | "header": [], |
| 565 | "body": { |
| 566 | "mode": "raw", |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 567 | "raw": "{\r\n \"bookstore\": {\r\n \"bookstore-name\": \"Chapters\"\r\n }\r\n}", |
| 568 | "options": { |
| 569 | "raw": { |
| 570 | "language": "json" |
| 571 | } |
| 572 | } |
| 573 | }, |
| 574 | "url": { |
| 575 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/", |
| 576 | "protocol": "http", |
| 577 | "host": [ |
| 578 | "{{CPS_HOST}}" |
| 579 | ], |
| 580 | "port": "{{CPS_PORT}}", |
| 581 | "path": [ |
| 582 | "cps", |
| 583 | "api", |
| 584 | "v2", |
| 585 | "dataspaces", |
| 586 | "my-store", |
| 587 | "anchors", |
| 588 | "bookstore-anchor", |
| 589 | "nodes" |
| 590 | ], |
| 591 | "query": [ |
| 592 | { |
| 593 | "key": "xpath", |
| 594 | "value": "/" |
| 595 | } |
| 596 | ] |
| 597 | } |
| 598 | }, |
| 599 | "response": [] |
| 600 | }, |
| 601 | { |
| 602 | "name": "Put Nodes", |
| 603 | "request": { |
| 604 | "method": "PUT", |
| 605 | "header": [], |
| 606 | "body": { |
| 607 | "mode": "raw", |
| 608 | "raw": "\r\n {\r\n \"premises\": {\r\n \"addresses\": [\r\n {\r\n \"town\": \"Maynooth\",\r\n \"county\": \"Kildare\",\r\n \"street\": \"Main Street\",\r\n \"house-number\": 2\r\n },\r\n {\r\n \"town\": \"Dublin\",\r\n \"county\": \"Dublin\",\r\n \"street\": \"Grafton Street\",\r\n \"house-number\": 24\r\n },\r\n {\r\n \"house-number\": 13,\r\n \"street\": \"Church Street\",\r\n \"town\": \"Athlone\",\r\n \"county\": \"Westmeath\"\r\n }\r\n ]\r\n }\r\n }\r\n", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 609 | "options": { |
| 610 | "raw": { |
| 611 | "language": "json" |
| 612 | } |
| 613 | } |
| 614 | }, |
| 615 | "url": { |
| 616 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/bookstore", |
| 617 | "protocol": "http", |
| 618 | "host": [ |
| 619 | "{{CPS_HOST}}" |
| 620 | ], |
| 621 | "port": "{{CPS_PORT}}", |
| 622 | "path": [ |
| 623 | "cps", |
| 624 | "api", |
| 625 | "v2", |
| 626 | "dataspaces", |
| 627 | "my-store", |
| 628 | "anchors", |
| 629 | "bookstore-anchor", |
| 630 | "nodes" |
| 631 | ], |
| 632 | "query": [ |
| 633 | { |
| 634 | "key": "xpath", |
| 635 | "value": "/bookstore" |
| 636 | } |
| 637 | ] |
| 638 | } |
| 639 | }, |
| 640 | "response": [] |
| 641 | }, |
| 642 | { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 643 | "name": "Get Node Premises Direct Descendants", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 644 | "request": { |
| 645 | "method": "GET", |
| 646 | "header": [], |
| 647 | "url": { |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 648 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/premises&descendants=1", |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 649 | "protocol": "http", |
| 650 | "host": [ |
| 651 | "{{CPS_HOST}}" |
| 652 | ], |
| 653 | "port": "{{CPS_PORT}}", |
| 654 | "path": [ |
| 655 | "cps", |
| 656 | "api", |
| 657 | "v2", |
| 658 | "dataspaces", |
| 659 | "my-store", |
| 660 | "anchors", |
| 661 | "bookstore-anchor", |
| 662 | "node" |
| 663 | ], |
| 664 | "query": [ |
| 665 | { |
| 666 | "key": "xpath", |
JvD_Ericsson | 480f18a | 2024-02-28 15:02:53 +0000 | [diff] [blame] | 667 | "value": "/bookstore/premises" |
JvD_Ericsson | 1cbfc28 | 2024-02-15 11:34:36 +0000 | [diff] [blame] | 668 | }, |
| 669 | { |
| 670 | "key": "descendants", |
| 671 | "value": "1" |
| 672 | } |
| 673 | ] |
| 674 | } |
| 675 | }, |
| 676 | "response": [] |
| 677 | }, |
| 678 | { |
| 679 | "name": "Delete DataNodes", |
| 680 | "request": { |
| 681 | "method": "DELETE", |
| 682 | "header": [], |
| 683 | "url": { |
| 684 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/", |
| 685 | "protocol": "http", |
| 686 | "host": [ |
| 687 | "{{CPS_HOST}}" |
| 688 | ], |
| 689 | "port": "{{CPS_PORT}}", |
| 690 | "path": [ |
| 691 | "cps", |
| 692 | "api", |
| 693 | "v2", |
| 694 | "dataspaces", |
| 695 | "my-store", |
| 696 | "anchors", |
| 697 | "bookstore-anchor", |
| 698 | "nodes" |
| 699 | ], |
| 700 | "query": [ |
| 701 | { |
| 702 | "key": "xpath", |
| 703 | "value": "/" |
| 704 | } |
| 705 | ] |
| 706 | } |
| 707 | }, |
| 708 | "response": [] |
| 709 | }, |
| 710 | { |
| 711 | "name": "Delete Anchor", |
| 712 | "request": { |
| 713 | "method": "DELETE", |
| 714 | "header": [], |
| 715 | "url": { |
| 716 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor", |
| 717 | "protocol": "http", |
| 718 | "host": [ |
| 719 | "{{CPS_HOST}}" |
| 720 | ], |
| 721 | "port": "{{CPS_PORT}}", |
| 722 | "path": [ |
| 723 | "cps", |
| 724 | "api", |
| 725 | "v2", |
| 726 | "dataspaces", |
| 727 | "my-store", |
| 728 | "anchors", |
| 729 | "bookstore-anchor" |
| 730 | ] |
| 731 | } |
| 732 | }, |
| 733 | "response": [] |
| 734 | }, |
| 735 | { |
| 736 | "name": "Delete Schema Set", |
| 737 | "request": { |
| 738 | "method": "DELETE", |
| 739 | "header": [ |
| 740 | { |
| 741 | "key": "Content-Type", |
| 742 | "value": "multipart/form-data", |
| 743 | "type": "text", |
| 744 | "disabled": true |
| 745 | } |
| 746 | ], |
| 747 | "body": { |
| 748 | "mode": "formdata", |
| 749 | "formdata": [ |
| 750 | { |
| 751 | "key": "file", |
| 752 | "type": "file", |
| 753 | "src": "/home/jeff/Downloads/bookstore-model.yang" |
| 754 | } |
| 755 | ] |
| 756 | }, |
| 757 | "url": { |
| 758 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets/stores-module", |
| 759 | "protocol": "http", |
| 760 | "host": [ |
| 761 | "{{CPS_HOST}}" |
| 762 | ], |
| 763 | "port": "{{CPS_PORT}}", |
| 764 | "path": [ |
| 765 | "cps", |
| 766 | "api", |
| 767 | "v2", |
| 768 | "dataspaces", |
| 769 | "my-store", |
| 770 | "schema-sets", |
| 771 | "stores-module" |
| 772 | ] |
| 773 | }, |
| 774 | "description": "Make sure in the body there is form data. key = file and value will be the zip/yang file." |
| 775 | }, |
| 776 | "response": [] |
| 777 | }, |
| 778 | { |
| 779 | "name": "Delete Dataspace", |
| 780 | "request": { |
| 781 | "method": "DELETE", |
| 782 | "header": [], |
| 783 | "url": { |
| 784 | "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces?dataspace-name=my-store", |
| 785 | "protocol": "http", |
| 786 | "host": [ |
| 787 | "{{CPS_HOST}}" |
| 788 | ], |
| 789 | "port": "{{CPS_PORT}}", |
| 790 | "path": [ |
| 791 | "cps", |
| 792 | "api", |
| 793 | "v2", |
| 794 | "dataspaces" |
| 795 | ], |
| 796 | "query": [ |
| 797 | { |
| 798 | "key": "dataspace-name", |
| 799 | "value": "my-store" |
| 800 | } |
| 801 | ] |
| 802 | } |
| 803 | }, |
| 804 | "response": [] |
| 805 | } |
| 806 | ], |
| 807 | "auth": { |
| 808 | "type": "basic", |
| 809 | "basic": [ |
| 810 | { |
| 811 | "key": "password", |
| 812 | "value": "cpsr0cks!", |
| 813 | "type": "string" |
| 814 | }, |
| 815 | { |
| 816 | "key": "username", |
| 817 | "value": "cpsuser", |
| 818 | "type": "string" |
| 819 | } |
| 820 | ] |
| 821 | } |
| 822 | } |