3 "_postman_id": "e864733f-4781-45b6-8ea2-0b841a703dae",
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"
14 "name": "Get all dataspaces",
20 "value": "application/json"
24 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/admin/dataspaces",
29 "port": "{{CPS_PORT}}",
38 "description": "Read all dataspaces"
43 "name": "Get a dataspace",
49 "value": "application/json"
53 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/admin/dataspaces/my-store",
58 "port": "{{CPS_PORT}}",
68 "description": "Read a dataspace given a dataspace name"
73 "name": "Get anchors",
79 "value": "application/json"
83 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors",
88 "port": "{{CPS_PORT}}",
98 "description": "Read all anchors, given a dataspace"
103 "name": "Get an anchor",
109 "value": "application/json"
113 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor",
118 "port": "{{CPS_PORT}}",
129 "description": "Read all anchors, given a dataspace"
134 "name": "Get schema sets",
140 "value": "application/json"
144 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets",
149 "port": "{{CPS_PORT}}",
159 "description": "Read all schema sets, given a dataspace"
164 "name": "Get a schema set",
170 "value": "application/json"
174 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets/stores-module",
179 "port": "{{CPS_PORT}}",
190 "description": "Read a schema set given a schema set name and a dataspace"
195 "description": "Some endpoints of CPS-ADMIN not mentioed in the CPS-CORE folder"
198 "name": "Create Dataspace",
203 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces?dataspace-name=my-store",
208 "port": "{{CPS_PORT}}",
217 "key": "dataspace-name",
226 "name": "Create Schema Set",
231 "key": "Content-Type",
232 "value": "multipart/form-data",
243 "src": "cps/postman-collections/bookstore.zip"
248 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets?schema-set-name=stores-module",
253 "port": "{{CPS_PORT}}",
264 "key": "schema-set-name",
265 "value": "stores-module"
269 "description": "Make sure in the body there is form data. key = file and value will be the zip/yang file."
274 "name": "Create Anchor",
279 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors?schema-set-name=stores-module&anchor-name=bookstore-anchor",
284 "port": "{{CPS_PORT}}",
295 "key": "schema-set-name",
296 "value": "stores-module"
299 "key": "anchor-name",
300 "value": "bookstore-anchor"
308 "name": "Create DataNodes",
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",
322 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes",
327 "port": "{{CPS_PORT}}",
343 "name": "Get Root Node All Descendants",
348 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/&descendants=all",
353 "port": "{{CPS_PORT}}",
370 "key": "descendants",
379 "name": "Get Node Categories No Descendants",
384 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/categories&descendants=none",
389 "port": "{{CPS_PORT}}",
403 "value": "/bookstore/categories"
406 "key": "descendants",
415 "name": "Get Node Premises All Descendants",
420 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/premises&descendants=all",
425 "port": "{{CPS_PORT}}",
439 "value": "/bookstore/premises"
442 "key": "descendants",
451 "name": "Get Node Categories with code 2 Direct Descendants",
456 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/categories[@code='2']&descendants=direct",
461 "port": "{{CPS_PORT}}",
475 "value": "/bookstore/categories[@code='2']"
478 "key": "descendants",
487 "name": "Query Path Leaf Condition All Descendants",
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",
497 "port": "{{CPS_PORT}}",
512 "value": "/bookstore/categories[@name=\"Discount books\"]"
515 "key": "descendants",
524 "name": "Query Path Ancestor No Descendants",
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",
534 "port": "{{CPS_PORT}}",
549 "value": "//books[@lang=\"German\"]/ancestor::categories"
552 "key": "descendants",
561 "name": "Patch Nodes",
567 "raw": "{\r\n \"bookstore\": {\r\n \"bookstore-name\": \"Chapters\"\r\n }\r\n}",
575 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/",
580 "port": "{{CPS_PORT}}",
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",
616 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/bookstore",
621 "port": "{{CPS_PORT}}",
635 "value": "/bookstore"
643 "name": "Get Node Premises Direct Descendants",
648 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/premises&descendants=1",
653 "port": "{{CPS_PORT}}",
667 "value": "/bookstore/premises"
670 "key": "descendants",
679 "name": "Delete DataNodes",
684 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/",
689 "port": "{{CPS_PORT}}",
711 "name": "Delete Anchor",
716 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor",
721 "port": "{{CPS_PORT}}",
736 "name": "Delete Schema Set",
741 "key": "Content-Type",
742 "value": "multipart/form-data",
753 "src": "/home/jeff/Downloads/bookstore-model.yang"
758 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets/stores-module",
763 "port": "{{CPS_PORT}}",
774 "description": "Make sure in the body there is form data. key = file and value will be the zip/yang file."
779 "name": "Delete Dataspace",
784 "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces?dataspace-name=my-store",
789 "port": "{{CPS_PORT}}",
798 "key": "dataspace-name",
812 "value": "cpsr0cks!",