diff --git a/mxd/postman/MXD_Management_API.json b/mxd/postman/MXD_Management_API.json deleted file mode 100644 index 6d8137dd..00000000 --- a/mxd/postman/MXD_Management_API.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "info": { - "_postman_id": "f510a19c-4214-480b-a79a-55796d03d286", - "name": "MXD Management API 11-sep-2023", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "29243509" - }, - "item": [ - { - "name": "Create Assets BOB Management", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "pm.test(\"Asessts Created for BOB\", function () {", - " var jsonData = pm.response.json();", - " console.log(jsonData[\"@id\"]);", - " pm.expect(jsonData[\"@id\"]).to.eql(\"2222\")", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"@context\": {},\n \"asset\": {\n \"@type\": \"Asset\",\n \"@id\": \"2222\", \n \"properties\": {\n \"description\": \"Product EDC Demo Asset 1\"\n }\n },\n \"dataAddress\": {\n \"@type\": \"DataAddress\",\n \"type\": \"HttpData\",\n \"baseUrl\": \"https://jsonplaceholder.typicode.com/todos\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{BOB_MANAGEMENT_URL}}/assets", - "host": [ - "{{BOB_MANAGEMENT_URL}}" - ], - "path": [ - "assets" - ] - } - }, - "response": [] - }, - { - "name": "Create Asset Alice MANAGEMENT", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "pm.test(\"Asessts Created for Alice\", function () {", - " var jsonData = pm.response.json();", - " console.log(jsonData[\"@id\"]);", - " pm.expect(jsonData[\"@id\"]).to.eql(\"2222\")", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"@context\": {},\n \"asset\": {\n \"@type\": \"Asset\",\n \"@id\": \"2222\", \n \"properties\": {\n \"description\": \"Product EDC Demo Asset 2\"\n }\n },\n \"dataAddress\": {\n \"@type\": \"DataAddress\",\n \"type\": \"HttpData\",\n \"baseUrl\": \"https://jsonplaceholder.typicode.com/todos\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{Alice_MANAGEMENT_URL}}/assets", - "host": [ - "{{Alice_MANAGEMENT_URL}}" - ], - "path": [ - "assets" - ] - } - }, - "response": [] - }, - { - "name": "Create Policy BOB_MANAGEMENT_URL", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "pm.test(\"Policy Created for BOB\", function () {", - " var jsonData = pm.response.json();", - " console.log(jsonData[\"@id\"]);", - " pm.expect(jsonData[\"@id\"]).to.eql(\"2222\")", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"@type\": \"PolicyDefinitionRequestDto\",\n \"@id\": \"2222\",\n \"policy\": {\n\t\t\"@type\": \"Policy\",\n\t\t\"odrl:permission\" : [{\n\t\t\t\"odrl:action\" : \"USE\",\n\t\t\t\"odrl:constraint\" : {\n\t\t\t\t\"@type\": \"LogicalConstraint\",\n\t\t\t\t\"odrl:or\" : [{\n\t\t\t\t\t\"@type\" : \"Constraint\",\n\t\t\t\t\t\"odrl:leftOperand\" : \"BusinessPartnerNumber\",\n\t\t\t\t\t\"odrl:operator\" : {\n \"@id\": \"odrl:eq\"\n },\n\t\t\t\t\t\"odrl:rightOperand\" : \"{{POLICY_BPN}}\"\n\t\t\t\t}]\n\t\t\t}\n\t\t}]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{BOB_MANAGEMENT_URL}}/policydefinitions", - "host": [ - "{{BOB_MANAGEMENT_URL}}" - ], - "path": [ - "policydefinitions" - ] - } - }, - "response": [] - }, - { - "name": "Create Policy Alice_MANAGEMENT_URL", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "pm.test(\"Policy Created for Alice\", function () {", - " var jsonData = pm.response.json();", - " console.log(jsonData[\"@id\"]);", - " pm.expect(jsonData[\"@id\"]).to.eql(\"2222\")", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"@type\": \"PolicyDefinitionRequestDto\",\n \"@id\": \"2222\",\n \"policy\": {\n\t\t\"@type\": \"Policy\",\n\t\t\"odrl:permission\" : [{\n\t\t\t\"odrl:action\" : \"USE\",\n\t\t\t\"odrl:constraint\" : {\n\t\t\t\t\"@type\": \"LogicalConstraint\",\n\t\t\t\t\"odrl:or\" : [{\n\t\t\t\t\t\"@type\" : \"Constraint\",\n\t\t\t\t\t\"odrl:leftOperand\" : \"BusinessPartnerNumber\",\n\t\t\t\t\t\"odrl:operator\" : {\n \"@id\": \"odrl:eq\"\n },\n\t\t\t\t\t\"odrl:rightOperand\" : \"{{POLICY_BPN}}\"\n\t\t\t\t}]\n\t\t\t}\n\t\t}]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{Alice_MANAGEMENT_URL}}/policydefinitions", - "host": [ - "{{Alice_MANAGEMENT_URL}}" - ], - "path": [ - "policydefinitions" - ] - } - }, - "response": [] - }, - { - "name": "Create Contract Definition BOB_MANAGEMENT_URL", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "pm.test(\"Contract Definition for BOB\", function () {", - " var jsonData = pm.response.json();", - " console.log(jsonData[\"@id\"]);", - " pm.expect(jsonData[\"@id\"]).to.eql(\"2222\")", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"@context\": {},\n \"@id\": \"2222\",\n \"@type\": \"ContractDefinition\",\n \"accessPolicyId\": \"1\",\n \"contractPolicyId\": \"1\",\n \"assetsSelector\" : {\n \"@type\" : \"CriterionDto\",\n \"operandLeft\": \"{{EDC_NAMESPACE}}id\",\n \"operator\": \"=\",\n \"operandRight\": \"1\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{BOB_MANAGEMENT_URL}}/contractdefinitions", - "host": [ - "{{BOB_MANAGEMENT_URL}}" - ], - "path": [ - "contractdefinitions" - ] - } - }, - "response": [] - }, - { - "name": "Create Contract Definition Alice_MANAGEMENT_URL", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "pm.test(\"Contract Definition for Alice\", function () {", - " var jsonData = pm.response.json();", - " console.log(jsonData[\"@id\"]);", - " pm.expect(jsonData[\"@id\"]).to.eql(\"2222\")", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"@context\": {},\n \"@id\": \"2222\",\n \"@type\": \"ContractDefinition\",\n \"accessPolicyId\": \"1\",\n \"contractPolicyId\": \"1\",\n \"assetsSelector\" : {\n \"@type\" : \"CriterionDto\",\n \"operandLeft\": \"{{EDC_NAMESPACE}}id\",\n \"operator\": \"=\",\n \"operandRight\": \"1\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{Alice_MANAGEMENT_URL}}/contractdefinitions", - "host": [ - "{{Alice_MANAGEMENT_URL}}" - ], - "path": [ - "contractdefinitions" - ] - } - }, - "response": [] - }, - { - "name": "Get all Policies", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {\r", - " pm.response.to.have.status(200);\r", - "});\r", - "pm.test(\"Get the All Created Policies \", function () {\r", - " var jsonData = pm.response.json();\r", - " console.log(jsonData[0][\"@id\"]);\r", - " pm.expect(jsonData[0][\"@id\"]).to.eql(\"1\");\r", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"id\": \"{{POLICY_ID}}\",\n \"policy\": {\n \"prohibitions\": [],\n \"obligations\": [],\n \"permissions\": [\n {\n \"edctype\": \"dataspaceconnector:permission\",\n \"action\": {\n \"type\": \"USE\"\n },\n \"constraints\": []\n }\n ]\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{BOB_MANAGEMENT_URL}}/policydefinitions/request", - "host": [ - "{{BOB_MANAGEMENT_URL}}" - ], - "path": [ - "policydefinitions", - "request" - ] - } - }, - "response": [] - }, - { - "name": "Get all Assets", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {\r", - " pm.response.to.have.status(200);\r", - "});\r", - "pm.test(\"Get the All Created Policies\", function () {\r", - " var jsonData = pm.response.json();\r", - " console.log(jsonData[0][\"@id\"]);\r", - " pm.expect(jsonData[0][\"@id\"]).to.eql(\"1\");\r", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "url": { - "raw": "{{BOB_MANAGEMENT_URL}}/assets/request", - "host": [ - "{{BOB_MANAGEMENT_URL}}" - ], - "path": [ - "assets", - "request" - ] - } - }, - "response": [] - }, - { - "name": "Query Catalog Bob to Alice", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {\r", - " pm.response.to.have.status(200);\r", - "});\r", - "\r", - "pm.test(\"Query Catalog Fetch Successful\", function () {\r", - " var jsonData = pm.response.json();\r", - " console.log(jsonData[\"dcat:dataset\"][0][\"@id\"]);\r", - " pm.expect(jsonData[\"dcat:dataset\"][0][\"@id\"]).to.eql(\"1\");\r", - "});\r", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "X-Api-Key", - "value": "password", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"CatalogRequest\",\r\n \"providerUrl\": \"\",\r\n \"counterPartyAddress\":\"{{Alice_PROVIDER_PROTOCOL_URL}}\",\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"querySpec\": {\r\n \"offset\": 0,\r\n \"limit\": 50\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{BOB_MANAGEMENT_URL}}/catalog/request", - "host": [ - "{{BOB_MANAGEMENT_URL}}" - ], - "path": [ - "catalog", - "request" - ] - } - }, - "response": [] - }, - { - "name": "Query Catalog Alice to BOB", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {\r", - " pm.response.to.have.status(200);\r", - "});\r", - "pm.test(\"Query Catalog Fetch Successful\", function () {\r", - " var jsonData = pm.response.json();\r", - " console.log(jsonData[\"dcat:dataset\"][0][\"@id\"]);\r", - " pm.expect(jsonData[\"dcat:dataset\"][0][\"@id\"]).to.eql(\"1\");\r", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "X-Api-Key", - "value": "password", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"CatalogRequest\",\r\n \"providerUrl\": \"\",\r\n \"counterPartyAddress\":\"{{Alice_PROVIDER_PROTOCOL_URL}}\",\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"querySpec\": {\r\n \"offset\": 0,\r\n \"limit\": 50\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{BOB_MANAGEMENT_URL}}/catalog/request", - "host": [ - "{{BOB_MANAGEMENT_URL}}" - ], - "path": [ - "catalog", - "request" - ] - } - }, - "response": [] - } - ], - "auth": { - "type": "apikey", - "apikey": [ - { - "key": "value", - "value": "password", - "type": "string" - }, - { - "key": "key", - "value": "X-Api-Key", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "MANAGEMENT_URL", - "value": "" - }, - { - "key": "PROVIDER_PROTOCOL_URL", - "value": "" - }, - { - "key": "ASSET_ID", - "value": "1", - "type": "default" - }, - { - "key": "POLICY_ID", - "value": "1", - "type": "default" - }, - { - "key": "CONTRACT_POLICY_ID", - "value": "1", - "type": "default" - }, - { - "key": "ACCESS_POLICY_ID", - "value": "1", - "type": "default" - }, - { - "key": "CONTRACT_DEFINITION_ID", - "value": "1", - "type": "default" - }, - { - "key": "POLICY_BPN", - "value": "BPNBOB", - "type": "default" - }, - { - "key": "NEGOTIATION_ID", - "value": "" - }, - { - "key": "AGREEMENT_ID", - "value": "" - }, - { - "key": "TRANSFER_ID", - "value": "" - }, - { - "key": "TRANSFER_PROCESS_ID", - "value": "" - }, - { - "key": "BACKEND_SERVICE", - "value": "http://backend:8080", - "type": "string" - }, - { - "key": "AGREEMENT-ID", - "value": "" - }, - { - "key": "authCode", - "value": "" - }, - { - "key": "PROVIDER_ID", - "value": "BPNPLATO", - "type": "string" - }, - { - "key": "EDC_NAMESPACE", - "value": "https://w3id.org/edc/v0.0.1/ns/", - "type": "string" - }, - { - "key": "CONSUMER_ADAPTER_URL", - "value": "http://localhost:31364/management", - "type": "string" - }, - { - "key": "BOB_MANAGEMENT_URL", - "value": "http://localhost/bob/management/v2", - "type": "string" - }, - { - "key": "Alice_MANAGEMENT_URL", - "value": "http://localhost/alice/management/v2", - "type": "string" - }, - { - "key": "BOB_PROVIDER_PROTOCOL_URL", - "value": "http://bob-controlplane:8084/api/v1/dsp", - "type": "string" - }, - { - "key": "Alice_PROVIDER_PROTOCOL_URL", - "value": "http://alice-controlplane:8084/api/v1/dsp", - "type": "string" - } - ] -} \ No newline at end of file diff --git a/mxd/postman/mxd-management-apis.json b/mxd/postman/mxd-management-apis.json new file mode 100644 index 00000000..5867d701 --- /dev/null +++ b/mxd/postman/mxd-management-apis.json @@ -0,0 +1,963 @@ +{ + "info": { + "_postman_id": "294c5d0c-6677-4eb5-9f87-48596666b666", + "name": "tractusx-edc-mgmt-api", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "27652630" + }, + "item": [ + { + "name": "Create Asset", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"@context\": {},\n \"asset\": {\n \"@type\": \"Asset\",\n \"@id\": \"{{ASSET_ID}}\", \n \"properties\": {\n \"description\": \"Product EDC Demo Asset\"\n }\n },\n \"dataAddress\": {\n \"@type\": \"DataAddress\",\n \"type\": \"HttpData\",\n \"baseUrl\": \"https://jsonplaceholder.typicode.com/todos\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v3/assets", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v3", + "assets" + ] + } + }, + "response": [] + }, + { + "name": "Get all Assets", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v3/assets/request", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v3", + "assets", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Get Asset by ID", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v3/assets/{{ASSET_ID}}", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v3", + "assets", + "{{ASSET_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "Delete Asset by ID", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v3/assets/{{ASSET_ID}}", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v3", + "assets", + "{{ASSET_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "Create Policy", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"@type\": \"PolicyDefinitionRequestDto\",\n \"@id\": \"{{POLICY_ID}}\",\n \"policy\": {\n\t\t\"@type\": \"Policy\",\n\t\t\"odrl:permission\" : [{\n\t\t\t\"odrl:action\" : \"USE\",\n\t\t\t\"odrl:constraint\" : {\n\t\t\t\t\"@type\": \"LogicalConstraint\",\n\t\t\t\t\"odrl:or\" : [{\n\t\t\t\t\t\"@type\" : \"Constraint\",\n\t\t\t\t\t\"odrl:leftOperand\" : \"BusinessPartnerNumber\",\n\t\t\t\t\t\"odrl:operator\" : {\n \"@id\": \"odrl:eq\"\n },\n\t\t\t\t\t\"odrl:rightOperand\" : \"{{POLICY_BPN}}\"\n\t\t\t\t}]\n\t\t\t}\n\t\t}]\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v2/policydefinitions", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "policydefinitions" + ] + } + }, + "response": [] + }, + { + "name": "Get Policy by ID", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"{{POLICY_ID}}\",\n \"policy\": {\n \"prohibitions\": [],\n \"obligations\": [],\n \"permissions\": [\n {\n \"edctype\": \"dataspaceconnector:permission\",\n \"action\": {\n \"type\": \"USE\"\n },\n \"constraints\": []\n }\n ]\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v2/policydefinitions/{{POLICY_ID}}", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "policydefinitions", + "{{POLICY_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "Get all Policies", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"id\": \"{{POLICY_ID}}\",\n \"policy\": {\n \"prohibitions\": [],\n \"obligations\": [],\n \"permissions\": [\n {\n \"edctype\": \"dataspaceconnector:permission\",\n \"action\": {\n \"type\": \"USE\"\n },\n \"constraints\": []\n }\n ]\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v2/policydefinitions/request", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "policydefinitions", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Delte Policy by ID", + "request": { + "method": "DELETE", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"{{POLICY_ID}}\",\n \"policy\": {\n \"prohibitions\": [],\n \"obligations\": [],\n \"permissions\": [\n {\n \"edctype\": \"dataspaceconnector:permission\",\n \"action\": {\n \"type\": \"USE\"\n },\n \"constraints\": []\n }\n ]\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v2/policydefinitions/{{POLICY_ID}}", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "policydefinitions", + "{{POLICY_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "Create Contract Definitiion", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"@context\": {},\n \"@id\": \"{{CONTRACT_DEFINITION_ID}}\",\n \"@type\": \"ContractDefinition\",\n \"accessPolicyId\": \"{{ACCESS_POLICY_ID}}\",\n \"contractPolicyId\": \"{{CONTRACT_POLICY_ID}}\",\n \"assetsSelector\" : {\n \"@type\" : \"CriterionDto\",\n \"operandLeft\": \"{{EDC_NAMESPACE}}id\",\n \"operator\": \"=\",\n \"operandRight\": \"{{ASSET_ID}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v2/contractdefinitions", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "contractdefinitions" + ] + } + }, + "response": [] + }, + { + "name": "Get Contract Definition by ID", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"{{POLICY_ID}}\",\n \"policy\": {\n \"prohibitions\": [],\n \"obligations\": [],\n \"permissions\": [\n {\n \"edctype\": \"dataspaceconnector:permission\",\n \"action\": {\n \"type\": \"USE\"\n },\n \"constraints\": []\n }\n ]\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v2/contractdefinitions/{{CONTRACT_DEFINITION_ID}}", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "contractdefinitions", + "{{CONTRACT_DEFINITION_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "Get all Contract Definitiions", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v2/contractdefinitions/request", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "contractdefinitions", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Delte Contract Definition", + "request": { + "method": "DELETE", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"{{POLICY_ID}}\",\n \"policy\": {\n \"prohibitions\": [],\n \"obligations\": [],\n \"permissions\": [\n {\n \"edctype\": \"dataspaceconnector:permission\",\n \"action\": {\n \"type\": \"USE\"\n },\n \"constraints\": []\n }\n ]\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_MANAGEMENT_URL}}/v2/contractdefinitions/{{CONTRACT_DEFINITION_ID}}", + "host": [ + "{{PROVIDER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "contractdefinitions", + "{{CONTRACT_DEFINITION_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "Query Catalog", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"CatalogRequest\",\r\n \"counterPartyAddress\":\"{{PROVIDER_PROTOCOL_URL}}\",\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"querySpec\": {\r\n \"offset\": 0,\r\n \"limit\": 50\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_MANAGEMENT_URL}}/v2/catalog/request", + "host": [ + "{{CONSUMER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "catalog", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Initiate Negotation", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Body matches string\", function () {", + " var jsonData = pm.response.json();", + " pm.collectionVariables.set(\"NEGOTIATION_ID\", jsonData.id);", + "", + "});" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n\t\"@context\": {\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t},\n\t\"@type\": \"NegotiationInitiateRequestDto\",\n\t\"connectorAddress\": \"{{PROVIDER_PROTOCOL_URL}}\",\n\t\"protocol\": \"dataspace-protocol-http\",\n\t\"connectorId\": \"{{PROVIDER_ID}}\",\n\t\"providerId\": \"{{PROVIDER_ID}}\",\n\t\"offer\": {\n\t\t\"offerId\": \"MQ==:MQ==:ZDM4Nzk3NmUtZjA0Ny00ZmNjLWFhNWItYjQwYmVkMDBhZGYy\",\n\t\t\"assetId\": \"{{ASSET_ID}}\",\n\t\t\"policy\": {\n\t\t\t\"@type\": \"odrl:Set\",\n\t\t\t\"odrl:permission\": {\n\t\t\t\t\"odrl:target\": \"{{ASSET_ID}}\",\n\t\t\t\t\"odrl:action\": {\n\t\t\t\t\t\"odrl:type\": \"USE\"\n\t\t\t\t},\n\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\"odrl:or\": {\n\t\t\t\t\t\t\"odrl:leftOperand\": \"BusinessPartnerNumber\",\n\t\t\t\t\t\t\"odrl:operator\": {\n \"@id\": \"odrl:eq\"\n },\n\t\t\t\t\t\t\"odrl:rightOperand\": \"{{POLICY_BPN}}\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"odrl:prohibition\": [],\n\t\t\t\"odrl:obligation\": [],\n\t\t\t\"odrl:target\": \"{{ASSET_ID}}\"\n\t\t}\n\t}\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_MANAGEMENT_URL}}/v2/contractnegotiations", + "host": [ + "{{CONSUMER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "contractnegotiations" + ] + } + }, + "response": [] + }, + { + "name": "Get all Negotations", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CONSUMER_MANAGEMENT_URL}}/v2/contractnegotiations/request", + "host": [ + "{{CONSUMER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "contractnegotiations", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Cancel Negotation by ID", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{CONSUMER_MANAGEMENT_URL}}/v2/contractnegotiations/7cff6ecb-7e5e-40b8-b101-eba3f2045b1f/cancel", + "host": [ + "{{CONSUMER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "contractnegotiations", + "7cff6ecb-7e5e-40b8-b101-eba3f2045b1f", + "cancel" + ] + } + }, + "response": [] + }, + { + "name": "Initiate Transfer", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.collectionVariables.set(\"TRANSFER_ID\", Math.random());" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Body matches string\", function () {", + " var jsonData = pm.response.json();", + " pm.collectionVariables.set(\"TRANSFER_PROCESS_ID\", jsonData.id);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"assetId\": \"{{ASSET_ID}}\",\n \"connectorAddress\": \"{{PROVIDER_PROTOCOL_URL}}\",\n \"connectorId\": \"{{PROVIDER_ID}}\",\n \"contractId\": \"MQ==:MQ==:OGIxZmY5ODgtMzIwMy00OWY5LWFjMjMtN2RmN2JiYjQ1NzQx\",\n \"dataDestination\": {\n \"type\": \"HttpProxy\"\n },\n \"privateProperties\": {\n \"receiverHttpEndpoint\": \"{{BACKEND_SERVICE}}\"\n },\n \"protocol\": \"dataspace-protocol-http\",\n \"transferType\": {\n \"contentType\": \"application/octet-stream\",\n \"isFinite\": true\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_MANAGEMENT_URL}}/v2/transferprocesses", + "host": [ + "{{CONSUMER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "transferprocesses" + ] + } + }, + "response": [] + }, + { + "name": "Get Transfer by ID", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{CONSUMER_MANAGEMENT_URL}}/v2/transferprocesses/8e428b80-46a5-4325-87e5-592518f7666b", + "host": [ + "{{CONSUMER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "transferprocesses", + "8e428b80-46a5-4325-87e5-592518f7666b" + ] + } + }, + "response": [] + }, + { + "name": "Get all Transfers", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_MANAGEMENT_URL}}/v2/transferprocesses/request", + "host": [ + "{{CONSUMER_MANAGEMENT_URL}}" + ], + "path": [ + "v2", + "transferprocesses", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Initiate EDR Negotation", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Body matches string\", function () {", + " var jsonData = pm.response.json();", + " pm.collectionVariables.set(\"NEGOTIATION_ID\", jsonData.id);", + "", + "});" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n\t\"@context\": {\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t},\n\t\"@type\": \"NegotiationInitiateRequestDto\",\n\t\"connectorAddress\": \"{{PROVIDER_PROTOCOL_URL}}\",\n\t\"protocol\": \"dataspace-protocol-http\",\n\t\"connectorId\": \"{{PROVIDER_ID}}\",\n\t\"providerId\": \"{{PROVIDER_ID}}\",\n\t\"offer\": {\n\t\t\"offerId\": \"MQ==:MQ==:ZDM4Nzk3NmUtZjA0Ny00ZmNjLWFhNWItYjQwYmVkMDBhZGYy\",\n\t\t\"assetId\": \"{{ASSET_ID}}\",\n\t\t\"policy\": {\n\t\t\t\"@type\": \"odrl:Set\",\n\t\t\t\"odrl:permission\": {\n\t\t\t\t\"odrl:target\": \"{{ASSET_ID}}\",\n\t\t\t\t\"odrl:action\": {\n\t\t\t\t\t\"odrl:type\": \"USE\"\n\t\t\t\t},\n\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\"odrl:or\": {\n\t\t\t\t\t\t\"odrl:leftOperand\": \"BusinessPartnerNumber\",\n\t\t\t\t\t\t\"odrl:operator\": {\n \"@id\": \"odrl:eq\"\n },\n\t\t\t\t\t\t\"odrl:rightOperand\": \"{{POLICY_BPN}}\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"odrl:prohibition\": [],\n\t\t\t\"odrl:obligation\": [],\n\t\t\t\"odrl:target\": \"{{ASSET_ID}}\"\n\t\t}\n\t}\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_ADAPTER_URL}}/v2/edrs", + "host": [ + "{{CONSUMER_ADAPTER_URL}}" + ], + "path": [ + "v2", + "edrs" + ] + } + }, + "response": [] + }, + { + "name": "Query EDRs Cached", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Body matches string\", function () {", + " var jsonData = pm.response.json();", + " pm.collectionVariables.set(\"NEGOTIATION_ID\", jsonData.id);", + "", + "});" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_ADAPTER_URL}}/v2/edrs?assetId={{ASSET_ID}}", + "host": [ + "{{CONSUMER_ADAPTER_URL}}" + ], + "path": [ + "v2", + "edrs" + ], + "query": [ + { + "key": "assetId", + "value": "{{ASSET_ID}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Get EDR by tp ID", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Body matches string\", function () {", + " var jsonData = pm.response.json();", + " pm.collectionVariables.set(\"NEGOTIATION_ID\", jsonData.id);", + "", + "});" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_ADAPTER_URL}}/v2/edrs/e1e986be-3ac3-4166-8fa9-b44be00a37ba", + "host": [ + "{{CONSUMER_ADAPTER_URL}}" + ], + "path": [ + "v2", + "edrs", + "e1e986be-3ac3-4166-8fa9-b44be00a37ba" + ] + } + }, + "response": [] + }, + { + "name": "Get Asset Data with proxy", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Body matches string\", function () {", + " var jsonData = pm.response.json();", + " pm.collectionVariables.set(\"NEGOTIATION_ID\", jsonData.id);", + "", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"assetId\": \"{{ASSET_ID}}\",\n \"endpointUrl\": \"http://plato-dataplane:8080/api/gateway/aas/1\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:8186/proxy/aas/request", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8186", + "path": [ + "proxy", + "aas", + "request" + ] + } + }, + "response": [] + } + ], + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "password", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "CONSUMER_MANAGEMENT_URL", + "value": "http://localhost/bob/management/" + }, + { + "key": "PROVIDER_PROTOCOL_URL", + "value": "http://alice-controlplane:8084/api/v1/dsp" + }, + { + "key": "PROVIDER_MANAGEMENT_URL", + "value": "http://localhost/alice/management/" + }, + { + "key": "ASSET_ID", + "value": "1", + "type": "default" + }, + { + "key": "POLICY_ID", + "value": "1", + "type": "default" + }, + { + "key": "CONTRACT_POLICY_ID", + "value": "1", + "type": "default" + }, + { + "key": "ACCESS_POLICY_ID", + "value": "1", + "type": "default" + }, + { + "key": "CONTRACT_DEFINITION_ID", + "value": "1", + "type": "default" + }, + { + "key": "POLICY_BPN", + "value": "BPNL000000000002", + "type": "default" + }, + { + "key": "NEGOTIATION_ID", + "value": "" + }, + { + "key": "AGREEMENT_ID", + "value": "" + }, + { + "key": "TRANSFER_ID", + "value": "" + }, + { + "key": "TRANSFER_PROCESS_ID", + "value": "" + }, + { + "key": "BACKEND_SERVICE", + "value": "http://backend:8080", + "type": "string" + }, + { + "key": "AGREEMENT-ID", + "value": "" + }, + { + "key": "authCode", + "value": "" + }, + { + "key": "PROVIDER_ID", + "value": "BPNL000000000001", + "type": "string" + }, + { + "key": "EDC_NAMESPACE", + "value": "https://w3id.org/edc/v0.0.1/ns/", + "type": "string" + }, + { + "key": "CONSUMER_ADAPTER_URL", + "value": "http://localhost:31364/management", + "type": "string" + } + ] +} \ No newline at end of file