{"info":{"_postman_id":"bfb6476c-c591-4f0e-bfb2-3fcac058cc1f","name":"deviceOwnershipApi","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"31491622","collectionId":"bfb6476c-c591-4f0e-bfb2-3fcac058cc1f","publishedId":"2s9Ykn9hDn","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-12-17T23:43:28.000Z"},"item":[{"name":"testHello","id":"a4af4c2f-e845-4c6a-8747-f249290efda7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{bearerToken}}"}]},"isInherited":false},"method":"GET","header":[],"url":"https://yz0twwom62.execute-api.us-east-1.amazonaws.com/dev/deviceHello/123","urlObject":{"path":["dev","deviceHello","123"],"host":["https://yz0twwom62.execute-api.us-east-1.amazonaws.com"],"query":[],"variable":[]}},"response":[{"id":"1a546c45-0891-4aac-908e-a8b08ce24b46","name":"testHello","originalRequest":{"method":"GET","header":[],"url":"https://yz0twwom62.execute-api.us-east-1.amazonaws.com/dev/deviceHello/123"},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Content-Length","value":"28"},{"key":"Connection","value":"keep-alive"},{"key":"Date","value":"Wed, 29 Nov 2023 16:38:52 GMT"},{"key":"x-amzn-RequestId","value":"9c577734-8f5f-408f-a69b-7ff33491fa0d"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-headers","value":"*"},{"key":"x-amzn-Remapped-content-length","value":"28"},{"key":"x-amzn-Remapped-connection","value":"close"},{"key":"x-amz-apigw-id","value":"PK1ccGJYoAMELnw="},{"key":"etag","value":"W/\"1c-kFwvHWBi4BRh/4mupW0P50sanNs\""},{"key":"x-powered-by","value":"Express"},{"key":"X-Amzn-Trace-Id","value":"Root=1-6567691c-4efa9eca718cc848686ca7af;Sampled=0;lineage=cd9cecef:0"},{"key":"x-amzn-Remapped-date","value":"Wed, 29 Nov 2023 16:38:52 GMT"},{"key":"X-Cache","value":"Miss from cloudfront"},{"key":"Via","value":"1.1 b6b3763e07a2a3280ef90f8be16c62e2.cloudfront.net (CloudFront)"},{"key":"X-Amz-Cf-Pop","value":"YTO50-C2"},{"key":"X-Amz-Cf-Id","value":"pA0wHG8pBsAiDZQGuBwzK1xhabwBrQTl1YidBN-0D4vYZtjXcAvzuw=="}],"cookie":[],"responseTime":null,"body":"Hello Device, your ID is 123"}],"_postman_id":"a4af4c2f-e845-4c6a-8747-f249290efda7"},{"name":"getDevices","id":"852085ae-c3e3-4d08-a2f0-b36644cf4b58","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{bearerToken}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"https://yz0twwom62.execute-api.us-east-1.amazonaws.com/dev/device/getDevices/ri@microgreen.ca","description":"<p>Gets the list of devices that the user is allowed to see. If the userEmail ends with @microgreen.ca, it returns all the devices in the database.</p>\n","urlObject":{"path":["dev","device","getDevices","ri@microgreen.ca"],"host":["https://yz0twwom62.execute-api.us-east-1.amazonaws.com"],"query":[],"variable":[]}},"response":[{"id":"37d2f93e-b220-429a-ab0a-c2f6ee7fd339","name":"getDevices","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"https://yz0twwom62.execute-api.us-east-1.amazonaws.com/dev/device/getDevices/ri@microgreen.ca"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"64"},{"key":"Connection","value":"keep-alive"},{"key":"Date","value":"Wed, 29 Nov 2023 20:02:45 GMT"},{"key":"x-amzn-RequestId","value":"2628e893-956c-40c4-81e2-2f60b7d21b10"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-headers","value":"*"},{"key":"x-amzn-Remapped-content-length","value":"64"},{"key":"x-amzn-Remapped-connection","value":"close"},{"key":"x-amz-apigw-id","value":"PLTTvHcaoAMEJCw="},{"key":"etag","value":"W/\"40-5npqajmn4m1EyrxYU1FYjVyPG3g\""},{"key":"x-powered-by","value":"Express"},{"key":"X-Amzn-Trace-Id","value":"Root=1-656798e4-6db7e4f92f3a11e11e89e58a;Sampled=0;lineage=cd9cecef:0"},{"key":"x-amzn-Remapped-date","value":"Wed, 29 Nov 2023 20:02:45 GMT"},{"key":"X-Cache","value":"Miss from cloudfront"},{"key":"Via","value":"1.1 7e0f00253118236873554f5fc0d07dac.cloudfront.net (CloudFront)"},{"key":"X-Amz-Cf-Pop","value":"YTO50-C2"},{"key":"X-Amz-Cf-Id","value":"MNiwk-GVfs6a6wu2Ju9i8xLlIUzMgP0YL2_aRDYLZrSjnaLMkuxzeg=="}],"cookie":[],"responseTime":null,"body":"{\n    \"userEmail\": \"ri@microgreen.ca\",\n    \"macAddresses\": [\n        \"A07AF9AB6224\"\n    ]\n}"}],"_postman_id":"852085ae-c3e3-4d08-a2f0-b36644cf4b58"},{"name":"addDevice","id":"db3e88a4-60f2-461b-8fe4-932c45c49516","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{bearerToken}}"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"userEmail\": \"riri.hong@gmail.com\",\n    \"macAddress\": \"A07AF9AB6224\"\n}","options":{"raw":{"language":"json"}}},"url":"https://yz0twwom62.execute-api.us-east-1.amazonaws.com/dev/device/addDevice","description":"<p>Adds the device to the list of macAddresses associated with the user. If the user does not exist, it will create an entry with the userEmail and the macAddress. If the macAddress already exists in the user's list, it will return a 409 conflict error.</p>\n","urlObject":{"path":["dev","device","addDevice"],"host":["https://yz0twwom62.execute-api.us-east-1.amazonaws.com"],"query":[],"variable":[]}},"response":[{"id":"01a18222-8806-420d-91e8-160413f0cc4e","name":"addDevice","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"userEmail\": \"ri@microgreen.ca\",\n    \"macAddress\": \"A07AF9AB6226\"\n}","options":{"raw":{"language":"json"}}},"url":"https://yz0twwom62.execute-api.us-east-1.amazonaws.com/dev/device/addDevice"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"59"},{"key":"Connection","value":"keep-alive"},{"key":"Date","value":"Wed, 29 Nov 2023 21:20:00 GMT"},{"key":"x-amzn-RequestId","value":"d0634c8f-cf81-43dd-b107-afce2efe272d"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-headers","value":"*"},{"key":"x-amzn-Remapped-content-length","value":"59"},{"key":"x-amzn-Remapped-connection","value":"close"},{"key":"x-amz-apigw-id","value":"PLen-FhxoAMEekA="},{"key":"etag","value":"W/\"3b-n4OxMR+9FqEKqpkBzAxMZdrvimU\""},{"key":"x-powered-by","value":"Express"},{"key":"X-Amzn-Trace-Id","value":"Root=1-6567aaff-5d2c92200cbd018f08789924;Sampled=0;lineage=cd9cecef:0"},{"key":"x-amzn-Remapped-date","value":"Wed, 29 Nov 2023 21:20:00 GMT"},{"key":"X-Cache","value":"Miss from cloudfront"},{"key":"Via","value":"1.1 415bce851abed41a15ccdf56a782926a.cloudfront.net (CloudFront)"},{"key":"X-Amz-Cf-Pop","value":"YTO50-C2"},{"key":"X-Amz-Cf-Id","value":"ByQkEz_FkTf94o9DCF-ZxfxnQTVx2wpc5EZumH6WDT0q4BK5YXOiXA=="}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": \"Operation succeeded\",\n    \"url\": \"/device/addDevice\"\n}"}],"_postman_id":"db3e88a4-60f2-461b-8fe4-932c45c49516"},{"name":"deleteDevice","id":"df84bcbd-fd0f-475f-83d3-d6177ace3266","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{bearerToken}}"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"userEmail\": \"riri.hong@gmail.com\",\n    \"macAddress\": \"TestMacAddress2\"\n}","options":{"raw":{"language":"json"}}},"url":"https://yz0twwom62.execute-api.us-east-1.amazonaws.com/dev/device/deleteDevice","description":"<p>Adds the device to the list of macAddresses associated with the user. If the user does not exist, it will create an entry with the userEmail and the macAddress. If the macAddress already exists in the user's list, it will return a 409 conflict error.</p>\n","urlObject":{"path":["dev","device","deleteDevice"],"host":["https://yz0twwom62.execute-api.us-east-1.amazonaws.com"],"query":[],"variable":[]}},"response":[{"id":"88ef3338-c8b7-446a-a0c1-84a4925a278d","name":"deleteDevice","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"userEmail\": \"riri.hong@gmail.com\",\n    \"macAddress\": \"TestMacAddress2\"\n}","options":{"raw":{"language":"json"}}},"url":"https://yz0twwom62.execute-api.us-east-1.amazonaws.com/dev/device/deleteDevice"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"74"},{"key":"Connection","value":"keep-alive"},{"key":"Date","value":"Fri, 08 Dec 2023 14:38:25 GMT"},{"key":"x-amzn-RequestId","value":"d50b9a7e-2b6d-416c-87b7-6a6172a6eddc"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-headers","value":"*"},{"key":"x-amzn-Remapped-content-length","value":"74"},{"key":"x-amzn-Remapped-connection","value":"close"},{"key":"x-amz-apigw-id","value":"PoOPNGKgoAMEPgQ="},{"key":"etag","value":"W/\"4a-BRj8QdGcvW+wEu0VWQ0UwXMiLk0\""},{"key":"x-powered-by","value":"Express"},{"key":"X-Amzn-Trace-Id","value":"Root=1-65732a61-498e3e902134310e1e070990;Sampled=0;lineage=cd9cecef:0"},{"key":"x-amzn-Remapped-date","value":"Fri, 08 Dec 2023 14:38:25 GMT"},{"key":"X-Cache","value":"Miss from cloudfront"},{"key":"Via","value":"1.1 f8d2e956e186aef5f6c9bb38469c0bc4.cloudfront.net (CloudFront)"},{"key":"X-Amz-Cf-Pop","value":"YTO50-C2"},{"key":"X-Amz-Cf-Id","value":"lxAuuAGMCkPGuFH-dEAuoknujf7g6ZBbMes_3i6TGuaJ_6X9vHJs6g=="}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": \"macAddress removed successfully\",\n    \"url\": \"/device/deleteDevice\"\n}"}],"_postman_id":"df84bcbd-fd0f-475f-83d3-d6177ace3266"}],"variable":[{"key":"baseUrl","value":"https://yz0twwom62.execute-api.us-east-1.amazonaws.com"},{"key":"id","value":"123"},{"key":"userEmail","value":"ri@microgreen.ca"}]}