{"info":{"_postman_id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","name":"802 Secure/LOCH Incidents API","description":"<html><head></head><body><p>This API handles the calls between the incident tracker application and the LOCH/802 Secure Cloud.</p>\n<p>Incidents are the thread that connect an AirShield-observed device to an in-the-field person tasked with finding the device. Using a mobile device instead of fixed equipment provides the responder the ability to use all of their senses to uncover rogue and malicious wireless devices.</p>\n<p>Support for this API is available through email @ <a href=\"https://mailto:support@loch.io\">support@loch.io</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"2715762","collectionId":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","publishedId":"Szzefzej","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2025-05-12T17:04:42.000Z"},"item":[{"name":"register","id":"46b0a052-142f-41db-81ca-e0e423bd1391","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"device_id\": \"12345\",\n    \"activation_code\": \"GW84Z2\"\n}"},"url":"https://api.802secure.net/apiv1/incident/register","description":"<p>Registers a unique device id along with an activation key for the user to enter at the Console. Activation key should be a six-character alphanumeric that is easy to read and enter. It should be unique if the device is being re-registered due to inactivity.</p>\n<p>Returns JWT access and refresh tokens when the activation process has been completed on the Console. Store both tokens for API use.</p>\n","urlObject":{"path":["incident","register"],"host":["https://api.802secure.net/apiv1"],"query":[],"variable":[]}},"response":[{"id":"b02f01f1-0bfa-44d2-a4c1-aed0e2b5c7c7","name":"registered_for_activation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"device_id\": \"123456\",\n    \"activation_code\": \"GW84Z2\"\n}"},"url":"https://api.802secure.net/apiv1/incident/register"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 21:16:02 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"127"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Tue, 20 May 2025 22:16:02 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": {\n        \"code\": \"REGISTERED_FOR_ACTIVATION\",\n        \"descr\": \"Device added for activation\"\n    },\n    \"status\": \"ok\"\n}"},{"id":"bac9fd26-4086-4603-99a8-c492bbecf2c3","name":"pending_activation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"device_id\": \"123456\"\n}"},"url":"https://api.802secure.net/apiv1/incident/register"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 21:16:43 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"123"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Tue, 20 May 2025 22:16:43 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": {\n        \"code\": \"PENDING_ACTIVATION\",\n        \"descr\": \"Pending activation by customer\"\n    },\n    \"status\": \"ok\"\n}"},{"id":"250bf360-454d-4b99-a003-cfc846cd7e69","name":"device_activated","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"device_id\": \"12345\",\n    \"activation_code\": \"GW84Z2\"\n}"},"url":"https://api.802secure.net/apiv1/incident/register"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 20:27:49 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"851"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Tue, 20 May 2025 21:27:49 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"jwt-access-token\",\n    \"message\": {\n        \"code\": \"DEVICE_ACTIVATED\",\n        \"descr\": \"Device activated\"\n    },\n    \"refresh_token\": \"jwt-refresh-token\",\n    \"status\": \"ok\"\n}"}],"_postman_id":"46b0a052-142f-41db-81ca-e0e423bd1391"},{"name":"login","id":"dcb52fa7-bc1f-4eeb-a075-9af792548797","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://api.802secure.net/apiv1/incident/login","description":"<p>Validates the JWT access token by logging in. This call will help validate whether or not you need to attempt a refresh request or restart the device registration process.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","name":"802 Secure/LOCH Incidents API","type":"collection"}},"urlObject":{"path":["incident","login"],"host":["https://api.802secure.net/apiv1"],"query":[],"variable":[]}},"response":[{"id":"1f299fbb-28b2-41f2-82b2-f88b12441dfc","name":"device_login_success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://api.802secure.net/apiv1/incident/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 21:17:14 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"115"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Tue, 20 May 2025 22:17:14 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": {\n        \"code\": \"DEVICE_LOGIN_SUCCESS\",\n        \"descr\": \"Device login success\"\n    },\n    \"status\": \"ok\"\n}"},{"id":"9ac8887e-8c02-4613-bde3-cef2f79904c4","name":"jwt token expired","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://api.802secure.net/apiv1/incident/login"},"status":"UNAUTHORIZED","code":401,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 23:37:21 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"150"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Wed, 21 May 2025 00:37:21 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"JWT_TOKEN_EXPIRED\",\n    \"error_message\": {\n        \"code\": \"JWT_TOKEN_EXPIRED\",\n        \"descr\": \"Token has expired\"\n    },\n    \"status\": \"error\"\n}"}],"_postman_id":"dcb52fa7-bc1f-4eeb-a075-9af792548797"},{"name":"refresh","id":"4b17ec51-7e36-474e-b72e-61d59b61bdc7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"https://api.802secure.net/apiv1/incident/refresh","description":"<p>Refresh the access token associated with the device. </p>\n","urlObject":{"path":["incident","refresh"],"host":["https://api.802secure.net/apiv1"],"query":[],"variable":[]}},"response":[{"id":"ee547ca9-0dd8-4c5b-9025-ddb5c3e86ee7","name":"invalid token","originalRequest":{"method":"GET","header":[],"url":"https://api.802secure.net/apiv1/incident/refresh"},"status":"UNAUTHORIZED","code":401,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 21:39:07 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"146"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Tue, 20 May 2025 22:39:07 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"JWT_TOKEN_INVALID\",\n    \"error_message\": {\n        \"code\": \"JWT_TOKEN_INVALID\",\n        \"descr\": \"Invalid token\"\n    },\n    \"status\": \"error\"\n}"},{"id":"cc656115-23c6-4fee-8afa-66886809f083","name":"valid refresh","originalRequest":{"method":"GET","header":[],"url":"https://api.802secure.net/apiv1/incident/refresh"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 21:41:27 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"432"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Tue, 20 May 2025 22:41:27 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"access_token\": \"jwt-token-here\"\n    },\n    \"status\": \"success\"\n}"}],"_postman_id":"4b17ec51-7e36-474e-b72e-61d59b61bdc7"},{"name":"fetch incidents","id":"3f701f6f-99d4-4d78-b241-98af47653011","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.802secure.net/apiv1/incident/assigned/:page","description":"<p>Return incidents assigned to the device in open state ordered by time, up to 20 entries at a time. Passing a page number will begin from the 20+{page} record.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","name":"802 Secure/LOCH Incidents API","type":"collection"}},"urlObject":{"path":["incident","assigned",":page"],"host":["https://api.802secure.net/apiv1"],"query":[],"variable":[{"description":{"content":"<p>Pagination page</p>\n","type":"text/plain"},"type":"any","value":"0","key":"page"}]}},"response":[{"id":"4323e6f6-e97c-468b-8b10-e184bf841517","name":"active incidents","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://api.802secure.net/apiv1/incident/assigned/:page","host":["https://api.802secure.net/apiv1"],"path":["incident","assigned",":page"],"variable":[{"key":"page","value":"0","description":"Pagination page"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 21 May 2025 00:17:15 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Cf-Ray","value":"942fe3c79a7a7c61-LAX"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"Cf-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=9D8RhP5Y53eEy7ibd9wyvDKyVBbZdZaE4hxVEMrc%2BDLUC%2F1J%2B1j%2FNoZHXUV%2Bnzsi5oTRs%2FnbDgG3XNlO5u%2FGb2OrnGX6E5vRHw3N9gWDLeVquZQjxZO41UE3pWr9HuMZ3sb7sNEE\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"Nel","value":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Strict-Transport-Security","value":"max-age=15552000"},{"key":"Set-Cookie","value":"session=2a283152-11fd-43d9-90df-4784ca0a4e2f.11kd2oZAqu30WB9GuwOQ5VR0lIY; HttpOnly; Path=/; Expires=Wed, 21 May 2025 01:17:15 GMT"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"},{"key":"server-timing","value":"cfL4;desc=\"?proto=TCP&rtt=20917&min_rtt=15451&rtt_var=5290&sent=92&recv=85&lost=0&retrans=0&sent_bytes=7718&recv_bytes=2854&delivery_rate=368964&cwnd=241&unsent_bytes=0&cid=e7c3b5da8a90473f&ts=76116&x=0\""}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"incidents\": [\n            {\n                \"active_duration\": 271,\n                \"created\": \"2025-05-21T00:12:43.736991\",\n                \"descr\": \"###### Device last seen on 05/20/2025 at 17:11 by 062018V2A10300\\n* BSSID: CC:6E:2A:C7:C8:D0\\n* ESSID: Choose Another Castle\\n* Manufacturer: Unknown\\n* Encryption: PSK/WPA3-Personal (Transitional)/WPA2\\n* Channel: 1\\n* Clients: 2\\n* Tags: \\n\\n\",\n                \"device_info\": [\n                    {\n                        \"device\": {\n                            \"bssid\": \"CC:6E:2A:C7:C8:D0\",\n                            \"channel\": 1,\n                            \"essid\": \"Choose Another Castle\",\n                            \"last_signal_dbm\": -53,\n                            \"lastseen\": \"2025-05-21T00:16:31.593216\",\n                            \"manuf\": \"Unknown\",\n                            \"gpsinfo\":  {\n                                \"altitude\": 0,\n                                \"latitude\": 37.8477274,\n                                \"longitude\": -122.2901898\n                            }\n                        },\n                        \"sensors\": [\n                            {\n                                \"details\": \"New AIRSHIELD -- Edit Settings\",\n                                \"gpsinfo\": {\n                                    \"altitude\": 0,\n                                    \"latitude\": 37.8477274,\n                                    \"longitude\": -122.2901898\n                                },\n                                \"name\": \"062018V2A10537\",\n                                \"timestamp\": \"2025-05-21T00:16:31.593216\"\n                            }\n                        ]\n                    }\n                ],\n                \"display_name\": \"INC-6\",\n                \"id\": \"6dWPjxYKx4nMkGyZ\",\n                \"notes\": [],\n                \"severity\": 2,\n                \"summary\": \"Access Point - Choose Another Castle (CC:6E:2A:C7:C8:D0)\",\n                \"type\": \"0\",\n                \"updated\": \"2025-05-21T00:16:42.411942\"\n            }\n        ]\n    },\n    \"status\": \"success\"\n}"}],"_postman_id":"3f701f6f-99d4-4d78-b241-98af47653011"},{"name":"incident detail","id":"6499449c-ad92-4d90-891e-0593b39f3954","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.802secure.net/apiv1/incident/detail/:incident_id","description":"<p>Fetch the details of a specific incident.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","name":"802 Secure/LOCH Incidents API","type":"collection"}},"urlObject":{"path":["incident","detail",":incident_id"],"host":["https://api.802secure.net/apiv1"],"query":[],"variable":[{"description":{"content":"<p>The incident identifier</p>\n","type":"text/plain"},"type":"any","value":"O269yoDgwDvx8VW3","key":"incident_id"}]}},"response":[{"id":"bffbb382-18e1-4314-973d-aca093f03a85","name":"incident detail","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://api.802secure.net/apiv1/incident/detail/:incident_id","host":["https://api.802secure.net/apiv1"],"path":["incident","detail",":incident_id"],"variable":[{"key":"incident_id","value":"6dWPjxYKx4nMkGyZ","description":"The incident identifier"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 21 May 2025 00:18:53 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Cf-Ray","value":"942fe6292b5bdb9e-LAX"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"Cf-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=KdnRePE9Yxgb5geq%2FOe7XgbE5qIrxfaf6%2FYj%2F2LEjAHD1WTt8daVSURLYSCf9frmzVgxxZbDgx35%2BHROPe1u5p98cLnYCGR5ZobTLWpKizT8FlEm19QMh8BTUYsDDw%2BFj6%2FiJzxu\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"Nel","value":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Strict-Transport-Security","value":"max-age=15552000"},{"key":"Set-Cookie","value":"session=2a283152-11fd-43d9-90df-4784ca0a4e2f.11kd2oZAqu30WB9GuwOQ5VR0lIY; HttpOnly; Path=/; Expires=Wed, 21 May 2025 01:18:53 GMT"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"},{"key":"server-timing","value":"cfL4;desc=\"?proto=TCP&rtt=16760&min_rtt=15124&rtt_var=5424&sent=32&recv=31&lost=0&retrans=0&sent_bytes=4997&recv_bytes=2053&delivery_rate=304649&cwnd=245&unsent_bytes=0&cid=11dc9c8b8c628e2a&ts=24151&x=0\""}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"active_duration\": 369,\n        \"created\": \"2025-05-21T00:12:43.736991\",\n        \"descr\": \"###### Device last seen on 05/20/2025 at 17:11 by 062018V2A10300\\n* BSSID: CC:6E:2A:C7:C8:D0\\n* ESSID: Choose Another Castle\\n* Manufacturer: Unknown\\n* Encryption: PSK/WPA3-Personal (Transitional)/WPA2\\n* Channel: 1\\n* Clients: 2\\n* Tags: \\n\\n\",\n        \"device_info\": [\n            {\n                \"device\": {\n                    \"bssid\": \"CC:6E:2A:C7:C8:D0\",\n                    \"channel\": 1,\n                    \"essid\": \"Choose Another Castle\",\n                    \"last_signal_dbm\": -53,\n                    \"lastseen\": \"2025-05-21T00:16:31.593216\",\n                    \"manuf\": \"Unknown\",\n                    \"gpsinfo\":  {\n                        \"altitude\": 0,\n                        \"latitude\": 37.8477274,\n                        \"longitude\": -122.2901898\n                    }\n                },\n                \"sensors\": [\n                    {\n                        \"details\": \"New AIRSHIELD -- Edit Settings\",\n                        \"gpsinfo\": {\n                            \"altitude\": 0,\n                            \"latitude\": 37.8477274,\n                            \"longitude\": -122.2901898\n                        },\n                        \"name\": \"062018V2A10537\",\n                        \"timestamp\": \"2025-05-21T00:17:15.939374\"\n                    }\n                ]\n            }\n        ],\n        \"display_name\": \"INC-6\",\n        \"id\": \"6dWPjxYKx4nMkGyZ\",\n        \"notes\": [],\n        \"severity\": 2,\n        \"summary\": \"Access Point - Choose Another Castle (CC:6E:2A:C7:C8:D0)\",\n        \"type\": \"0\",\n        \"updated\": \"2025-05-21T00:16:42.411942\"\n    },\n    \"status\": \"success\"\n}"}],"_postman_id":"6499449c-ad92-4d90-891e-0593b39f3954"},{"name":"add notes","id":"c8dcf2a1-0836-4460-b0dd-e15c67edeb42","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n         \"text\" : \"Test Image\",\r\n         \"files\" : [ {\"name\" : \"IMAGE.jpg\", \"contents\" : \"/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ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NU7dY44JHl/1dLeaippKGSakZvPaP2e3HFcz9Vapl9ay7kpOyL8reuHPiPqKgB7BI7JHwBXo2lpKeijENOwNA5epXlesrqmulM07y4nr9l5KMuHlSCsj2SnJr6Tu8Cvja1zuAQsFtWHEqST7LBGanAI0RzHsOHDC9bS+rZfQ0s3LQUk/E3rXXxrdeAR+laeyk/sa+Orooa+P6M7d4HqX3UNdU0Molp3lp7F012hn53VW3kLK6lsWo+Xu2Q66yzkApPpUQfSVDBx7Zrzlcoaenq5IqV28wHQ+3gvU9nqKqqoo5qtu69w1HofHjhTQDArrV3KRI8yjUInVKIoioXDYcTylIUD0IIyCPcVByoIB0K1lleCWFld0LqXXfG10k+PqDFW+Uu+MT5mwrslo9+nX2/etiQ7Y1EVAKYNzKNN48Md3Nawl2GpZbgahzsQnXdHP4/Sy2pvbjZmOZZdTB6YtynyB0IS4sfk5Ur89aqoddLw8ubvyHnqR3cgreW2myxhrgyMduM/JSLttt954x1ptEHqa2CfP4PIpxsfOR5k96F90s8gd04z4489FjuWm+RkAMkHn8hYkheCWIid0GZZd+bvSVvi5ainurpeB8ra1di2O/yT0NWufbKonoTCG7sx0Lhwx2dvNVKDYamguAqC7MI1DTxzyJ5fpbPNJKQOmB7D4rXQ4araCeKlEVARLUoiiIoiY4CcfFQdU4LU/iH4SpHV85f6q0vfrv5G4PO/FSLucn/YcPpH+g9PgitlbP7VR0UQpKpuGjQOHuPdan2k2QlrZXVlI8lxyS0n0PsVW4d+E+R0TN2eqtSSDllJMnmYjLBzlAz/AJyx6v8AgOnyTUbQbUx1sZo6RuWni5w9PlNmdkpqB7a2seQ8cGg+p9gtq2xhIFa3C2wnURFERREURFERREURMKEk9RRQRlLyD4ogS0UpaIiiIoi//9k=\"}\r\n                   ] \r\n}"},"url":"https://api.802secure.net/apiv1/incident/notes/:incident_id","description":"<p>Add notes, images or videos to an existing incident. File mime types are inferred from the filename.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","name":"802 Secure/LOCH Incidents API","type":"collection"}},"urlObject":{"path":["incident","notes",":incident_id"],"host":["https://api.802secure.net/apiv1"],"query":[],"variable":[{"description":{"content":"<p>The incident identifier</p>\n","type":"text/plain"},"type":"any","value":"O269yoDgwDvx8VW3","key":"incident_id"}]}},"response":[{"id":"3e86a759-cbc3-4140-827a-70c7c799744c","name":"incident not found","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n         \"text\" : \"AAA\",\r\n         \"files\" : [ {\"name\" : \"a\", \"contents\" : \"File contents\"}, \r\n                     {\"name\" : \"b\", \"contents\" : \"\"}\r\n                   ] \r\n}"},"url":{"raw":"https://api.802secure.net/apiv1/incident/notes/:incident_id","host":["https://api.802secure.net/apiv1"],"path":["incident","notes",":incident_id"],"variable":[{"key":"incident_id","value":null,"description":"The incident identifier"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 22:12:59 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"120"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Tue, 20 May 2025 23:12:59 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": {\n        \"code\": \"INCIDENT_NOT_FOUND\",\n        \"descr\": \"Incident not found\"\n    },\n    \"status\": \"error\"\n}"},{"id":"c69f6d7c-6ad8-469f-ba52-f5f12fbdb77b","name":"success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n         \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gOnyTUbQbUx1sZo6RuWni5w9PlNmdkpqB7a2seQ8cGg+p9gtq2xhIFa3C2wnURFERREURFERREURMKEk9RRQRlLyD4ogS0UpaIiiIoi//9k=\"}\r\n                   ] \r\n}"},"url":{"raw":"https://api.802secure.net/apiv1/incident/notes/:incident_id","host":["https://api.802secure.net/apiv1"],"path":["incident","notes",":incident_id"],"variable":[{"key":"incident_id","value":"O269yoDgwDvx8VW3","description":"The incident identifier"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 22:19:29 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"54"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Tue, 20 May 2025 23:19:29 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Note added\",\n    \"status\": \"success\"\n}"}],"_postman_id":"c8dcf2a1-0836-4460-b0dd-e15c67edeb42"},{"name":"update_status","id":"d0486cdd-20ca-42cf-b790-c8bb766e5dc0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"[ \n\t{ \"devicemac\": \"\", \"status\" : \"track\"},\n\t{ \"devicemac\": \"\", \"status\" : \"FOUND\"},\n\t{ \"devicemac\": \"\", \"status\" : \"NOT FOUND\"}\n]","options":{"raw":{"language":"json"}}},"url":"https://api.802secure.net/apiv1/incident/update_status/:incident_id","description":"<p>Update the status of an incident, adding a note and changing the state.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","id":"f9dd1587-b5c9-42ae-924b-bd4d4f903995","name":"802 Secure/LOCH Incidents API","type":"collection"}},"urlObject":{"path":["incident","update_status",":incident_id"],"host":["https://api.802secure.net/apiv1"],"query":[],"variable":[{"description":{"content":"<p>The incident identifier</p>\n","type":"text/plain"},"type":"any","value":"O269yoDgwDvx8VW3","key":"incident_id"}]}},"response":[{"id":"e730025c-3f2f-4dab-94b5-f87f53efc4bd","name":"status found","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"[ \n\t{ \"devicemac\": \"00:de:ad:be:ef:00\", \"status\": \"FOUND\"}\n]","options":{"raw":{"language":"json"}}},"url":{"raw":"https://api.802secure.net/apiv1/incident/update_status/:incident_id","host":["https://api.802secure.net/apiv1"],"path":["incident","update_status",":incident_id"],"variable":[{"key":"incident_id","value":"","description":"The incident identifier"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 22:12:06 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"132"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Tue, 20 May 2025 23:12:06 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": {\n        \"code\": \"INCIDENT_STATUS_UPDATED\",\n        \"descr\": \"Incident status updated\"\n    },\n    \"status\": \"success\"\n}"},{"id":"fcd0244a-8d99-4b24-8b5e-5ee1e6bdabee","name":"status not found","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"[ \n\t{ \"devicemac\": \"00:de:ad:be:ef:00\", \"status\": \"FOUND\"}\n]","options":{"raw":{"language":"json"}}},"url":{"raw":"https://api.802secure.net/apiv1/incident/update_status/:incident_id","host":["https://api.802secure.net/apiv1"],"path":["incident","update_status",":incident_id"],"variable":[{"key":"incident_id","value":"","description":"The incident identifier"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/2.1.2 Python/3.10.17"},{"key":"Date","value":"Tue, 20 May 2025 22:12:06 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"132"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"session=3eb887ea-92cf-43f4-8ca0-44d39a615c96.vNtxBSaL48MkQvicpddbHNbBdS0; Expires=Tue, 20 May 2025 23:12:06 GMT; HttpOnly; Path=/"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": {\n        \"code\": \"INCIDENT_STATUS_UPDATED\",\n        \"descr\": \"Incident status updated\"\n    },\n    \"status\": \"success\"\n}"},{"id":"b240666d-142f-44be-838c-cf1aec1d3885","name":"tracking","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"[ \n\t{ \"devicemac\": \"\", \"status\" : \"track\"}\n]","options":{"raw":{"language":"json"}}},"url":{"raw":"https://api.802secure.net/apiv1/incident/update_status/:incident_id","host":["https://api.802secure.net/apiv1"],"path":["incident","update_status",":incident_id"],"variable":[{"key":"incident_id","value":"O269yoDgwDvx8VW3","description":"The incident identifier"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"d0486cdd-20ca-42cf-b790-c8bb766e5dc0"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]}},"event":[{"listen":"prerequest","script":{"id":"7b155931-3827-41e9-b5c0-4624eb60586e","type":"text/javascript","exec":["var api_url = pm.environment.get('base_url');","","const refreshRequest = {","    url: api_url + '/apiv1/incident/refresh',","    method: 'GET',","    header: 'Content-Type:application/json\\nAuthorization: Bearer ' + pm.environment.get('refresh_token'),","};","","","if (pm.request.url.path.indexOf('register') > -1) {","    // skip register for token work","    return","}","","if (pm.request.url.path.indexOf('login') > -1) {","    // skip login for token work","    return","}","","","var getToken = true;","if (!pm.environment.get('accessTokenExpiry') ||","    !pm.environment.get('access_token')) {","    console.log('Token or expiry date are missing')","} else if (pm.environment.get('accessTokenExpiry') <= (new Date()).getTime()) {","    console.log('Token is expired')","} else {","    getToken = false;","    console.log('Token and expiry date are all good');","}","","if (getToken === true) {","    pm.sendRequest(refreshRequest, function (err, res) {","        console.log(err ? err : res.json());","        if (err === null) {","            console.log('Saving the token and expiry date')","            var responseJson = res.json();","            pm.environment.set('access_token', responseJson.data.access_token)","","            var expiryDate = new Date();","            expiryDate.setSeconds(expiryDate.getSeconds() + 900);","            pm.environment.set('accessTokenExpiry', expiryDate.getTime());","        }","    });","}"]}},{"listen":"test","script":{"id":"ab3bc6f6-f7a3-41f6-aed6-8369a8c0df2d","type":"text/javascript","exec":[""]}}],"variable":[{"key":"base_url","value":"https://api.802secure.net/"},{"key":"access_token","value":""},{"key":"refresh_token","value":""},{"key":"accessTokenExpiry","value":""},{"key":"incident_id","value":""},{"key":"page","value":"","type":"string"}]}