-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #339 from bci-oss/feature/add-postman-collection-a…
…ccess-rule Add postman collection for access rule management.
- Loading branch information
Showing
4 changed files
with
174 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
168 changes: 168 additions & 0 deletions
168
docs/development/postman/tractusx-dtr-access-rule-management-api-v1.0-collection.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
{ | ||
"info": { | ||
"_postman_id": "47f1eefc-bd84-4c6b-9c30-2ff696b1dde0", | ||
"name": "tractusx-dtr-access-rule-management-api-v1.0", | ||
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" | ||
}, | ||
"item": [ | ||
{ | ||
"name": "get Rules", | ||
"request": { | ||
"method": "GET", | ||
"header": [], | ||
"url": "{{baseUrl}}/api/v3.0/access-controls/rules" | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "create Rule", | ||
"request": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"validFrom\": \"2020-01-02T03:04:05Z\",\n \"validTo\": \"4999-01-02T03:04:05Z\",\n \"description\": \"ACME policy within set validity period\",\n \"policyType\": \"AAS\",\n \"policy\": {\n \"accessRules\": [\n {\n \"attribute\": \"bpn\",\n \"operator\": \"eq\",\n \"value\": \"BPNL00000000000A\"\n },\n {\n \"attribute\": \"mandatorySpecificAssetIds\",\n \"operator\": \"includes\",\n \"values\": [\n {\n \"attribute\": \"manufacturerPartId\",\n \"operator\": \"eq\",\n \"value\": \"99991\"\n },\n {\n \"attribute\": \"customerPartId\",\n \"operator\": \"eq\",\n \"value\": \"ACME001\"\n }\n ]\n },\n {\n \"attribute\": \"visibleSpecificAssetIdNames\",\n \"operator\": \"includes\",\n \"values\": [\n {\n \"attribute\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"manufacturerPartId\"\n },\n {\n \"attribute\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"customerPartId\"\n },\n {\n \"attribute\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"partInstanceId\"\n }\n ]\n },\n {\n \"attribute\": \"visibleSemanticIds\",\n \"operator\": \"includes\",\n \"values\": [\n {\n \"attribute\": \"modelUrn\",\n \"operator\": \"eq\",\n \"value\": \"urn:samm:net.catenax.vehicle.submodel_external1:1.0.0#Pcf\"\n }\n ]\n }\n ]\n }\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": "{{baseUrl}}/api/v3.0/access-controls/rules" | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "get Rule by ruleId", | ||
"request": { | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "{{baseUrl}}/api/v3.0/access-controls/rules/:ruleId", | ||
"host": [ | ||
"{{baseUrl}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v3.0", | ||
"access-controls", | ||
"rules", | ||
":ruleId" | ||
], | ||
"variable": [ | ||
{ | ||
"key": "ruleId", | ||
"value": "" | ||
} | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "update Rule by ruleId", | ||
"request": { | ||
"method": "PUT", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"id\": 1,\n \"tid\": \"00000000-1111-2222-3333-444444444444\",\n \"policyType\": \"AAS\",\n \"policy\": {\n \"accessRules\": [\n {\n \"attribute\": \"bpn\",\n \"operator\": \"eq\",\n \"value\": \"BPNL00000000000A\"\n },\n {\n \"attribute\": \"mandatorySpecificAssetIds\",\n \"operator\": \"includes\",\n \"values\": [\n {\n \"attribute\": \"manufacturerPartId\",\n \"operator\": \"eq\",\n \"value\": \"99991\"\n },\n {\n \"attribute\": \"customerPartId\",\n \"operator\": \"eq\",\n \"value\": \"ACME001\"\n }\n ]\n },\n {\n \"attribute\": \"visibleSpecificAssetIdNames\",\n \"operator\": \"includes\",\n \"values\": [\n {\n \"attribute\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"manufacturerPartId\"\n },\n {\n \"attribute\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"customerPartId\"\n },\n {\n \"attribute\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"partInstanceId\"\n }\n ]\n },\n {\n \"attribute\": \"visibleSemanticIds\",\n \"operator\": \"includes\",\n \"values\": [\n {\n \"attribute\": \"modelUrn\",\n \"operator\": \"eq\",\n \"value\": \"Traceabilityv1.1.0\"\n },\n {\n \"attribute\": \"modelUrn\",\n \"operator\": \"eq\",\n \"value\": \"ProductCarbonFootprintv1.1.0\"\n }\n ]\n }\n ]\n },\n \"description\": \"Access rule description.\",\n \"validFrom\": \"2024-01-02T03:04:05Z\",\n \"validTo\": \"2024-06-07T08:09:10Z\"\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{baseUrl}}/api/v3.0/access-controls/rules/:ruleId", | ||
"host": [ | ||
"{{baseUrl}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v3.0", | ||
"access-controls", | ||
"rules", | ||
":ruleId" | ||
], | ||
"variable": [ | ||
{ | ||
"key": "ruleId", | ||
"value": "" | ||
} | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "delete rule by ruleId", | ||
"request": { | ||
"method": "DELETE", | ||
"header": [], | ||
"url": { | ||
"raw": "{{baseUrl}}/api/v3.0/access-controls/rules/:ruleId", | ||
"host": [ | ||
"{{baseUrl}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v3.0", | ||
"access-controls", | ||
"rules", | ||
":ruleId" | ||
], | ||
"variable": [ | ||
{ | ||
"key": "ruleId", | ||
"value": "" | ||
} | ||
] | ||
} | ||
}, | ||
"response": [] | ||
} | ||
], | ||
"auth": { | ||
"type": "oauth2", | ||
"oauth2": { | ||
"clientSecret": "", | ||
"clientId": "", | ||
"accessTokenUrl": "", | ||
"challengeAlgorithm": "S256", | ||
"scope": "openid", | ||
"redirect_uri": "", | ||
"grant_type": "client_credentials", | ||
"authUrl": "", | ||
"addTokenTo": "header", | ||
"client_authentication": "header" | ||
} | ||
}, | ||
"event": [ | ||
{ | ||
"listen": "prerequest", | ||
"script": { | ||
"type": "text/javascript", | ||
"exec": [ | ||
"" | ||
] | ||
} | ||
}, | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"type": "text/javascript", | ||
"exec": [ | ||
"" | ||
] | ||
} | ||
} | ||
], | ||
"variable": [ | ||
{ | ||
"key": "baseUrl", | ||
"value": "<baseUrl of digital Twin Registry>", | ||
"type": "default" | ||
} | ||
] | ||
} |