Skip to content
Snippets Groups Projects
Commit ed3b618f authored by Valery Kalashnikov's avatar Valery Kalashnikov
Browse files

Add new postman collection

parent 1174b3d6
No related branches found
No related tags found
1 merge request!23Add new postman collection
{ {
"info": { "info": {
"_postman_id": "0def3f70-92bc-4a30-8cba-c5ea49053ca3", "_postman_id": "01a99dcf-c145-409d-928a-fc6cbabda235",
"name": "Trust Services API", "name": "Trust Services API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
}, },
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
}, },
{ {
"key": "policyName", "key": "policyName",
"value": "example" "value": "examplePolicy"
}, },
{ {
"key": "version", "key": "version",
...@@ -396,7 +396,91 @@ ...@@ -396,7 +396,91 @@
}, },
{ {
"key": "policyName", "key": "policyName",
"value": "task" "value": "createTask"
},
{
"key": "version",
"value": "1.0"
}
]
}
},
"response": []
},
{
"name": "Evaluate task list execution policy",
"event": [
{
"listen": "test",
"script": {
"exec": [
"const responseJson = pm.response.json();",
"",
"pm.test(\"Status code is 200\", () => {",
" pm.expect(pm.response.code).to.eql(200);",
"});",
"",
"pm.test(\"The evaluation response has all properties\", () => {",
" //parse the response JSON and test three properties",
" const responseJson = pm.response.json();",
" pm.expect(responseJson.evaluationID).to.be.a('string');;",
" pm.expect(responseJson.result.res.taskID).to.be.a('string')",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "group",
"value": "example",
"type": "default"
},
{
"key": "policyName",
"value": "resolve",
"type": "default"
},
{
"key": "version",
"value": "1.0",
"type": "default"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"mixedTaskList\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{policy_base_url}}/policy/:group/:policyName/:version/evaluation",
"host": [
"{{policy_base_url}}"
],
"path": [
"policy",
":group",
":policyName",
":version",
"evaluation"
],
"variable": [
{
"key": "group",
"value": "example"
},
{
"key": "policyName",
"value": "createTaskList"
}, },
{ {
"key": "version", "key": "version",
...@@ -411,7 +495,13 @@ ...@@ -411,7 +495,13 @@
"name": "Get the task execution result", "name": "Get the task execution result",
"request": { "request": {
"method": "GET", "method": "GET",
"header": [], "header": [
{
"key": "x-cache-key",
"value": "",
"type": "default"
}
],
"url": { "url": {
"raw": "{{cache_base_url}}/v1/cache", "raw": "{{cache_base_url}}/v1/cache",
"host": [ "host": [
...@@ -451,10 +541,29 @@ ...@@ -451,10 +541,29 @@
"response": [] "response": []
}, },
{ {
"name": "(not implemented) Trusted info exchange - import", "name": "Trusted info exchange - import",
"request": { "request": {
"method": "GET", "method": "POST",
"header": [] "header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{infohub_base_url}}/v1/import",
"host": [
"{{infohub_base_url}}"
],
"path": [
"v1",
"import"
]
}
}, },
"response": [] "response": []
}, },
...@@ -462,39 +571,88 @@ ...@@ -462,39 +571,88 @@
"name": "(not implemented) Execute the task list - parallel", "name": "(not implemented) Execute the task list - parallel",
"request": { "request": {
"method": "GET", "method": "GET",
"header": [] "header": [],
}, "url": {
"response": [] "raw": ""
}, }
{
"name": "(not implemented) Execute the task list - sequential",
"request": {
"method": "GET",
"header": []
},
"response": []
},
{
"name": "(not implemented) Cache events",
"request": {
"method": "GET",
"header": []
}, },
"response": [] "response": []
}, },
{ {
"name": "(not implemented) Signing", "name": "Cache events",
"request": { "request": {
"method": "GET", "method": "POST",
"header": [] "header": [
{
"key": "x-cache-key",
"value": "did:web:example.com",
"type": "default"
},
{
"key": "x-cache-namespace",
"value": "Login",
"type": "default"
},
{
"key": "x-cache-scope",
"value": "administration",
"type": "default"
}
],
"body": {
"mode": "raw",
"raw": "\"Repellendus quo.\"",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{cache_base_url}}/v1/external/cache",
"host": [
"{{cache_base_url}}"
],
"path": [
"v1",
"external",
"cache"
]
}
}, },
"response": [] "response": []
}, },
{ {
"name": "(not implemented) Verification", "name": "Signing (building proof)",
"request": { "request": {
"method": "GET", "method": "POST",
"header": [] "header": [],
"body": {
"mode": "raw",
"raw": "{\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\"\n ],\n \"credentialSubject\": {\n \"hello\": \"world\"\n },\n \"issuanceDate\": \"2022-06-02T17:24:05.032533+03:00\",\n \"issuer\": \"https://example.com\",\n \"type\": \"VerifiableCredential\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{signer_base_url}}/v1/credential/proof?key=key1",
"host": [
"{{signer_base_url}}"
],
"path": [
"v1",
"credential",
"proof"
],
"query": [
{
"key": "key",
"value": "key1"
}
]
}
}, },
"response": [] "response": []
} }
...@@ -534,6 +692,11 @@ ...@@ -534,6 +692,11 @@
"key": "infohub_base_url", "key": "infohub_base_url",
"value": "http://localhost:8084", "value": "http://localhost:8084",
"type": "default" "type": "default"
},
{
"key": "signer_base_url",
"value": "http://localhost:8085",
"type": "default"
} }
] ]
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment