From 9082555bf43290e2b643d09d4fe0ca9f83e94f91 Mon Sep 17 00:00:00 2001 From: AndriiYurkevych Date: Thu, 6 Mar 2025 15:13:26 +0100 Subject: [PATCH] fix: postman collection "Backend Service" --- .../BackendService.postman_collection.json | 196 ++---------------- 1 file changed, 20 insertions(+), 176 deletions(-) diff --git a/mxd-runtimes/data-service-api/assets/postman/BackendService.postman_collection.json b/mxd-runtimes/data-service-api/assets/postman/BackendService.postman_collection.json index a746cb1f..11a6dde8 100644 --- a/mxd-runtimes/data-service-api/assets/postman/BackendService.postman_collection.json +++ b/mxd-runtimes/data-service-api/assets/postman/BackendService.postman_collection.json @@ -1,13 +1,13 @@ { "info": { - "_postman_id": "6ab595a8-0851-4288-b9c2-c9c2b9984a60", + "_postman_id": "e6a3f550-7ad2-40ba-8858-a4ff3ac908ec", "name": "BackendService", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json", - "_exporter_id": "34215553" + "_exporter_id": "38297939" }, "item": [ { - "name": "GenerateRandomContent", + "name": "Post content", "event": [ { "listen": "test", @@ -25,104 +25,24 @@ } } ], - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://localhost/backend-service/api/v1/contents/random?size=1KB", - "protocol": "http", - "host": [ - "localhost" - ], - "path": [ - "backend-service", - "api", - "v1", - "contents", - "random" - ], - "query": [ - { - "key": "size", - "value": "1KB" - } - ] - } - }, - "response": [] - }, - { - "name": "CreateRandomContent", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {\r", - " pm.response.to.have.status(200);\r", - "});\r", - "pm.test(\"Post Content\", function () {\r", - " pm.collectionVariables.set('content-id', pm.response.json().id);\r", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "protocolProfileBehavior": { - "disableBodyPruning": true - }, "request": { - "method": "GET", + "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "", + "raw": "{\r\n \"id\": 816339151,\r\n \"name\": \"aaaaaaaa\",\r\n \"description\": \"aaaaaaaa\"\r\n}", "options": { "raw": { "language": "json" } } }, - "url": { - "raw": "http://localhost/backend-service/api/v1/contents/create/random?size=10MB", - "protocol": "http", - "host": [ - "localhost" - ], - "path": [ - "backend-service", - "api", - "v1", - "contents", - "create", - "random" - ], - "query": [ - { - "key": "size", - "value": "10MB" - } - ] - } + "url": "{{BACKEND_SERVICE}}/v1/data" }, "response": [] }, { - "name": "CreateContent", + "name": "Update content", "event": [ { "listen": "test", @@ -130,9 +50,6 @@ "exec": [ "pm.test(\"Status code is 200\", function () {\r", " pm.response.to.have.status(200);\r", - "});\r", - "pm.test(\"Post Content\", function () {\r", - " pm.collectionVariables.set('content-id', pm.response.json().id);\r", "});" ], "type": "text/javascript", @@ -141,18 +58,18 @@ } ], "request": { - "method": "POST", + "method": "PUT", "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"userId\": 816339151,\r\n \"title\": \"aaaaaaaa\",\r\n \"text\": \"aaaaaaaa\"\r\n}", + "raw": "{\r\n \"id\": 816339151,\r\n \"name\": \"bbbbbbb\",\r\n \"description\": \"bbbbbbb\"\r\n}", "options": { "raw": { "language": "json" } } }, - "url": "http://localhost/backend-service/api/v1/contents" + "url": "{{BACKEND_SERVICE}}/v1/data" }, "response": [] }, @@ -161,54 +78,27 @@ "request": { "method": "GET", "header": [], - "url": "http://localhost/backend-service/api/v1/contents" + "url": "{{BACKEND_SERVICE}}/v1/data" }, "response": [] }, { - "name": "FetchAContent", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "protocolProfileBehavior": { - "disableBodyPruning": true - }, + "name": "GetContentById", "request": { "method": "GET", "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": "http://localhost/backend-service/api/v1/contents/{{content-id}}" + "url": "http://localhost/backend-service/api/v1/contents" }, "response": [] }, { - "name": "AcceptTransfer", + "name": "DeleteContentById", "event": [ { "listen": "test", "script": { "exec": [ - "const responseJson = pm.response.json();\r", - "const id = responseJson.id\r", - "\r", - "pm.collectionVariables.set('transfer-id', id);" + "" ], "type": "text/javascript", "packages": {} @@ -216,28 +106,7 @@ } ], "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"id\": \"35\",\r\n \"endpoint\": \"http://localhost:8080/api/v1/contents/{{content-id}}\",\r\n \"authKey\": \"Authorization\",\r\n \"authCode\": \"100000\",\r\n \"properties\": {}\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": "http://localhost/backend-service/api/v1/transfers" - }, - "response": [] - }, - { - "name": "GetTransfer", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", + "method": "DELETE", "header": [], "body": { "mode": "raw", @@ -248,28 +117,7 @@ } } }, - "url": "http://localhost/backend-service/api/v1/transfers/{{transfer-id}}" - }, - "response": [] - }, - { - "name": "GetTransferContent", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"id\": \"123456789011\",\r\n \"endpoint\": \"http://alice-tractusx-connector-dataplane:8081/api/public\",\r\n \"authKey\": \"Authorization\",\r\n \"authCode\": \"100000\",\r\n \"properties\": {}\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": "http://localhost/backend-service/api/v1/transfers/{{transfer-id}}/contents" + "url": "{{BACKEND_SERVICE}}/v1/data/{{CONTENT_ID}}" }, "response": [] } @@ -298,16 +146,12 @@ ], "variable": [ { - "key": "content-id", - "value": "" - }, - { - "key": "transfer-id", + "key": "CONTENT_ID", "value": "" }, { - "value": "", - "disabled": true + "key": "BACKEND_SERVICE", + "value": "http://localhost/data-service" } ] } \ No newline at end of file