Last active
April 23, 2019 13:07
-
-
Save julianladisch/b5239149fc8cbe0f474d2464c7e01108 to your computer and use it in GitHub Desktop.
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
{ | |
"id": "011f811d-8356-484a-90bf-fa2cfbf25a19", | |
"name": "folio-demo.gbv.de", | |
"values": [ | |
{ | |
"key": "OKAPI", | |
"value": "https://folio-demo.gbv.de/okapi", | |
"description": "", | |
"enabled": true | |
} | |
], | |
"_postman_variable_scope": "environment", | |
"_postman_exported_at": "2019-04-11T07:23:53.111Z", | |
"_postman_exported_using": "Postman/7.0.7" | |
} |
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
{ | |
"id": "9d12af9a-3e1d-4823-b3a1-358accba3d61", | |
"name": "folio-testing.aws.indexdata.com", | |
"values": [ | |
{ | |
"key": "OKAPI", | |
"value": "http://folio-testing-backend01.aws.indexdata.com:9130", | |
"description": "", | |
"enabled": true | |
} | |
], | |
"_postman_variable_scope": "environment", | |
"_postman_exported_at": "2019-04-11T07:23:47.057Z", | |
"_postman_exported_using": "Postman/7.0.7" | |
} |
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
{ | |
"info": { | |
"_postman_id": "645cca7c-dec1-4513-9384-3f5275af0b25", | |
"name": "FOLIO Users", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "User aachen POST", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
}, | |
{ | |
"key": "X-Okapi-Tenant", | |
"value": "diku", | |
"type": "text" | |
}, | |
{ | |
"key": "X-Okapi-Token", | |
"value": "{{x-okapi-token}}", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\r\n \"username\" : \"aachen\",\r\n \"id\" : \"7c7a0099-b443-415c-ab5f-34c3bc65f50e\",\r\n \"barcode\" : \"112\",\r\n \"active\" : true,\r\n \"patronGroup\" : \"f2bf7b08-6ead-4498-9227-b379b72d4a4d\",\r\n \"proxyFor\" : [ ],\r\n \"personal\" : {\r\n \"lastName\" : \"Aachen\",\r\n \"firstName\" : \"Annika\",\r\n \"email\" : \"annika.aachen@example.org\",\r\n \"addresses\" : [ ],\r\n \"preferredContactTypeId\" : \"002\"\r\n }\r\n}\r\n" | |
}, | |
"url": { | |
"raw": "{{OKAPI}}/users", | |
"host": [ | |
"{{OKAPI}}" | |
], | |
"path": [ | |
"users" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Perms aachen POST", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"type": "text", | |
"value": "application/json" | |
}, | |
{ | |
"key": "X-Okapi-Tenant", | |
"type": "text", | |
"value": "diku" | |
}, | |
{ | |
"key": "X-Okapi-Token", | |
"type": "text", | |
"value": "{{x-okapi-token}}" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n \"id\": \"7c7a0099-b443-415c-ab5f-34c3bc65f50e\", \n \"userId\" : \"7c7a0099-b443-415c-ab5f-34c3bc65f50e\",\n \"permissions\" : []\n}\n" | |
}, | |
"url": { | |
"raw": "{{OKAPI}}/perms/users", | |
"host": [ | |
"{{OKAPI}}" | |
], | |
"path": [ | |
"perms", | |
"users" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "User aachen GET", | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"type": "text", | |
"value": "application/json" | |
}, | |
{ | |
"key": "X-Okapi-Tenant", | |
"type": "text", | |
"value": "diku" | |
}, | |
{ | |
"key": "X-Okapi-Token", | |
"type": "text", | |
"value": "{{x-okapi-token}}" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "{{OKAPI}}/users/7c7a0099-b443-415c-ab5f-34c3bc65f50e", | |
"host": [ | |
"{{OKAPI}}" | |
], | |
"path": [ | |
"users", | |
"7c7a0099-b443-415c-ab5f-34c3bc65f50e" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "username=aa* GET", | |
"protocolProfileBehavior": { | |
"disableBodyPruning": true | |
}, | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"type": "text", | |
"value": "application/json" | |
}, | |
{ | |
"key": "X-Okapi-Tenant", | |
"type": "text", | |
"value": "diku" | |
}, | |
{ | |
"key": "X-Okapi-Token", | |
"type": "text", | |
"value": "{{x-okapi-token}}" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\r\n \"username\" : \"aachen\",\r\n \"id\" : \"7c7a0099-b443-415c-ab5f-34c3bc65f50e\",\r\n \"barcode\" : \"112\",\r\n \"active\" : true,\r\n \"patronGroup\" : \"f2bf7b08-6ead-4498-9227-b379b72d4a4d\",\r\n \"proxyFor\" : [ ],\r\n \"personal\" : {\r\n \"lastName\" : \"Aachen\",\r\n \"firstName\" : \"Annika von Folio\",\r\n \"email\" : \"annika.aachen@example.org\",\r\n \"addresses\" : [ ],\r\n \"preferredContactTypeId\" : \"002\"\r\n }\r\n}\r\n" | |
}, | |
"url": { | |
"raw": "{{OKAPI}}/users?query=username=aa*", | |
"host": [ | |
"{{OKAPI}}" | |
], | |
"path": [ | |
"users" | |
], | |
"query": [ | |
{ | |
"key": "query", | |
"value": "username=aa*" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "User aachen PUT", | |
"request": { | |
"method": "PUT", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
}, | |
{ | |
"key": "X-Okapi-Tenant", | |
"value": "diku", | |
"type": "text" | |
}, | |
{ | |
"key": "X-Okapi-Token", | |
"value": "{{x-okapi-token}}", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\r\n \"username\" : \"aachen\",\r\n \"id\" : \"7c7a0099-b443-415c-ab5f-34c3bc65f50e\",\r\n \"barcode\" : \"112\",\r\n \"active\" : true,\r\n \"patronGroup\" : \"f2bf7b08-6ead-4498-9227-b379b72d4a4d\",\r\n \"proxyFor\" : [ ],\r\n \"personal\" : {\r\n \"lastName\" : \"Aachen\",\r\n \"firstName\" : \"Annika von Folio\",\r\n \"email\" : \"annika.aachen@example.org\",\r\n \"addresses\" : [ ],\r\n \"preferredContactTypeId\" : \"002\"\r\n }\r\n}\r\n" | |
}, | |
"url": { | |
"raw": "{{OKAPI}}/users/7c7a0099-b443-415c-ab5f-34c3bc65f50e", | |
"host": [ | |
"{{OKAPI}}" | |
], | |
"path": [ | |
"users", | |
"7c7a0099-b443-415c-ab5f-34c3bc65f50e" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "User aachen DELETE", | |
"request": { | |
"method": "DELETE", | |
"header": [ | |
{ | |
"key": "X-Okapi-Tenant", | |
"value": "diku", | |
"type": "text" | |
}, | |
{ | |
"key": "X-Okapi-Token", | |
"value": "{{x-okapi-token}}", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "{{OKAPI}}/users/7c7a0099-b443-415c-ab5f-34c3bc65f50e", | |
"host": [ | |
"{{OKAPI}}" | |
], | |
"path": [ | |
"users", | |
"7c7a0099-b443-415c-ab5f-34c3bc65f50e" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Perms aachen DELETE", | |
"request": { | |
"method": "DELETE", | |
"header": [ | |
{ | |
"key": "X-Okapi-Tenant", | |
"type": "text", | |
"value": "diku" | |
}, | |
{ | |
"key": "X-Okapi-Token", | |
"type": "text", | |
"value": "{{x-okapi-token}}" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "{{OKAPI}}/perms/users/7c7a0099-b443-415c-ab5f-34c3bc65f50e", | |
"host": [ | |
"{{OKAPI}}" | |
], | |
"path": [ | |
"perms", | |
"users", | |
"7c7a0099-b443-415c-ab5f-34c3bc65f50e" | |
] | |
} | |
}, | |
"response": [] | |
} | |
], | |
"event": [ | |
{ | |
"listen": "prerequest", | |
"script": { | |
"id": "16f7f4a1-721f-4807-af70-6a8d6dedb4ab", | |
"type": "text/javascript", | |
"exec": [ | |
"pm.sendRequest({", | |
" url: pm.environment.get(\"OKAPI\") + '/authn/login',", | |
" method: 'POST',", | |
" header: {", | |
" 'content-type': 'application/json',", | |
" 'X-Okapi-Tenant': 'diku'", | |
" },", | |
" body: {", | |
" mode: 'raw',", | |
" raw: '{\"username\":\"diku_admin\",\"password\":\"admin\"}'", | |
" }", | |
"}, function (err, res) {", | |
" pm.test('successful token response', function () {", | |
" pm.expect(err).to.equal(null);", | |
" pm.expect(res).to.have.property('code', 201);", | |
" });", | |
" pm.environment.set(\"x-okapi-token\", res.headers.get('x-okapi-token'));", | |
"});" | |
] | |
} | |
}, | |
{ | |
"listen": "test", | |
"script": { | |
"id": "ea8256b7-2bc9-4153-bf66-00ef20316731", | |
"type": "text/javascript", | |
"exec": [ | |
"" | |
] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment