{"info":{"_postman_id":"c4a21eab-d6a4-4ad5-aa28-f7661dcb05dd","name":"Micro-Service","description":"<html><head></head><body><p>A simple stateless microservice in Nodejs, with three major functionalities -</p>\n<ul>\n<li>Authentication</li>\n<li>JSON patching</li>\n<li>Image Thumbnail Generation</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"3397523","collectionId":"c4a21eab-d6a4-4ad5-aa28-f7661dcb05dd","publishedId":"SVn2PFma","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-09-25T12:20:34.000Z"},"item":[{"name":"Identity","item":[{"name":"Login","id":"254c879e-3019-4306-8271-6a1d20611ef1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"\",\n\t\"password\": \"\"\n}"},"url":"localhost:3000/auth/login","urlObject":{"port":"3000","path":["auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"2236634b-8a72-44dc-98c5-98b18a4206ae","name":"Login (200)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"john\",\n\t\"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"strict-transport-security","value":"max-age=15552000; includeSubDomains"},{"key":"x-download-options","value":"noopen"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-xss-protection","value":"1; mode=block"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"192"},{"key":"etag","value":"W/\"c0-dJ6kckXaYgsXpnzLaRroruLUodM\""},{"key":"date","value":"Wed, 25 Sep 2019 12:09:36 GMT"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImpvaG4iLCJpYXQiOjE1Njk0MTMzNzYsImV4cCI6MTU2OTY3MjU3Nn0.HznsJq62gCN0p48lgRbYC17phOYqT6yKsP5DZDo6-wU\"\n    }\n}"},{"id":"8af6534c-1565-42d0-972a-f4824a64d8cd","name":"Login (401)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"\",\n\t\"password\": \"\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/auth/login"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"strict-transport-security","value":"max-age=15552000; includeSubDomains"},{"key":"x-download-options","value":"noopen"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-xss-protection","value":"1; mode=block"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"50"},{"key":"etag","value":"W/\"32-nHlhgoBn2rOjY/pQURBWBfOmom4\""},{"key":"date","value":"Wed, 25 Sep 2019 12:08:27 GMT"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"message\": \"Invalid credentials\"\n}"}],"_postman_id":"254c879e-3019-4306-8271-6a1d20611ef1"}],"id":"347f3655-b860-4014-9625-f7e0bf175a7c","description":"<p>The authorization service in the Micro-service</p>\n","_postman_id":"347f3655-b860-4014-9625-f7e0bf175a7c"},{"name":"JSON","item":[{"name":"Patch JSON","id":"a0f2e7fc-6661-4cc7-8456-745f3389a22c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImpvaG4iLCJpYXQiOjE1Njk0MTMzNzYsImV4cCI6MTU2OTY3MjU3Nn0.HznsJq62gCN0p48lgRbYC17phOYqT6yKsP5DZDo6-wU","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"document\": { \"firstName\": \"Albert\", \"contactDetails\": { \"phoneNumbers\": [] } },\n\t\"operation\": { \"op\": \"replace\", \"path\": \"/firstName\", \"value\": \"Joachim\" }\n}"},"url":"localhost:3000/json/doc","urlObject":{"port":"3000","path":["json","doc"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"039d20d0-ac16-400e-8fd9-35d8b1905ea4","name":"Patch JSON (401)","originalRequest":{"method":"PATCH","header":[],"url":"localhost:3000/json/doc"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"plain","header":[{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"12"},{"key":"ETag","value":"W/\"c-dAuDFQrdjS3hezqxDTNgW7AOlYk\""},{"key":"Date","value":"Wed, 25 Sep 2019 12:11:57 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Unauthorized"},{"id":"8082c82a-d130-4769-9e75-996a0a9f0cdd","name":"Patch JSON (400)","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImpvaG4iLCJpYXQiOjE1Njk0MTMzNzYsImV4cCI6MTU2OTY3MjU3Nn0.HznsJq62gCN0p48lgRbYC17phOYqT6yKsP5DZDo6-wU","type":"text"}],"url":"localhost:3000/json/doc"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"strict-transport-security","value":"max-age=15552000; includeSubDomains"},{"key":"x-download-options","value":"noopen"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-xss-protection","value":"1; mode=block"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"72"},{"key":"etag","value":"W/\"48-B2Xyrj9y7yKQa5OMjsPah/DxMM4\""},{"key":"date","value":"Wed, 25 Sep 2019 12:13:16 GMT"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"errors\": {\n        \"name\": \"OPERATION_NOT_AN_OBJECT\",\n        \"index\": 0\n    }\n}"},{"id":"91633663-129b-49dc-b8ba-de4cbd0baaee","name":"Patch JSON (200)","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImpvaG4iLCJpYXQiOjE1Njk0MTMzNzYsImV4cCI6MTU2OTY3MjU3Nn0.HznsJq62gCN0p48lgRbYC17phOYqT6yKsP5DZDo6-wU","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"document\": { \"firstName\": \"Albert\", \"contactDetails\": { \"phoneNumbers\": [] } },\n\t\"operation\": { \"op\": \"replace\", \"path\": \"/firstName\", \"value\": \"Joachim\" }\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/json/doc"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"strict-transport-security","value":"max-age=15552000; includeSubDomains"},{"key":"x-download-options","value":"noopen"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-xss-protection","value":"1; mode=block"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"101"},{"key":"etag","value":"W/\"65-NSCNVh8fh4Wqj9Hxm08dq8cf0ak\""},{"key":"date","value":"Wed, 25 Sep 2019 12:15:26 GMT"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"document\": {\n            \"firstName\": \"Joachim\",\n            \"contactDetails\": {\n                \"phoneNumbers\": []\n            }\n        }\n    }\n}"}],"_postman_id":"a0f2e7fc-6661-4cc7-8456-745f3389a22c"}],"id":"97e55fd3-9397-4736-866a-298152f9b051","description":"<p>The Json service which handles JSON related operations in the micro-service architecture.</p>\n","_postman_id":"97e55fd3-9397-4736-866a-298152f9b051"},{"name":"Image","item":[{"name":"Thumbnail","id":"de84edee-52f4-45ad-88da-ecd5d3a5f3d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImpvaG4iLCJpYXQiOjE1Njk0MTMzNzYsImV4cCI6MTU2OTY3MjU3Nn0.HznsJq62gCN0p48lgRbYC17phOYqT6yKsP5DZDo6-wU","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"url\": \"https://cdn.pixabay.com/photo/2015/12/01/20/28/road-1072823__340.jpg\"\n}"},"url":"localhost:3000/image/thumbnail","urlObject":{"port":"3000","path":["image","thumbnail"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"5f2017e5-8bfc-45f5-bae6-11572105a7c0","name":"Thumbnail (401)","originalRequest":{"method":"GET","header":[],"url":"localhost:3000/image/thumbnail"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"plain","header":[{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"12"},{"key":"ETag","value":"W/\"c-dAuDFQrdjS3hezqxDTNgW7AOlYk\""},{"key":"Date","value":"Wed, 25 Sep 2019 12:16:56 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Unauthorized"},{"id":"8b04c436-5541-4d32-8b48-52b89b014d78","name":"Thumbnail (200)","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImpvaG4iLCJpYXQiOjE1Njk0MTMzNzYsImV4cCI6MTU2OTY3MjU3Nn0.HznsJq62gCN0p48lgRbYC17phOYqT6yKsP5DZDo6-wU","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"url\": \"https://cdn.pixabay.com/photo/2015/12/01/20/28/road-1072823__340.jpg\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/image/thumbnail"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"cac501dd-63cb-4d2e-bfd5-77aa535cac67","name":"Thumbnail (400)","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImpvaG4iLCJpYXQiOjE1Njk0MTMzNzYsImV4cCI6MTU2OTY3MjU3Nn0.HznsJq62gCN0p48lgRbYC17phOYqT6yKsP5DZDo6-wU","type":"text"}],"url":"localhost:3000/image/thumbnail"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"strict-transport-security","value":"max-age=15552000; includeSubDomains"},{"key":"x-download-options","value":"noopen"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-xss-protection","value":"1; mode=block"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"81"},{"key":"etag","value":"W/\"51-0bplaI+lcF5HHMRixD6iwKRGVKU\""},{"key":"date","value":"Wed, 25 Sep 2019 12:17:34 GMT"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"message\": \"URL supplied contains an unsupported image format.\"\n}"}],"_postman_id":"de84edee-52f4-45ad-88da-ecd5d3a5f3d0"}],"id":"f3b16f8e-d3a3-46b0-ba9a-89d9a98afc73","description":"<p>The Imsge service which handles Image related operations in the micro-service architecture.</p>\n","_postman_id":"f3b16f8e-d3a3-46b0-ba9a-89d9a98afc73"}]}