{"info":{"_postman_id":"9cb6864d-b8b2-4f59-8ae9-a3ae5826e0ab","name":"Permissions_API","description":"<html><head></head><body><p>Permissions API is designed to implement a set of JSON end-points which allow other parts of a larger application to update and test user access (permissions) over a set of named objects.</p>\n<p>The API deals with:</p>\n<ul>\n<li>a set of Named OBJECTS whose access permissions are being controlled,</li>\n<li>a set of USERNAMES which might have different types of permissions.</li>\n<li>a set of GROUPS that those users may be part of,</li>\n<li>a set of PERMISSIONS which specific users or groups of users might have over\nspecific objects.</li>\n</ul>\n<p>Objects, Usernames, Groups, and Permissions are all referred to in the APIs using unique case INSENSITIVE strings. There are no explicit API calls to create or delete these entities, they are implicitly created at the moment when\nthey are first referred to in any API call.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"9085921","collectionId":"9cb6864d-b8b2-4f59-8ae9-a3ae5826e0ab","publishedId":"SW14TwCX","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-11-03T14:17:09.000Z"},"item":[{"name":"Add user to group","item":[{"name":"http://localhost:3000/addusertogroup","id":"043f1ac5-f82b-49dc-98c1-09ed5f12128e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doctors\",\n\t\"requser\": \"mark\"\n}"},"url":"http://localhost:3000/addusertogroup","description":"<p>Adding user with valid input. </p>\n","urlObject":{"protocol":"http","port":"3000","path":["addusertogroup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"53401880-f30c-41f7-be66-1d649145bf58","name":"http://localhost:3000/addusertogroup","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doctors\",\n\t\"requser\": \"mark\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/addusertogroup"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"49"},{"key":"ETag","value":"W/\"31-AaGO5WKjA8yJx8DC7dWefIWSUoU\""},{"key":"Date","value":"Sun, 03 Nov 2019 10:15:52 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 40,\n    \"groupname\": \"doctors\",\n    \"username\": \"mark\"\n}"}],"_postman_id":"043f1ac5-f82b-49dc-98c1-09ed5f12128e"},{"name":"http://localhost:3000/addusertogroup","id":"7b49c019-736a-4173-afb8-5ef37b2b9890","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doctors\",\n\t\"requser\": \"mark\"\n}"},"url":"http://localhost:3000/addusertogroup","description":"<p>Trying to add same user to same group again</p>\n","urlObject":{"protocol":"http","port":"3000","path":["addusertogroup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"1851409c-67f0-4a27-b6bf-8afab00e00ed","name":"http://localhost:3000/addusertogroup","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doctors\",\n\t\"requser\": \"mark\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/addusertogroup"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"41"},{"key":"ETag","value":"W/\"29-o1JfHJpQLAKTaDDoyNccqGt7vnc\""},{"key":"Date","value":"Sun, 03 Nov 2019 10:19:29 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"This user already exists in this group.\""}],"_postman_id":"7b49c019-736a-4173-afb8-5ef37b2b9890"},{"name":"http://localhost:3000/addusertogroup","id":"c3b5b137-fd08-466a-b61f-9f667a2ace40","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"ds\",\n\t\"requser\": \"mark\"\n}"},"url":"http://localhost:3000/addusertogroup","description":"<p>Groupname or username can not have special char.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["addusertogroup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7072c682-d0e4-4d34-b356-4e9576415a80","name":"http://localhost:3000/addusertogroup","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"dgkfs\",\n\t\"requser\": \"+mark\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/addusertogroup"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"30"},{"key":"ETag","value":"W/\"1e-d55SO5Y+cetEC6YsbjRVl+Rm+Wc\""},{"key":"Date","value":"Sun, 03 Nov 2019 10:21:02 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"Error! Incorrect input data!\""}],"_postman_id":"c3b5b137-fd08-466a-b61f-9f667a2ace40"},{"name":"http://localhost:3000/addusertogroup","id":"e2a48e93-8755-49e2-88a5-5179c1b22321","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"ds\",\n\t\"requser\": \"mark\"\n}"},"url":"http://localhost:3000/addusertogroup","description":"<p>Groupname and username min length 3 char.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["addusertogroup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"9f0af81b-7108-4812-ae86-a57f3001c594","name":"http://localhost:3000/addusertogroup","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"ds\",\n\t\"requser\": \"mark\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/addusertogroup"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"30"},{"key":"ETag","value":"W/\"1e-d55SO5Y+cetEC6YsbjRVl+Rm+Wc\""},{"key":"Date","value":"Sun, 03 Nov 2019 10:23:01 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"Error! Incorrect input data!\""}],"_postman_id":"e2a48e93-8755-49e2-88a5-5179c1b22321"},{"name":"http://localhost:3000/addusertogroup","id":"5b461f56-f228-4734-aedf-be70a848f6be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doctors\",\n\t\"requser\": \"MARK\"\n}"},"url":"http://localhost:3000/addusertogroup","description":"<p>Checking for case insensitivity.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["addusertogroup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"bd7a5cc9-5eec-4b36-be1c-d518b481bc68","name":"http://localhost:3000/addusertogroup","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doctors\",\n\t\"requser\": \"MARK\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/addusertogroup"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"41"},{"key":"ETag","value":"W/\"29-o1JfHJpQLAKTaDDoyNccqGt7vnc\""},{"key":"Date","value":"Sun, 03 Nov 2019 10:26:05 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"This user already exists in this group.\""}],"_postman_id":"5b461f56-f228-4734-aedf-be70a848f6be"},{"name":"http://localhost:3000/addusertogroup","id":"2ea0155c-3e0a-4520-ba7e-b28945bf6280","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doctors\",\n\t\"requser\": \"John\"\n}"},"url":"http://localhost:3000/addusertogroup","description":"<p>Valid input.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["addusertogroup"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2ea0155c-3e0a-4520-ba7e-b28945bf6280"},{"name":"http://localhost:3000/addusertogroup","id":"90a178d5-86d6-46e3-92db-a45baeb6286f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doctors\",\n\t\"requser\": \"lara\"\n}"},"url":"http://localhost:3000/addusertogroup","urlObject":{"protocol":"http","port":"3000","path":["addusertogroup"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"90a178d5-86d6-46e3-92db-a45baeb6286f"}],"id":"3c3697fa-7d49-4425-969c-3193d428b2cd","description":"<p>JSON call for adding a user to a group.</p>\n","event":[{"listen":"prerequest","script":{"id":"24736405-17cd-4d53-a6cd-d4ee215bf285","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"bdf2dde3-c032-4edc-8818-29dc9ddd65d1","type":"text/javascript","exec":[""]}}],"_postman_id":"3c3697fa-7d49-4425-969c-3193d428b2cd"},{"name":"Clear group","item":[{"name":"http://localhost:3000/cleargroup","id":"d4e40d53-af0e-4175-ba8f-af40303ceed3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doc\"\n}"},"url":"http://localhost:3000/cleargroup","description":"<p>Clearing group that does not exists.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["cleargroup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"786944c7-12aa-47ba-a060-b7eff6659080","name":"http://localhost:3000/cleargroup","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doc\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/cleargroup"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"34"},{"key":"ETag","value":"W/\"22-qFKpnqL0a4FpkRnwusC88SlGV2g\""},{"key":"Date","value":"Sun, 03 Nov 2019 10:29:37 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"Error finding group in database.\""}],"_postman_id":"d4e40d53-af0e-4175-ba8f-af40303ceed3"},{"name":"http://localhost:3000/cleargroup","id":"326857cf-79f8-45b6-8831-2dc3584a96fc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doctors\"\n}"},"url":"http://localhost:3000/cleargroup","description":"<p>Clearing existing group.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["cleargroup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7f68b759-a0a3-4049-9286-c3b6e6a713ff","name":"http://localhost:3000/cleargroup","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqgroup\": \"doctors\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/cleargroup"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"38"},{"key":"ETag","value":"W/\"26-VGRoqJwASytbUljgEJIbAz60UhA\""},{"key":"Date","value":"Sun, 03 Nov 2019 10:32:02 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"Total of 2 users cleared from group.\""}],"_postman_id":"326857cf-79f8-45b6-8831-2dc3584a96fc"}],"id":"6cc632a6-8ed6-4e02-8d55-f239d4fd80ac","description":"<p>JSON call for clearing all users from a group.</p>\n","event":[{"listen":"prerequest","script":{"id":"175f1e1e-55b3-4d5b-888a-9654807ab2cf","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a8b5736f-4cba-4d34-820c-986d537c87ae","type":"text/javascript","exec":[""]}}],"_postman_id":"6cc632a6-8ed6-4e02-8d55-f239d4fd80ac"},{"name":"Add permission","item":[{"name":"http://localhost:3000/addpermission","id":"d753c90a-f778-4b1c-a0e8-ad39c16a72bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"doctors\",\n\t\"reqownertype\": \"group\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"listen\"\n}"},"url":"http://localhost:3000/addpermission","description":"<p>Valid input for group permission.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["addpermission"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"762a1212-e7c8-4945-8ef6-d48c5c249787","name":"http://localhost:3000/addpermission","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"doctors\",\n\t\"reqownertype\": \"group\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"listen\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/addpermission"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"85"},{"key":"ETag","value":"W/\"55-xW73sFV1gFheRsIQ8j0IqBn5oD8\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:19:53 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 22,\n    \"ownertype\": \"group\",\n    \"owner\": \"doctors\",\n    \"objname\": \"stetoscop\",\n    \"type\": \"listen\"\n}"}],"_postman_id":"d753c90a-f778-4b1c-a0e8-ad39c16a72bc"},{"name":"http://localhost:3000/addpermission","id":"ec5ba960-4c4c-4c9d-959e-ca00d43809f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"doctors\",\n\t\"reqownertype\": \"group\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"listen\"\n}"},"url":"http://localhost:3000/addpermission","description":"<p>Try to add same permission twice. </p>\n","urlObject":{"protocol":"http","port":"3000","path":["addpermission"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6e53d95a-3121-4cf1-84ef-c6b8df4d9f4b","name":"http://localhost:3000/addpermission","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"doctors\",\n\t\"reqownertype\": \"group\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"listen\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/addpermission"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"33"},{"key":"ETag","value":"W/\"21-eMGxuhMPh6+EluumHKrQlM0L0do\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:21:23 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"This permission already exists.\""}],"_postman_id":"ec5ba960-4c4c-4c9d-959e-ca00d43809f6"},{"name":"http://localhost:3000/addpermission","id":"7b6c0157-f73c-4787-9fc7-3d1285fda2ff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqownertype\": \"User\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"listen\"\n}"},"url":"http://localhost:3000/addpermission","description":"<p>Valid input for user persmission. </p>\n","urlObject":{"protocol":"http","port":"3000","path":["addpermission"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"ecd88db2-b643-4f34-af23-ba77c6d047c8","name":"http://localhost:3000/addpermission","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqownertype\": \"User\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"listen\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/addpermission"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"81"},{"key":"ETag","value":"W/\"51-7YcwxgvzHRhapSRWMJZNrFW9Y8k\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:22:19 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 23,\n    \"ownertype\": \"User\",\n    \"owner\": \"lara\",\n    \"objname\": \"stetoscop\",\n    \"type\": \"listen\"\n}"}],"_postman_id":"7b6c0157-f73c-4787-9fc7-3d1285fda2ff"},{"name":"http://localhost:3000/addpermission","id":"56b5aab3-b836-457f-9657-a119c871e40a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqownertype\": \"Userhj\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"carry\"\n}"},"url":"http://localhost:3000/addpermission","urlObject":{"protocol":"http","port":"3000","path":["addpermission"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"56b5aab3-b836-457f-9657-a119c871e40a"},{"name":"http://localhost:3000/addpermission","id":"398d6983-274c-4da6-a4da-924d90382bf9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqownertype\": \"Userhj\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"carry\"\n}"},"url":"http://localhost:3000/addpermission","description":"<p>Owner type is not group or user. </p>\n","urlObject":{"protocol":"http","port":"3000","path":["addpermission"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f86f54c8-9627-4598-ae5f-9a28c9c68af9","name":"http://localhost:3000/addpermission","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqownertype\": \"Userhj\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"carry\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/addpermission"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"30"},{"key":"ETag","value":"W/\"1e-d55SO5Y+cetEC6YsbjRVl+Rm+Wc\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:27:46 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"Error! Incorrect input data!\""}],"_postman_id":"398d6983-274c-4da6-a4da-924d90382bf9"},{"name":"http://localhost:3000/addpermission","id":"fe9ea3fb-9d80-4fca-8753-2d0203ea1957","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"l?+a\",\n\t\"reqownertype\": \"User\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"carry\"\n}"},"url":"http://localhost:3000/addpermission","description":"<p>Invalid input data. </p>\n","urlObject":{"protocol":"http","port":"3000","path":["addpermission"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"d8718be6-592e-4225-97b8-263231e7492f","name":"http://localhost:3000/addpermission","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"l?+a\",\n\t\"reqownertype\": \"User\",\n\t\"reqobjname\" : \"stetoscop\",\n\t\"reqtype\" : \"carry\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/addpermission"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"30"},{"key":"ETag","value":"W/\"1e-d55SO5Y+cetEC6YsbjRVl+Rm+Wc\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:29:36 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"Error! Incorrect input data!\""}],"_postman_id":"fe9ea3fb-9d80-4fca-8753-2d0203ea1957"}],"id":"2a16a686-fe4a-4429-8fa2-4d4b7ddeaa73","description":"<p>JSON call for adding a permission to user or group.</p>\n","event":[{"listen":"prerequest","script":{"id":"af40be3b-3cb3-4f6c-922b-f95f668319b3","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"cf08b76a-972e-4793-a9ac-647912f216a9","type":"text/javascript","exec":[""]}}],"_postman_id":"2a16a686-fe4a-4429-8fa2-4d4b7ddeaa73"},{"name":"Test permission","item":[{"name":"http://localhost:3000/testuserperm","id":"fca9dd03-eb21-4530-b023-16f0d16c56ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"jon\",\n\t\"reqobjname\": \"stetoscop\",\n\t\"reqtype\": \"le\"\n}"},"url":"http://localhost:3000/testuserperm","description":"<p>No existing permission.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["testuserperm"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"274fa5d7-eaf9-4133-aeea-c31da0c503fc","name":"http://localhost:3000/testuserperm","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"jon\",\n\t\"reqobjname\": \"stetoscop\",\n\t\"reqtype\": \"le\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/testuserperm"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"5"},{"key":"ETag","value":"W/\"5-fLbvuYullyqbUJDcLlF/4U0SywQ\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:33:38 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"false"}],"_postman_id":"fca9dd03-eb21-4530-b023-16f0d16c56ad"},{"name":"http://localhost:3000/testuserperm","id":"ef10d34a-5a93-4b37-ac7c-063571100ae0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqobjname\": \"stetoscop\",\n\t\"reqtype\": \"carry\"\n}"},"url":"http://localhost:3000/testuserperm","description":"<p>Existing permission - directly associated. </p>\n","urlObject":{"protocol":"http","port":"3000","path":["testuserperm"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"71f51932-e91c-46ed-b230-f80cfe24fcc6","name":"http://localhost:3000/testuserperm","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqobjname\": \"stetoscop\",\n\t\"reqtype\": \"carry\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/testuserperm"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"4"},{"key":"ETag","value":"W/\"4-X/5TO4MPCKAyY0ipFgr6/IraRNs\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:35:33 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"true"}],"_postman_id":"ef10d34a-5a93-4b37-ac7c-063571100ae0"},{"name":"http://localhost:3000/testuserperm","id":"494c65fc-294e-4d43-af6d-522d2281550b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqobjname\": \"stetoscop\",\n\t\"reqtype\": \"listen\"\n}"},"url":"http://localhost:3000/testuserperm","description":"<p>Existing permission - inherited from grouo.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["testuserperm"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"94146e15-e8a8-40f5-a3af-70721e7d2cd1","name":"http://localhost:3000/testuserperm","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqobjname\": \"stetoscop\",\n\t\"reqtype\": \"listen\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/testuserperm"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"4"},{"key":"ETag","value":"W/\"4-X/5TO4MPCKAyY0ipFgr6/IraRNs\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:36:58 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"true"}],"_postman_id":"494c65fc-294e-4d43-af6d-522d2281550b"},{"name":"http://localhost:3000/testuserperm","id":"7734ed30-a56d-4f2b-9286-1862521f4dec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqobjname\": \"stetoscop\",\n\t\"reqtype\": \"listen\"\n}"},"url":"http://localhost:3000/testuserperm","description":"<p>Testing permission inherited from group.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["testuserperm"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7a9e2688-1854-4769-97ae-d9120957370b","name":"http://localhost:3000/testuserperm","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqobjname\": \"stetoscop\",\n\t\"reqtype\": \"listen\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/testuserperm"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"4"},{"key":"ETag","value":"W/\"4-X/5TO4MPCKAyY0ipFgr6/IraRNs\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:53:08 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"true"}],"_postman_id":"7734ed30-a56d-4f2b-9286-1862521f4dec"}],"id":"1e55acb5-84c1-4d67-824b-da924604caf4","description":"<p>JSON call for testing if a particular user has a particular permission over a particular object.</p>\n<p>NOTE: Testing only for users. A user has a particular permission over a particular object if they have been\ndirectly assigned that permission to that object, or if they are part of a group which has been assigned that permission.</p>\n","event":[{"listen":"prerequest","script":{"id":"8808cf7d-fe6c-4ef2-b427-015aff0c7d5b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"99ee3938-b8c1-40d1-8f26-2e91c9642d15","type":"text/javascript","exec":[""]}}],"_postman_id":"1e55acb5-84c1-4d67-824b-da924604caf4"},{"name":"Clear permission","item":[{"name":"http://localhost:3000/clearpermissions","id":"58474d45-d050-4fe6-9326-ff40680f7fc1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"Jak\",\n\t\"reqownertype\": \"user\"\n}"},"url":"http://localhost:3000/clearpermissions","description":"<p>Clear non existing permissions.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["clearpermissions"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"a77dcfcb-56af-4f1b-a8b7-413ae3118e19","name":"http://localhost:3000/clearpermissions","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"Jak\",\n\t\"reqownertype\": \"user\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/clearpermissions"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"46"},{"key":"ETag","value":"W/\"2e-tgQJBGF83JnZQW9CjGNf0V5JoNs\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:41:00 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"Error finding permissions owner in database.\""}],"_postman_id":"58474d45-d050-4fe6-9326-ff40680f7fc1"},{"name":"http://localhost:3000/clearpermissions","id":"c1e74b5f-12f2-4e41-9431-21da165b5641","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqownertype\": \"user\"\n}"},"url":"http://localhost:3000/clearpermissions","description":"<p>Clear existing permissions.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["clearpermissions"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"302adaa8-096c-4e65-9721-daa9d66ef8e4","name":"http://localhost:3000/clearpermissions","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"reqowner\": \"lara\",\n\t\"reqownertype\": \"user\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/clearpermissions"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"48"},{"key":"ETag","value":"W/\"30-gKLE5P7eJDI0d6SSKkcptrRTGVM\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:42:45 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"Total of 2 permissions cleared from user lara.\""}],"_postman_id":"c1e74b5f-12f2-4e41-9431-21da165b5641"}],"id":"aee428ca-9095-4b69-82ac-81152f11fc2e","description":"<p>JSON call for clearing all permissions directly associated with a user or group.</p>\n<p>NOTE: This clear operation does not affect permissions that are inherited by a user from group membership.</p>\n","event":[{"listen":"prerequest","script":{"id":"4ffb4369-ebea-4d46-982c-945de729eb97","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"d7cc70f1-63ff-433e-ad1d-ce70953499a7","type":"text/javascript","exec":[""]}}],"_postman_id":"aee428ca-9095-4b69-82ac-81152f11fc2e"},{"name":"Query permision","item":[{"name":"http://localhost:3000/querypermiss","id":"f783fded-e0be-4d52-a227-9046759b2629","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"requser\": \"doctors\",\n\t\"reqobject\" : \"stetoscop\"\n}"},"url":"http://localhost:3000/querypermiss","description":"<p>Query for group not possible. Only for users</p>\n","urlObject":{"protocol":"http","port":"3000","path":["querypermiss"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e0f2df84-aff2-4043-bf69-c809808c9069","name":"http://localhost:3000/querypermiss","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Name","value":"Sally","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n\t\"requser\": \"doctors\",\n\t\"reqobject\" : \"stetoscop\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/querypermiss"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"36"},{"key":"ETag","value":"W/\"24-8gAegfOkPwL8yEwQeeuOxzfgrJk\""},{"key":"Date","value":"Sun, 03 Nov 2019 13:56:58 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"No query object permissions found.\""}],"_postman_id":"f783fded-e0be-4d52-a227-9046759b2629"},{"name":"http://localhost:3000/querypermiss","id":"7fed9c8b-fe5b-463c-a7fe-5678b821d2c0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"requser\": \"lara\",\n\t\"reqobject\" : \"stetoscop\"\n}"},"url":"http://localhost:3000/querypermiss","description":"<p>Valid input. </p>\n","urlObject":{"protocol":"http","port":"3000","path":["querypermiss"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7fed9c8b-fe5b-463c-a7fe-5678b821d2c0"}],"id":"e0520b87-b3f4-4f2a-a1be-13b849ad2efa","description":"<p>JSON call for querying what permissions a particular user has over a particular object.</p>\n<p>NOTE: Query only for users. A user has a particular permission over a particular object if they have been\ndirectly assigned that permission to that object, or if they are part of a group which has been assigned that permission.</p>\n","event":[{"listen":"prerequest","script":{"id":"7b530689-61c2-4b8e-a5e7-fca4d8260c39","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"14f0a52e-227d-4def-8836-b1f2742a8ff3","type":"text/javascript","exec":[""]}}],"_postman_id":"e0520b87-b3f4-4f2a-a1be-13b849ad2efa"}],"event":[{"listen":"prerequest","script":{"id":"273590c6-3ed5-4a79-b675-86423d084af0","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5ab0f0ad-022f-44d3-95b7-dd0030e57829","type":"text/javascript","exec":[""]}}]}