Skip to content

Instantly share code, notes, and snippets.

@lastnamehurt
Created March 12, 2022 08:23
Show Gist options
  • Save lastnamehurt/19b37e60797a27c7dbed91d2f49776e9 to your computer and use it in GitHub Desktop.
Save lastnamehurt/19b37e60797a27c7dbed91d2f49776e9 to your computer and use it in GitHub Desktop.
app api testing spec
{"_type":"export","__export_format":4,"__export_date":"2022-03-12T08:20:47.448Z","__export_source":"insomnia.desktop.app:v2022.1.1","resources":[{"_id":"req_wrk_117eb924914e41e292dbe2f30595d263c6fbbcc8","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647065860050,"created":1647027555978,"url":"{{ base_url }}/analytics/distribution","name":"/analytics/distribution","description":"","method":"GET","body":{},"parameters":[{"name":"start_date","disabled":false,"value":"2022-03-11T10:39:13.539Z","id":"pair_2859d4cd824344a48ff508eebbc9d0e2"},{"name":"end_date","disabled":false,"value":"2022-03-11T10:39:13.539Z","id":"pair_06bbf7f85a17424e83bf0324fa02f008"},{"name":"space_ids","disabled":false,"value":"{{space_id}}","id":"pair_2af6f2cd12df4da0b5b2705b0de5df58"},{"name":"time_zone","disabled":false,"value":"{{time_zone}}","id":"pair_6f040c6164ee4b49a116a83bd58d281e"},{"name":"time_filters","disabled":true,"value":"Mon+Tue+Wed+Thu+Fri:0800-1700","id":"pair_1835de68927c4637aee4168d0dcd5ce0"},{"id":"pair_bd33aeb330b0427880aa52051e8b76b5","name":"","value":"","description":""},{"id":"pair_e55c855753fe45378c18bcced5edbf40","name":"","value":"","description":""}],"headers":[],"authentication":{},"metaSortKey":-1647027555978,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"wrk_117eb924914e41e292dbe2f30595d263","parentId":null,"modified":1647028298082,"created":1647027559470,"name":"Density Application API 0.1.0","description":"This service provides a layer of abstraction on top of the Density data API's.\n\nIt is intended for use by any and all client applications throughout Density.","scope":"design","_type":"workspace"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d2636fc19d8e","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647065424034,"created":1647027555977,"url":"{{ base_url }}/analytics/dwell","name":"/analytics/dwell","description":"","method":"GET","body":{},"parameters":[{"name":"start_date","disabled":false,"value":"2022-03-10T19:39:13.539Z","id":"pair_22a39aba0fc446e7ab4cbb3d269b19be"},{"name":"end_date","disabled":false,"value":"2022-03-11T19:39:13.539Z","id":"pair_e0e11f673b674349b7fddb9013be294a"},{"name":"space_ids","disabled":false,"value":"{{space_id}}","id":"pair_8450809ffd404deea9e731f6fb95a295"},{"name":"time_zone","disabled":false,"value":"{{time_zone}}","id":"pair_4ecf3f167f1c404f989f1f3c3304c577"},{"name":"granularity","disabled":true,"value":"15m","id":"pair_c2745db8735c4d1ba629472b0fa8b1e9"},{"name":"time_filters","disabled":false,"value":"Mon+Tue+Wed+Thu+Fri:0800-1700","id":"pair_a1a09dabe9654d2aba34de028e33946b"}],"headers":[],"authentication":{},"metaSortKey":-1647027555977,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d263ebb7917f","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647065425290,"created":1647027555946,"url":"{{ base_url }}/analytics/time-used","name":"/analytics/time-used","description":"","method":"GET","body":{},"parameters":[{"name":"start_date","disabled":false,"value":"2022-03-10T19:39:13.539Z","id":"pair_095cf59599134156a926fa68882f8655"},{"name":"end_date","disabled":false,"value":"2022-03-11T19:39:13.539Z","id":"pair_ce6ce1c4d4724d21b4fa9188d0a81e77"},{"name":"space_ids","disabled":false,"value":"{{space_id}}","id":"pair_551abe9cb0b244f3800b675384590009"},{"name":"time_zone","disabled":false,"value":"{{time_zone}}","id":"pair_cc209f83e8dc4be7841f3743c3d3e933"},{"name":"time_filters","disabled":true,"value":"Mon+Tue+Wed+Thu+Fri:0800-1700","id":"pair_663167df650049c5ab333c8474d1616c"}],"headers":[],"authentication":{},"metaSortKey":-1647027555946,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d2634f447533","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647065426002,"created":1647027555945,"url":"{{ base_url }}/analytics/utilization","name":"/analytics/utilization","description":"","method":"GET","body":{},"parameters":[{"name":"start_date","disabled":false,"value":"2022-03-10T19:39:13.539Z","id":"pair_59cd49a999204bff8c4bbe00ee374886"},{"name":"end_date","disabled":false,"value":"2022-03-13T19:39:13.539Z","id":"pair_72bcb3955d05457ba335a9cb725ba0be"},{"name":"space_ids","disabled":false,"value":"{{space_id}}","id":"pair_3823e38e1cfe463bbfa20443c01e8425"},{"name":"time_zone","disabled":false,"value":"{{time_zone}}","id":"pair_cd3de00c5f184aed895fa80fa0e4222f"},{"name":"granularity","disabled":true,"value":"15m","id":"pair_3fb8aca909da4a0899d7611613944d6a"},{"name":"time_filters","disabled":true,"value":"Mon+Tue+Wed+Thu+Fri:0800-1700","id":"pair_35633deb72944d89a6d77aa3f1477942"}],"headers":[],"authentication":{},"metaSortKey":-1647027555945,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d26305cb4c6a","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647065897823,"created":1647027555944,"url":"{{ base_url }}/reports/occupancy","name":"/reports/occupancy","description":"","method":"GET","body":{},"parameters":[{"name":"start_date","disabled":false,"value":"2022-03-11T19:39:13.539Z","id":"pair_ee63ed31f731453786521dfa5c9c1f48"},{"name":"end_date","disabled":false,"value":"2022-03-11T19:39:13.539Z","id":"pair_5407b1f8952f41c68e5d95a8a8908a6a"},{"name":"floor_id","disabled":false,"value":"drw_809856283355120445","id":"pair_a2bec502e53a4e12acdb72d0783cb86c"},{"name":"space_ids","disabled":false,"value":"{{space_id}}","id":"pair_d1df449fce074e0f843d783037f4e95e"},{"name":"time_zone","disabled":false,"value":"{{time_zone}}","id":"pair_541379012307403884d691f6dd4c0431"},{"name":"time_filters","disabled":true,"value":"Mon+Tue+Wed+Thu+Fri:0800-1700","id":"pair_597f87ef670b40cab258584467f02bd8"}],"headers":[],"authentication":{},"metaSortKey":-1647027555944,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d2634bcb9b64","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647027555943,"created":1647027555943,"url":"{{ base_url }}/spaces","name":"/spaces","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1647027555943,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d2637fd7e4c8","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647027555942,"created":1647027555942,"url":"{{ base_url }}/spaces/labels","name":"/spaces/labels","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1647027555942,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d26316703def","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647027555909,"created":1647027555909,"url":"{{ base_url }}/spaces/labels/{{ label_id }}","name":"/spaces/labels/{label_id}","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1647027555909,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d2634f8fa230","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647027555879,"created":1647027555879,"url":"{{ base_url }}/spaces/{{ space_id }}","name":"/spaces/{space_id}","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1647027555879,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d263eff09f7e","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647072873511,"created":1647027555846,"url":"{{ base_url }}/spaces/{{ space_id }}","name":"/spaces/{space_id}","description":"","method":"PATCH","body":{"mimeType":"application/json","text":"{}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_342b0196fe3b4bb4994f32a7c5b105ea"}],"authentication":{},"metaSortKey":-1647027555846,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d263a022a6e0","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647073130390,"created":1647027555784,"url":"{{ base_url }}/spaces/{{ space_id }}/labels","name":"/spaces/{space_id}/labels","description":"","method":"POST","body":{"mimeType":"application/json","text":"[\n {\n \"name\": \"{% faker 'name', '', '', 'companyName', '', '', '', '', '', '', '', 'jobTitle', '', '', '', '', 'en' %}\"\n }\n]"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_fb3fd240ea17402f9a897be9ad9217ef"}],"authentication":{"type":"bearer","token":"ses_bNG7SHqIMsjMg7Eqv62QbwNVBwE22bSsjQqtdMTRBdL"},"metaSortKey":-1647027555784,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d2630727cdf2","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647072664750,"created":1647027555750,"url":"{{ base_url }}/spaces/{{ space_id }}/labels","name":"/spaces/{space_id}/labels","description":"","method":"DELETE","body":{},"parameters":[{"name":"label_ids","disabled":false,"value":"string","id":"pair_dfc48f8769dc43dbb8adbfe7a6c04c31"}],"headers":[],"authentication":{},"metaSortKey":-1647027555750,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_wrk_117eb924914e41e292dbe2f30595d263c692273d","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647027555704,"created":1647027555704,"url":"{{ base_url }}/version","name":"/version","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1647027555704,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_127de0e4fd603239e6c5c8cec8ef87f4515bab61","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647036265900,"created":1647027556013,"name":"Base environment","data":{"base_url":"{{ scheme }}://{{ host }}{{ base_path }}","space_id":"spc_712471415231611698","label_id":"lbl_1007399512500601121","time_zone":"America/Vancouver","space_ids":["spc_777240208109208333, spc_712471415231611698, spc_845038027855102142, spc_860932756333396843"],"scheme":"https","base_path":"/app","host":"api.density.io"},"dataPropertyOrder":{"&":["base_url","space_id","label_id","time_zone","space_ids","scheme","base_path","host"]},"color":null,"isPrivate":false,"metaSortKey":1647027556013,"_type":"environment"},{"_id":"jar_127de0e4fd603239e6c5c8cec8ef87f4515bab61","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647027983804,"created":1647027606744,"name":"Default Jar","cookies":[{"id":"ed309839-f4c6-490b-9f90-5ae9e22f157f","key":"foo","value":"bar","domain":"domain.com","expires":2147483647000,"path":"/","secure":false,"httpOnly":false}],"_type":"cookie_jar"},{"_id":"spc_761d984c7e8f4a15869d68722285b7fa","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647028398053,"created":1647027559471,"fileName":"Density Application API 0.1.0","contents":"openapi: 3.0.0\ninfo:\n description: >-\n This service provides a layer of abstraction on top of the Density data\n API's.\n\n\n It is intended for use by any and all client applications throughout\n Density.\n title: Density Application API\n version: 0.1.0\npaths:\n /analytics/distribution:\n get:\n description: Calculates the distribution of a given space\n tags:\n - analytics\n operationId: distribution\n parameters:\n - description: beginning of date range\n name: start_date\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - description: end of date range\n name: end_date\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - description: unique identifiers of spaces\n name: space_ids\n in: query\n required: true\n style: form\n explode: false\n schema:\n type: array\n items:\n type: string\n - description: time zone of the space\n name: time_zone\n in: query\n required: true\n schema:\n type: string\n - description: time filters\n name: time_filters\n in: query\n schema:\n type: string\n default: Mon+Tue+Wed+Thu+Fri:0800-1700\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n /analytics/dwell:\n get:\n description: Calculates the avg, min, and max dwell of a given space\n tags:\n - analytics\n operationId: dwell\n parameters:\n - description: beginning of date range\n name: start_date\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - description: end of date range\n name: end_date\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - description: unique identifiers of spaces\n name: space_ids\n in: query\n required: true\n style: form\n explode: false\n schema:\n type: array\n items:\n type: string\n - description: time zone of the space\n name: time_zone\n in: query\n required: true\n schema:\n type: string\n - description: time granularity, one of 15m | 1h | 1d\n name: granularity\n in: query\n schema:\n type: string\n default: 15m\n - description: time filters\n name: time_filters\n in: query\n schema:\n type: string\n default: Mon+Tue+Wed+Thu+Fri:0800-1700\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n /analytics/time-used:\n get:\n description: Calculates the distribution of a given space\n tags:\n - analytics\n operationId: timeUsed\n parameters:\n - description: beginning of date range\n name: start_date\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - description: end of date range\n name: end_date\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - description: unique identifiers of spaces\n name: space_ids\n in: query\n required: true\n style: form\n explode: false\n schema:\n type: array\n items:\n type: string\n - description: time zone of the space\n name: time_zone\n in: query\n required: true\n schema:\n type: string\n - description: time filters\n name: time_filters\n in: query\n schema:\n type: string\n default: Mon+Tue+Wed+Thu+Fri:0800-1700\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n /analytics/utilization:\n get:\n description: Calculates the utilization of a given space\n tags:\n - analytics\n operationId: utilization\n parameters:\n - description: beginning of date range\n name: start_date\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - description: end of date range\n name: end_date\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - description: unique identifiers of spaces\n name: space_ids\n in: query\n required: true\n style: form\n explode: false\n schema:\n type: array\n items:\n type: string\n - description: time zone of the space\n name: time_zone\n in: query\n required: true\n schema:\n type: string\n - description: time granularity, one of 15m | 1h | 1d\n name: granularity\n in: query\n schema:\n type: string\n default: 15m\n - description: time filters\n name: time_filters\n in: query\n schema:\n type: string\n default: Mon+Tue+Wed+Thu+Fri:0800-1700\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n /reports/occupancy:\n get:\n description: Generate a CSV report for the given spaces\n tags:\n - reports\n operationId: occupancyReport\n parameters:\n - description: beginning of date range\n name: start_date\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - description: end of date range\n name: end_date\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - description: unique identifier of the floor\n name: floor_id\n in: query\n required: true\n schema:\n type: string\n - description: unique identifiers of spaces\n name: space_ids\n in: query\n required: true\n style: form\n explode: false\n schema:\n type: array\n items:\n type: string\n - description: time zone of the space\n name: time_zone\n in: query\n required: true\n schema:\n type: string\n - description: time filters\n name: time_filters\n in: query\n schema:\n type: string\n default: Mon+Tue+Wed+Thu+Fri:0800-1700\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n /spaces:\n get:\n description: Gets all space entities\n tags:\n - spaces\n operationId: getAllSpaces\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n /spaces/labels:\n get:\n description: Gets all space labels\n tags:\n - spaces\n operationId: getSpaceLabels\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n /spaces/labels/{label_id}:\n get:\n description: Gets all spaces for a given label\n tags:\n - spaces\n operationId: getSpacesByLabel\n parameters:\n - description: unique identifier of a label\n name: label_id\n in: path\n required: true\n schema:\n type: string\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n /spaces/{space_id}:\n get:\n description: Gets a space entity\n tags:\n - spaces\n operationId: getSpace\n parameters:\n - description: unique identifier of a space\n name: space_id\n in: path\n required: true\n schema:\n type: string\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n patch:\n description: Updates a space entity\n tags:\n - spaces\n operationId: updateSpace\n parameters:\n - description: unique identifier of a space\n name: space_id\n in: path\n required: true\n schema:\n type: string\n requestBody:\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Space'\n description: space values to update\n required: true\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n /spaces/{space_id}/labels:\n post:\n description: Creates or assigns labels to the space\n tags:\n - spaces\n operationId: setSpaceLabels\n parameters:\n - description: unique identifier of a space\n name: space_id\n in: path\n required: true\n schema:\n type: string\n requestBody:\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: '#/components/schemas/LabelInput'\n description: label names to create/assign\n required: true\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n delete:\n description: Unassigns labels from a space, deleting them if they are orphaned\n tags:\n - spaces\n operationId: unsetSpaceLabels\n parameters:\n - description: unique identifier of a space\n name: space_id\n in: path\n required: true\n schema:\n type: string\n - description: label id's to delete/unassign\n name: label_ids\n in: query\n required: true\n style: form\n explode: false\n schema:\n type: array\n items:\n type: string\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '400':\n description: bad request\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n '500':\n description: internal server error\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\n /version:\n get:\n description: API version\n tags:\n - info\n operationId: version\n responses:\n '200':\n description: ok\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/APIResponse'\ncomponents:\n schemas:\n APIResponse:\n description: Represents the response for all api's.\n type: object\n title: APIResponse .\n properties:\n data:\n type: object\n x-go-name: Data\n error:\n type: string\n x-go-name: Error\n status:\n type: string\n x-go-name: Status\n x-go-package: github.com/DensityCo/app-api/internal/models\n CountsDistributionPage:\n description: Model for a Counts API distribution page.\n type: object\n title: CountsDistributionPage .\n properties:\n next:\n type: string\n x-go-name: Next\n prev:\n type: string\n x-go-name: Previous\n results:\n type: object\n additionalProperties:\n type: object\n additionalProperties:\n type: array\n items:\n $ref: '#/components/schemas/CountsOccupancy'\n x-go-name: Results\n total:\n type: integer\n format: int64\n x-go-name: Total\n x-go-package: github.com/DensityCo/app-api/internal/models\n CountsOccupancy:\n description: Model for Counts API occupancy data.\n type: object\n title: CountsOccupancy .\n properties:\n elapsed_ms:\n type: integer\n format: int64\n x-go-name: Duration\n occupancy:\n type: integer\n format: int64\n x-go-name: Occupancy\n x-go-package: github.com/DensityCo/app-api/internal/models\n CountsTimeseriesSummaryStats:\n description: Model for Counts API time series data.\n type: object\n title: CountsTimeseriesSummaryStats .\n properties:\n avg:\n type: number\n format: double\n x-go-name: Avg\n max:\n type: number\n format: double\n x-go-name: Max\n min:\n type: number\n format: double\n x-go-name: Min\n timestamp:\n type: string\n format: date-time\n x-go-name: Date\n x-go-package: github.com/DensityCo/app-api/internal/models\n CountsUtilization:\n description: Model for Counts API utilization data.\n type: object\n title: CountsUtilization .\n properties:\n avg:\n type: number\n format: double\n x-go-name: Avg\n max:\n type: number\n format: double\n x-go-name: Max\n min:\n type: number\n format: double\n x-go-name: Min\n timestamp:\n type: string\n format: date-time\n x-go-name: Date\n x-go-package: github.com/DensityCo/app-api/internal/models\n CountsUtilizationPage:\n description: Model for a Counts API utilization page.\n type: object\n title: CountsUtilizationPage .\n properties:\n next:\n type: string\n x-go-name: Next\n prev:\n type: string\n x-go-name: Previous\n results:\n type: object\n additionalProperties:\n type: array\n items:\n $ref: '#/components/schemas/CountsUtilization'\n x-go-name: Results\n total:\n type: integer\n format: int64\n x-go-name: Total\n x-go-package: github.com/DensityCo/app-api/internal/models\n Distribution:\n description: Model for distribution values.\n type: object\n title: Distribution .\n properties:\n band_end:\n type: integer\n format: int64\n x-go-name: BandEnd\n band_start:\n type: integer\n format: int64\n x-go-name: BandStart\n percentage:\n type: number\n format: double\n x-go-name: Percentage\n raw:\n type: integer\n format: int64\n x-go-name: Raw\n x-go-package: github.com/DensityCo/app-api/internal/models\n DistributionResults:\n description: Model for distribution analytics.\n type: object\n title: DistributionResults .\n properties:\n results:\n type: object\n additionalProperties: {}\n x-go-name: Results\n x-go-package: github.com/DensityCo/app-api/internal/models\n Label:\n description: Model for Label data.\n type: object\n title: Label .\n properties:\n id:\n type: string\n x-go-name: ID\n name:\n type: string\n x-go-name: Name\n spaces:\n type: array\n items:\n $ref: '#/components/schemas/LabelSpace'\n x-go-name: Spaces\n x-go-package: github.com/DensityCo/app-api/internal/models\n LabelInput:\n description: Model for label input data.\n type: object\n title: LabelInput .\n properties:\n id:\n type: string\n x-go-name: ID\n name:\n type: string\n x-go-name: Name\n x-go-package: github.com/DensityCo/app-api/internal/models\n LabelSpace:\n description: Model for a Label's space data.\n type: object\n title: LabelSpace .\n properties:\n current_count:\n type: integer\n format: int64\n x-go-name: CurrentCount\n id:\n type: string\n x-go-name: ID\n name:\n type: string\n x-go-name: Name\n x-go-package: github.com/DensityCo/app-api/internal/models\n Occupancy:\n description: Model for occupancy values.\n type: object\n title: Occupancy .\n properties:\n avg:\n type: number\n format: double\n x-go-name: Avg\n max:\n type: integer\n format: int64\n x-go-name: Max\n max_timebucket:\n type: string\n x-go-name: MaxTimebucket\n min:\n type: integer\n format: int64\n x-go-name: Min\n min_timebucket:\n type: string\n x-go-name: MinTimebucket\n x-go-package: github.com/DensityCo/app-api/internal/models\n OccupancyResults:\n description: Model for occupancy analytics.\n type: object\n title: OccupancyResults .\n properties:\n results:\n type: object\n additionalProperties: {}\n x-go-name: Results\n x-go-package: github.com/DensityCo/app-api/internal/models\n PaginatedResponse:\n description: Model for a paginated response from external api's.\n type: object\n title: PaginatedResponse .\n properties:\n next:\n type: string\n x-go-name: Next\n prev:\n type: string\n x-go-name: Previous\n results:\n type: array\n items:\n type: object\n x-go-name: Results\n total:\n type: integer\n format: int64\n x-go-name: Total\n x-go-package: github.com/DensityCo/app-api/internal/models\n Space:\n description: Model for Space data.\n type: object\n title: Space .\n properties:\n address:\n type: string\n x-go-name: Address\n capacity:\n type: integer\n format: int64\n x-go-name: Capacity\n children:\n type: array\n items:\n $ref: '#/components/schemas/Space'\n x-go-name: Children\n function:\n type: string\n x-go-name: Function\n id:\n type: string\n x-go-name: ID\n labels:\n type: array\n items:\n $ref: '#/components/schemas/Label'\n x-go-name: Labels\n name:\n type: string\n x-go-name: Name\n space_type:\n type: string\n x-go-name: Type\n tags:\n type: array\n items:\n type: string\n x-go-name: Tags\n time_segments:\n type: array\n items:\n $ref: '#/components/schemas/TimeSegment'\n x-go-name: TimeSegments\n time_zone:\n type: string\n x-go-name: Timezone\n working_hours:\n type: string\n x-go-name: WorkingHours\n x-go-package: github.com/DensityCo/app-api/internal/models\n SummaryStatsPage:\n description: Model for a SummaryStatsPage response pagination.\n type: object\n title: SummaryStatsPage .\n properties:\n next:\n type: string\n x-go-name: Next\n prev:\n type: string\n x-go-name: Previous\n results:\n type: object\n additionalProperties:\n type: array\n items:\n $ref: '#/components/schemas/CountsTimeseriesSummaryStats'\n x-go-name: Results\n total:\n type: integer\n format: int64\n x-go-name: Total\n x-go-package: github.com/DensityCo/app-api/internal/models\n TimeFilter:\n description: Model for time filter data.\n type: object\n title: TimeFilter .\n properties:\n Days:\n type: array\n items: {}\n EndHour:\n type: integer\n format: int64\n EndMinute:\n type: integer\n format: int64\n StartHour:\n type: integer\n format: int64\n StartMinute:\n type: integer\n format: int64\n x-go-package: github.com/DensityCo/app-api/internal/models\n TimeSegment:\n description: Model for time segment data.\n type: object\n title: TimeSegment .\n properties:\n days:\n type: array\n items:\n type: string\n x-go-name: Days\n end:\n type: string\n x-go-name: End\n id:\n type: string\n x-go-name: ID\n label:\n type: string\n x-go-name: Name\n start:\n type: string\n x-go-name: Start\n x-go-package: github.com/DensityCo/app-api/internal/models\n TimeUsed:\n description: Model for time used values.\n type: object\n title: TimeUsed .\n properties:\n date:\n x-go-name: Date\n percentage:\n type: number\n format: double\n x-go-name: Percentage\n raw:\n type: integer\n format: int64\n x-go-name: Raw\n x-go-package: github.com/DensityCo/app-api/internal/models\n TimeUsedResults:\n description: Model for time used analytics.\n type: object\n title: TimeUsedResults .\n properties:\n results:\n type: object\n additionalProperties:\n type: array\n items:\n $ref: '#/components/schemas/TimeUsed'\n x-go-name: Results\n x-go-package: github.com/DensityCo/app-api/internal/models\n TimeseriesGranularResults:\n description: Model for result container with a time granularity.\n type: object\n title: TimeseriesGranularResults .\n properties:\n granularity:\n type: string\n x-go-name: Granularity\n results:\n type: object\n additionalProperties:\n type: array\n items:\n $ref: '#/components/schemas/TimeseriesSummaryStatistics'\n x-go-name: Results\n x-go-package: github.com/DensityCo/app-api/internal/models\n TimeseriesSummaryStatistics:\n description: >-\n Model for generic summary statistics for some timeseries analytic such\n as\n\n dwell or utilization.\n type: object\n title: TimeseriesSummaryStatistics for spaces .\n properties:\n avg:\n type: number\n format: double\n x-go-name: Avg\n date:\n x-go-name: Date\n max:\n type: number\n format: double\n x-go-name: Max\n min:\n type: number\n format: double\n x-go-name: Min\n x-go-package: github.com/DensityCo/app-api/internal/models\n Utilization:\n description: Model for utilization values.\n type: object\n title: Utilization .\n properties:\n avg:\n type: number\n format: double\n x-go-name: Avg\n date:\n x-go-name: Date\n max:\n type: number\n format: double\n x-go-name: Max\n min:\n type: number\n format: double\n x-go-name: Min\n x-go-package: github.com/DensityCo/app-api/internal/models\n UtilizationResults:\n description: Model for utilization analytics.\n type: object\n title: UtilizationResults .\n properties:\n granularity:\n type: string\n x-go-name: Granularity\n results:\n type: object\n additionalProperties:\n type: array\n items:\n $ref: '#/components/schemas/Utilization'\n x-go-name: Results\n x-go-package: github.com/DensityCo/app-api/internal/models\n countsTime:\n x-go-package: github.com/DensityCo/app-api/internal/models\n","contentType":"yaml","_type":"api_spec"},{"_id":"uts_e339345fe3eb42c0988a93c5f85767d0","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647072151487,"created":1647065504409,"name":"Smoke","_type":"unit_test_suite"},{"_id":"uts_e2ac1bb6b7694e29aa4d764779183e06","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647072421960,"created":1647072111887,"name":"Use Cases","_type":"unit_test_suite"},{"_id":"uts_a505d0de26644914907a54071ba6d9d2","parentId":"wrk_117eb924914e41e292dbe2f30595d263","modified":1647072174009,"created":1647072124557,"name":"Big Queries","_type":"unit_test_suite"},{"_id":"env_9392480cfa3b48c69c41e530a788e0aa","parentId":"env_127de0e4fd603239e6c5c8cec8ef87f4515bab61","modified":1647036258210,"created":1647028407396,"name":"Staging","data":{"host":"core-staging.density.io"},"dataPropertyOrder":{"&":["host"]},"color":"#fae661","isPrivate":false,"metaSortKey":0,"_type":"environment"},{"_id":"ut_764af37a203f49188ef2d520f1528155","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647065560014,"created":1647065531431,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d263c6fbbcc8","name":"/analytics/distribution","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_7b36206a74d74539b734cce2c33d4069","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647065571635,"created":1647065568131,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d2636fc19d8e","name":"/analytics/dwell","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_2253d2674b8e451ab2a9cafc32428fd9","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647065608633,"created":1647065604174,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d263ebb7917f","name":"/analytics/time-used","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_4f7eac327ead4b4dbd4eeb0a15b69e11","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647065620633,"created":1647065616786,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d2634f447533","name":"/analytics/utilization","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_7e5110780f704123a8b62184377deb26","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647065849622,"created":1647065845478,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d26305cb4c6a","name":"/reports/occupancy","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_74d3ed744df048b99f87435fc6b76e31","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647072245318,"created":1647072242179,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d2634bcb9b64","name":"/spaces","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_be2924ab3cf8416fa5ed191610bc619d","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647072254884,"created":1647072251362,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d2637fd7e4c8","name":"/spaces/labels","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_6170864370c842c59c3667d0418ebc6f","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647072275250,"created":1647072271071,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d26316703def","name":"/spaces/labels/{label_id}","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_5d7ab411a978481a9986d7b0364979be","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647072333438,"created":1647072314012,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d2634f8fa230","name":"/spaces/{space_id}","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_1f13f2b3b6a24394812140f0999a8bb9","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647072351580,"created":1647072346263,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d263eff09f7e","name":"/spaces/{space_id}","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_e3b01cb5b1474ef7b722173ecde73337","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647072370845,"created":1647072362170,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d263a022a6e0","name":"/spaces/{space_id}/labels","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_332eeaf627fe4cf2b3589c9c2fd799e5","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647072378646,"created":1647072375642,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d2630727cdf2","name":"/spaces/{space_id}","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"},{"_id":"ut_d044767577234ca5ad78c0606d340ae2","parentId":"uts_e339345fe3eb42c0988a93c5f85767d0","modified":1647072385744,"created":1647072382261,"requestId":"req_wrk_117eb924914e41e292dbe2f30595d263c692273d","name":"/version","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);","_type":"unit_test"}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment