{ "info": { "_postman_id": "af00c0a1-994e-4e2c-aac9-422c102b70f1", "name": "OpenHaus", "description": "SmartHome/IoT application", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "6522444" }, "item": [ { "name": "Components", "item": [ { "name": "Rooms", "item": [ { "name": "Create new room", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"65818753e275da05046aaa78\",\n \"name\": \"Livingroom\",\n \"labels\": [\n \"foo=bar\",\n \"baz=true\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/rooms", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "rooms" ] } }, "response": [] }, { "name": "Get all rooms", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "x-auth-token", "value": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhhbnMuaHViZXJ0QGV4YW1wbGUuY29tIiwidXVpZCI6ImM3N2E3NjJkLWM4ODYtNGQ2My1iNGM1LWU0MDJhZGNmYTdiZSIsImlhdCI6MTY1NDI2ODI4NX0.w4mkvTuJ-OXzTcmvWhwIT84oOmo2399hSEfWGbA-9SUWndMWUiHvly1A7-kSV93e", "type": "text", "disabled": true } ], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/rooms?limit=100&offset=0", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "rooms" ], "query": [ { "key": "limit", "value": "100" }, { "key": "offset", "value": "0" } ] } }, "response": [] }, { "name": "Get sinlge room", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/rooms/65818753e275da05046aaa78", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "rooms", "65818753e275da05046aaa78" ] } }, "response": [] }, { "name": "Update existing room", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"name\": \"Garage\",\n \"icon\": \"fa-solid fa-warehouse\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/rooms/65818753e275da05046aaa78", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "rooms", "65818753e275da05046aaa78" ] } }, "response": [] }, { "name": "Delete exisiting room", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/rooms/65818753e275da05046aaa78", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "rooms", "65818753e275da05046aaa78" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Scenes", "item": [ { "name": "Create new scene", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"658187db41c59ef57eb25df8\",\n \"name\": \"Evening\",\n \"makros\": [{\n \"type\": \"command\",\n \"endpoint\": \"63a0ce5b33d59ec69d8ffe18\",\n \"command\": \"63a0ce5b33d59ec69d8ffe19\"\n }, {\n \"type\": \"command\",\n \"endpoint\": \"63a1753f44427ef1a83426bf\",\n \"command\": \"63a1753f44427ef1a83426c0\"\n }, {\n \"type\": \"command\",\n \"endpoint\": \"63a1753f44427ef1a83426af\",\n \"command\": \"63a1753f44427ef1a83426b0\"\n }]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/scenes", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "scenes" ] } }, "response": [] }, { "name": "Get all scenes", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "x-auth-token", "value": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhhbnMuaHViZXJ0QGV4YW1wbGUuY29tIiwidXVpZCI6ImM3N2E3NjJkLWM4ODYtNGQ2My1iNGM1LWU0MDJhZGNmYTdiZSIsImlhdCI6MTY1NDI2ODI4NX0.w4mkvTuJ-OXzTcmvWhwIT84oOmo2399hSEfWGbA-9SUWndMWUiHvly1A7-kSV93e", "type": "text", "disabled": true } ], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/scenes?limit=3", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "scenes" ], "query": [ { "key": "limit", "value": "3" } ] } }, "response": [] }, { "name": "Get sinlge scene", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/scenes/658187db41c59ef57eb25df8", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "scenes", "658187db41c59ef57eb25df8" ] } }, "response": [] }, { "name": "Get scene state", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/scenes/658187db41c59ef57eb25df8/state", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "scenes", "658187db41c59ef57eb25df8", "state" ] } }, "response": [] }, { "name": "Update existing scene", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"name\": \"Evening\",\n \"makros\": [{\n \"type\": \"command\",\n \"endpoint\": \"63a0ce5b33d59ec69d8ffe18\",\n \"command\": \"63a0ce5b33d59ec69d8ffe19\"\n }, {\n \"type\": \"command\",\n \"endpoint\": \"63a1753f44427ef1a83426bf\",\n \"command\": \"63a1753f44427ef1a83426c0\"\n }, {\n \"type\": \"timer\",\n \"value\": \"3000\"\n }, {\n \"type\": \"command\",\n \"endpoint\": \"63a1753f44427ef1a83426af\",\n \"command\": \"63a1753f44427ef1a83426b0\"\n }]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/scenes/658187db41c59ef57eb25df8", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "scenes", "658187db41c59ef57eb25df8" ] } }, "response": [] }, { "name": "Trigger scene", "request": { "method": "POST", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/scenes/658187db41c59ef57eb25df8/trigger", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "scenes", "658187db41c59ef57eb25df8", "trigger" ] } }, "response": [] }, { "name": "Abort scene", "request": { "method": "POST", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/scenes/658187db41c59ef57eb25df8/abort", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "scenes", "658187db41c59ef57eb25df8", "abort" ] } }, "response": [] }, { "name": "Delete exisiting scene", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/scenes/658187db41c59ef57eb25df8", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "scenes", "658187db41c59ef57eb25df8" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "MDNS", "item": [ { "name": "Create mdns entry", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"658188273df500c8cd1524cc\",\n \"name\": \"shelly*.local\",\n \"type\": \"A\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/mdns", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "mdns" ] } }, "response": [] }, { "name": "Get all mdns targets", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "x-auth-token", "value": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhhbnMuaHViZXJ0QGV4YW1wbGUuY29tIiwidXVpZCI6ImM3N2E3NjJkLWM4ODYtNGQ2My1iNGM1LWU0MDJhZGNmYTdiZSIsImlhdCI6MTY1NDI2ODI4NX0.w4mkvTuJ-OXzTcmvWhwIT84oOmo2399hSEfWGbA-9SUWndMWUiHvly1A7-kSV93e", "type": "text", "disabled": true } ], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/mdns", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "mdns" ] } }, "response": [] }, { "name": "Get sinlge mdns target", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/mdns/658188273df500c8cd1524cc", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "mdns", "658188273df500c8cd1524cc" ] } }, "response": [] }, { "name": "Update mdns target", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"labels\": [\n \"manufacturer=shelly\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/mdns/658188273df500c8cd1524cc", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "mdns", "658188273df500c8cd1524cc" ] } }, "response": [] }, { "name": "Delete mdns target", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/mdns/658188273df500c8cd1524cc", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "mdns", "658188273df500c8cd1524cc" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "MQTT", "item": [ { "name": "Create mqtt topic", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"65818856464bebcf19ebec4c\",\n \"topic\": \"air-sensor/sensor/particulate_matter_25m_concentration\",\n \"labels\": [\n \"manufacturer=custom\",\n \"esp8266=true\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/mqtt", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "mqtt" ] } }, "response": [] }, { "name": "Get all mqtt topics", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "x-auth-token", "value": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhhbnMuaHViZXJ0QGV4YW1wbGUuY29tIiwidXVpZCI6ImM3N2E3NjJkLWM4ODYtNGQ2My1iNGM1LWU0MDJhZGNmYTdiZSIsImlhdCI6MTY1NDI2ODI4NX0.w4mkvTuJ-OXzTcmvWhwIT84oOmo2399hSEfWGbA-9SUWndMWUiHvly1A7-kSV93e", "type": "text", "disabled": true } ], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/mqtt", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "mqtt" ] } }, "response": [] }, { "name": "Get sinlge mqtt topic", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/mqtt/65818856464bebcf19ebec4c", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "mqtt", "65818856464bebcf19ebec4c" ] } }, "response": [] }, { "name": "Update mqtt topic", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"description\": \"Ikea VINDRIKTNING MQTT mod\",\n \"labels\": [\n \"manufacturer=Ikea\",\n \"model=VINDRIKTNING\",\n \"esp8266=true\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/mqtt/65818856464bebcf19ebec4c", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "mqtt", "65818856464bebcf19ebec4c" ] } }, "response": [] }, { "name": "Delete mqtt topic", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/mqtt/65818856464bebcf19ebec4c", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "mqtt", "65818856464bebcf19ebec4c" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "SSDP", "item": [ { "name": "Create new ssdp item", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"65818876deb8cb80755ade02\",\n \"nt\": \"urn:schemas-upnp-org:device:sensor:1\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/ssdp", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "ssdp" ] } }, "response": [] }, { "name": "Get all ssdp items", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "x-auth-token", "value": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhhbnMuaHViZXJ0QGV4YW1wbGUuY29tIiwidXVpZCI6ImM3N2E3NjJkLWM4ODYtNGQ2My1iNGM1LWU0MDJhZGNmYTdiZSIsImlhdCI6MTY1NDI2ODI4NX0.w4mkvTuJ-OXzTcmvWhwIT84oOmo2399hSEfWGbA-9SUWndMWUiHvly1A7-kSV93e", "type": "text", "disabled": true } ], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/ssdp", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "ssdp" ] } }, "response": [] }, { "name": "Get sinlge ssdp item", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/ssdp/65818876deb8cb80755ade02", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "ssdp", "65818876deb8cb80755ade02" ] } }, "response": [] }, { "name": "Update existing ssdp item", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"description\": \"Search for sensor via SSDP\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/ssdp/65818876deb8cb80755ade02", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "ssdp", "65818876deb8cb80755ade02" ] } }, "response": [] }, { "name": "Delete exisiting ssdp item", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/ssdp/65818876deb8cb80755ade02", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "ssdp", "65818876deb8cb80755ade02" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Users", "item": [ { "name": "Create new user", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"658188a7aadfcc026a0e0131\",\n \"name\": \"Hans Hubert #3\",\n \"email\": \"hans.hubert3@example.com\",\n \"password\": \"Pa$$w0rd\",\n \"labels\": [\n \"expires=29991231\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/users?options[returnDuplicate]=false", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "users" ], "query": [ { "key": "options[returnDuplicate]", "value": "false" } ] } }, "response": [] }, { "name": "Get all users", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "X-AUTH-TOKEN", "value": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiaGFucy5odWJlcnRAZXhhbXBsZS5jb20iLCJ1dWlkIjoiYzc3YTc2MmQtYzg4Ni00ZDYzLWI0YzUtZTQwMmFkY2ZhN2JlIiwiaWF0IjoxNjUzMTUwMDIyfQ.vA26GhU8EiNW3EmMvT4aw1_p8Pd8q-9n0xjXK6-iNrx8nCdjSTcpaq1QEtbDC4uE", "type": "text" } ], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/users", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "users" ] } }, "response": [] }, { "name": "Get sinlge user", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/users/658188a7aadfcc026a0e0131", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "users", "658188a7aadfcc026a0e0131" ] } }, "response": [] }, { "name": "Update existing user", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"password\": \"FooBarBaz\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/users/658188a7aadfcc026a0e0131", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "users", "658188a7aadfcc026a0e0131" ] } }, "response": [] }, { "name": "Delete exisiting room", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/users/658188a7aadfcc026a0e0131", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "users", "658188a7aadfcc026a0e0131" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Plugins", "item": [ { "name": "Create new plugin", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"658188e93cde9987c3228806\",\n \"name\": \"Plugin Boilerplate Demo\",\n \"uuid\": \"6951dee2-8541-4a69-bd3e-629fdadf093a\",\n \"enabled\": true,\n \"version\": \"1.0.0\",\n \"intents\": [\n \"devices\",\n \"endpoints\",\n \"plugins\",\n \"rooms\",\n \"ssdp\",\n \"store\",\n \"users\",\n \"vault\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/plugins/", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "plugins", "" ] } }, "response": [] }, { "name": "Get all plugins", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/plugins", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "plugins" ] } }, "response": [] }, { "name": "Get sinlge plugin", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/plugins/658188e93cde9987c3228806", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "plugins", "658188e93cde9987c3228806" ] } }, "response": [] }, { "name": "Update existing plugins", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"name\": \"New updated\",\n \"enabled\": true,\n \"autostart\": false,\n \"version\": \"9.2.5\",\n \"labels\": [\n \"worker_thread=false\",\n \"my_custom_label={\\\"json\\\":true, \\\"number\\\":0815420}\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/plugins/658188e93cde9987c3228806", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "plugins", "658188e93cde9987c3228806" ] } }, "response": [] }, { "name": "Upload plugin *.tgz content", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "file", "file": { "src": "/home/marc/projects/OpenHaus/plugins/plugin-boilerplate/dist/oh-plg-plugin-boilerplate.tgz" } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/plugins/658188e93cde9987c3228806/files?install=true", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "plugins", "658188e93cde9987c3228806", "files" ], "query": [ { "key": "install", "value": "true", "description": "Install npm dependenys" } ] } }, "response": [] }, { "name": "Start plugin", "request": { "method": "POST", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/plugins/658188e93cde9987c3228806/start", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "plugins", "658188e93cde9987c3228806", "start" ] } }, "response": [] }, { "name": "Delete plugin *.tgz content", "request": { "method": "DELETE", "header": [], "body": { "mode": "file", "file": { "src": "/home/marc/projects/playground/oh-plg-dummy/oh-plg-dummy-v1.0.0.tgz" } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/plugins/658188e93cde9987c3228806/files", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "plugins", "658188e93cde9987c3228806", "files" ] } }, "response": [] }, { "name": "Delete exisiting plugins", "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/plugins/658188e93cde9987c3228806", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "plugins", "658188e93cde9987c3228806" ] } }, "response": [] } ] }, { "name": "Devices", "item": [ { "name": "Create new devices", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"65818918d32dad8dab53e433\",\n \"name\": \"SmartMeter\",\n \"interfaces\": [{\n \"_id\": \"6581c55abc21a0a3122b9998\",\n \"type\": \"ETHERNET\",\n \"description\": \"WebSocket API\",\n \"settings\": {\n \"host\": \"192.168.2.155\",\n \"port\": 8080\n },\n \"adapter\": [\"raw\"]\n }],\n \"room\": \"62a4bc8bd9256b5e8d6988a0\",\n \"icon\": \"fa-solid fa-gauge-high\",\n \"labels\": [\n \"test=true\",\n \"protected=false\", \n \"foo=bar\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/devices", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "devices" ] } }, "response": [] }, { "name": "Get all devices", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/devices", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "devices" ] } }, "response": [] }, { "name": "Get sinlge device", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/devices/65818918d32dad8dab53e433", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "devices", "65818918d32dad8dab53e433" ] } }, "response": [] }, { "name": "Update existing device", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"enabled\": true,\n \"name\": \"SaMsUnG FrIdGe\",\n \"labels\": [\n \"test=true\",\n \"protected=true\", \n \"foo=bar\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/devices/65818918d32dad8dab53e433", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "devices", "65818918d32dad8dab53e433" ] } }, "response": [] }, { "name": "Delete exisiting device", "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/devices/65818918d32dad8dab53e433", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "devices", "65818918d32dad8dab53e433" ] } }, "response": [] } ] }, { "name": "Endpoints", "item": [ { "name": "Create new endpoint", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"658189336fa19198939caa21\",\n \"name\": \"Dummy Endpoint\",\n \"device\": \"6398ae590dce390161f7fc2f\",\n \"states\": [\n {\n \"_id\": \"658190d232fe653a07638863\",\n \"name\": \"Total Power\",\n \"alias\": \"POWER_TOTAL\",\n \"type\": \"number\"\n },\n {\n \"_id\": \"658190de4a1369d179c3387f\",\n \"name\": \"Powerd on?\",\n \"alias\": \"POWERD_ON\",\n \"type\": \"boolean\"\n }\n ],\n \"commands\": [\n {\n \"_id\": \"658190acbccb180491c2672c\",\n \"name\": \"Switch to Input 03\",\n \"payload\": {\n \"type\": \"Buffer\",\n \"data\": [\n 115,\n 119,\n 32,\n 105,\n 48,\n 51,\n 13,\n 10\n ]\n },\n \"alias\": \"INPUT_03\",\n \"interface\": \"6581c55abc21a0a3122b9998\"\n },\n {\n \"_id\": \"658190ec0e09c0d5d22c59f0\",\n \"name\": \"Command as String\",\n \"payload\": \"foobar\",\n \"alias\": \"STRING_CMD\",\n \"interface\": \"6581c55abc21a0a3122b9998\"\n }\n ]\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/endpoints", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "endpoints" ] } }, "response": [] }, { "name": "Get all endpoints", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/endpoints", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "endpoints" ] } }, "response": [] }, { "name": "Get sinlge endpoint", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/endpoints/658189336fa19198939caa21", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "endpoints", "658189336fa19198939caa21" ] } }, "response": [] }, { "name": "Update existing endpoint", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"name\": \"Dummy Endpoint (name changed)\",\n \"device\": \"6398ae590dce390161f7fc2f\",\n \"commands\": [{\n \"_id\": \"6581fc8ac20cb522e02868ff\",\n \"name\": \"new command\",\n \"payload\": \"new_command\",\n \"alias\": \"new_cmd\",\n \"interface\": \"6398ae590dce390161f7fc30\"\n }]\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/endpoints/658189336fa19198939caa21", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "endpoints", "658189336fa19198939caa21" ] } }, "response": [] }, { "name": "Set endpoint state", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"value\": 54\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/endpoints/658189336fa19198939caa21/states/658190d232fe653a07638863", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "endpoints", "658189336fa19198939caa21", "states", "658190d232fe653a07638863" ] }, "description": "TODO!" }, "response": [] }, { "name": "Trigger command", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "[{\n \"key\": \"VOLUME\",\n \"value\": 15\n}]", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/endpoints/658189336fa19198939caa21/commands/6581fc8ac20cb522e02868ff", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "endpoints", "658189336fa19198939caa21", "commands", "6581fc8ac20cb522e02868ff" ] } }, "response": [] }, { "name": "Delete exisiting endpoint", "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/endpoints/658189336fa19198939caa21", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "endpoints", "658189336fa19198939caa21" ] } }, "response": [] } ] }, { "name": "Vault", "item": [ { "name": "Create new vault", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"6581896929ae93ba734cc72a\",\n \"name\": \"FritzBox\",\n \"identifier\": \"FRITZBOX\",\n \"secrets\": [{\n \"_id\": \"65818cb27c731f3cba187149\",\n \"key\": \"USERNAME\",\n \"name\": \"Username\",\n \"value\": \"username@example.com\"\n }, {\n \"_id\": \"65818cbdb9302888a0b6ca35\",\n \"key\": \"PASSWORD\",\n \"name\": \"Password\",\n \"value\": \"Pa$$w0rd\"\n }]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/vault", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "vault" ] } }, "response": [] }, { "name": "Get all vaults", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/vault", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "vault" ] } }, "response": [] }, { "name": "Get sinlge vault", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/vault/6581896929ae93ba734cc72a", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "vault", "6581896929ae93ba734cc72a" ] } }, "response": [] }, { "name": "Get vault secrets", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/vault/6581896929ae93ba734cc72a/secrets", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "vault", "6581896929ae93ba734cc72a", "secrets" ] } }, "response": [] }, { "name": "Encrypt secret", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"value\": \"Pa$$w0rd\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/vault/6581896929ae93ba734cc72a/secrets/65818cb27c731f3cba187149/encrypt", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "vault", "6581896929ae93ba734cc72a", "secrets", "65818cb27c731f3cba187149", "encrypt" ] } }, "response": [] }, { "name": "Decrypt secret", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/vault/6581896929ae93ba734cc72a/secrets/65818cb27c731f3cba187149/decrypt", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "vault", "6581896929ae93ba734cc72a", "secrets", "65818cb27c731f3cba187149", "decrypt" ] } }, "response": [] }, { "name": "Update existing vault", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"name\": \"Fritzbox (Router/DECT GW)\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/vault/6581896929ae93ba734cc72a", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "vault", "6581896929ae93ba734cc72a" ] } }, "response": [] }, { "name": "Delete exisiting vault", "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/vault/6581896929ae93ba734cc72a", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "vault", "6581896929ae93ba734cc72a" ] } }, "response": [] } ] }, { "name": "Store", "item": [ { "name": "Create new store entry", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"65818986ca5133d8de2bb4a1\",\n \"name\": \"Store name\",\n \"config\": [{\n \"_id\": \"6581a14f1c6d01f32129dabc\",\n \"name\": \"Device Pairing\",\n \"key\": \"pairing\",\n \"type\": \"boolean\",\n \"value\": false,\n \"description\": \"Is the Gateway ready for pairing?\"\n }, {\n \"_id\": \"6581a1520bcb15659d48b207\",\n \"name\": \"Polling interval\",\n \"key\": \"interval\",\n \"type\": \"number\",\n \"value\": 3000,\n \"description\": \"Sync intervall for Endpoints\"\n }]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/store", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "store" ] } }, "response": [] }, { "name": "Get all config stores", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/store", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "store" ] } }, "response": [] }, { "name": "Get single store", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/store/65818986ca5133d8de2bb4a1", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "store", "65818986ca5133d8de2bb4a1" ] } }, "response": [] }, { "name": "Get all config items from store", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/store/65818986ca5133d8de2bb4a1/config", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "store", "65818986ca5133d8de2bb4a1", "config" ] } }, "response": [] }, { "name": "Get sinlge config item from store", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/store/65818986ca5133d8de2bb4a1/config/6581a14f1c6d01f32129dabc", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "store", "65818986ca5133d8de2bb4a1", "config", "6581a14f1c6d01f32129dabc" ] } }, "response": [] }, { "name": "Update single config value", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"value\": true\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/store/65818986ca5133d8de2bb4a1/config/6581a14f1c6d01f32129dabc", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "store", "65818986ca5133d8de2bb4a1", "config", "6581a14f1c6d01f32129dabc" ] } }, "response": [] }, { "name": "Update existing config entry", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"labels\": [\n \"device=65818918d32dad8dab53e433\",\n \"endpoint=658189336fa19198939caa21\"\n ]\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/store/65818986ca5133d8de2bb4a1", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "store", "65818986ca5133d8de2bb4a1" ] } }, "response": [] }, { "name": "Delete config store", "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/store/65818986ca5133d8de2bb4a1", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "store", "65818986ca5133d8de2bb4a1" ] } }, "response": [] } ] }, { "name": "Webhooks", "item": [ { "name": "Create new webhook", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"_id\": \"647c29cb62ad0449380f0abe\",\n \"name\": \"Test Webhook as trigger for scenes\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/webhooks", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "webhooks" ] } }, "response": [] }, { "name": "Get all webhooks", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "GET", "header": [ { "key": "x-auth-token", "value": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhhbnMuaHViZXJ0QGV4YW1wbGUuY29tIiwidXVpZCI6ImM3N2E3NjJkLWM4ODYtNGQ2My1iNGM1LWU0MDJhZGNmYTdiZSIsImlhdCI6MTY1NDI2ODI4NX0.w4mkvTuJ-OXzTcmvWhwIT84oOmo2399hSEfWGbA-9SUWndMWUiHvly1A7-kSV93e", "type": "text", "disabled": true } ], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/webhooks", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "webhooks" ] } }, "response": [] }, { "name": "Get sinlge webhook", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/webhooks/647c29cb62ad0449380f0abe", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "webhooks", "647c29cb62ad0449380f0abe" ] } }, "response": [] }, { "name": "Update existing webhook", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"name\": \"Trigger scene \"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/webhooks/647c29cb62ad0449380f0abe", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "webhooks", "647c29cb62ad0449380f0abe" ] } }, "response": [] }, { "name": "Update existing webhook", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/webhooks/647c29cb62ad0449380f0abe/trigger", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "webhooks", "647c29cb62ad0449380f0abe", "trigger" ] } }, "response": [] }, { "name": "Delete exisiting room", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "DELETE", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/webhooks/647c29cb62ad0449380f0abe", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "webhooks", "647c29cb62ad0449380f0abe" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ], "auth": { "type": "noauth" }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Authentication", "item": [ { "name": "Login", "request": { "method": "POST", "header": [ { "key": "x-auth-token", "value": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhhbnMuaHViZXJ0QGV4YW1wbGUuY29tIiwidXVpZCI6ImM3N2E3NjJkLWM4ODYtNGQ2My1iNGM1LWU0MDJhZGNmYTdiZSIsImlhdCI6MTY1MzUyMDM1Mn0.10H4v6IhiI2mlaiSAcbTp2m4QUSueA1l4c2CPGV8L7WltZfXia8pLCnbYC243LPz", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"email\": \"hans.hubert@example.com\",\n \"password\": \"Pa$$w0rd\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/auth/login", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "auth", "login" ] } }, "response": [] }, { "name": "Logout", "request": { "method": "POST", "header": [ { "key": "x-auth-token", "value": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhhbnMuaHViZXJ0QGV4YW1wbGUuY29tIiwidXVpZCI6ImM3N2E3NjJkLWM4ODYtNGQ2My1iNGM1LWU0MDJhZGNmYTdiZSIsImlhdCI6MTY1MzUxOTUwNH0.5iByWpBxCHVj0c1mHEv0Skz47SSGps7BbfDOPVFppSFWwJfLwa09jx8MSBrJTC_E", "type": "text" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/auth/logout", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "auth", "logout" ] } }, "response": [] }, { "name": "Check if auth is required", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/auth", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "auth" ] } }, "response": [] } ] }, { "name": "System", "item": [ { "name": "Notifications", "item": [ { "name": "Create notification", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"title\": \"Title\",\n \"message\": \"Hello World\",\n \"type\": \"error\",\n \"uuid\": \"83d2087a-d901-4eb5-ac05-f7980893df64\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/notifications?publish=false", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "notifications" ], "query": [ { "key": "publish", "value": "false", "description": "Publish notifications instantly?" } ] } }, "response": [] }, { "name": "Get notifications", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "raw", "raw": "{\n \"title\": \"Title\",\n \"message\": \"Hello World\",\n \"type\": \"error\",\n \"uuid\": \"83d2087a-d901-4eb5-ac05-f7980893df64\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/notifications", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "notifications" ] } }, "response": [] }, { "name": "Publish notification", "request": { "method": "POST", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/notifications/83d2087a-d901-4eb5-ac05-f7980893df64/publish", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "notifications", "83d2087a-d901-4eb5-ac05-f7980893df64", "publish" ] } }, "response": [] }, { "name": "Delete notification", "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "{\n \"title\": \"Title\",\n \"message\": \"Hello World\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/notifications/83d2087a-d901-4eb5-ac05-f7980893df64", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "notifications", "83d2087a-d901-4eb5-ac05-f7980893df64" ] } }, "response": [] } ] }, { "name": "Logging", "item": [ { "name": "Get log entrys", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/logs?offset=0&limit=10", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "logs" ], "query": [ { "key": "offset", "value": "0" }, { "key": "limit", "value": "10" } ] } }, "response": [] }, { "name": "Create log entry", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "{\n \"message\": \"Hello World\", \n \"level\": \"error\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/logs", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "logs" ] } }, "response": [] }, { "name": "Delete/Truncate logs", "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/logs?delete=false", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "logs" ], "query": [ { "key": "delete", "value": "false", "description": "Delete files or just truncate them?" } ] } }, "response": [] }, { "name": "Export (Download) logfiles as tar.gz", "request": { "method": "POST", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/logs/export", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "logs", "export" ] } }, "response": [] } ] }, { "name": "Information", "item": [ { "name": "Software versions", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/info/versions", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "info", "versions" ] } }, "response": [] }, { "name": "System usage", "request": { "method": "GET", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/info/usage", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "info", "usage" ] } }, "response": [] } ] }, { "name": "Backup", "item": [ { "name": "Export Backup", "request": { "method": "POST", "header": [], "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/backup/export", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "backup", "export" ], "query": [ { "key": "encrypt", "value": "false", "description": "Should the .tgz (.tar.gz) file be encrypted?", "disabled": true }, { "key": "includes[]", "value": "database", "description": "Should include database dump?", "disabled": true }, { "key": "includes[]", "value": "plugins", "description": "Should include plugins folder?", "disabled": true }, { "key": "includes[]", "value": "env", "description": "Should indlude .env file?", "disabled": true }, { "key": "encode", "value": "false", "description": "Encode .env values as base64? (makes them not human readable, do this at least when you dont encrypt the backup)", "disabled": true } ] } }, "response": [] }, { "name": "Import Backup", "request": { "method": "POST", "header": [ { "key": "X-ENCRYPTION-KEY", "value": "1e3665f8a687da2d0869ff524c10e64ee1cb600df8228c6dfcc37fbec3359846", "description": "Header value from export (If backup is encrpyted)", "type": "text" }, { "key": "X-ENCRYPTION-IV", "value": "186cfe92205c578a7f7199d3c973b8bd", "description": "Header value from export (If backup is encrpyted)", "type": "text" } ], "body": { "mode": "file", "file": { "src": "/home/marc/projects/OpenHaus/tmp/backup-staging.tgz" } }, "url": { "raw": "http://{{HOST}}:{{PORT}}/api/system/backup/import?truncate=true", "protocol": "http", "host": [ "{{HOST}}" ], "port": "{{PORT}}", "path": [ "api", "system", "backup", "import" ], "query": [ { "key": "encrypt", "value": "true", "description": "Is the uploading file encrypted?", "disabled": true }, { "key": "skipDuplicates", "value": "true", "description": "Skip same databse _id items", "disabled": true }, { "key": "truncate", "value": "true", "description": "Truncate/clear database & plugin folder before restore" }, { "key": "decode", "value": "true", "description": "Decode base64 .env values", "disabled": true } ] } }, "response": [] } ] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "packages": {}, "exec": [ "postman.setNextRequest()" ] } }, { "listen": "test", "script": { "type": "text/javascript", "packages": {}, "exec": [ "" ] } } ] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "console.log(\"Check if /system route\", pm.request.url.toString().includes(\"/system\"), pm.request.url.toString().includes(\"/auth\"))", "", "if(pm.request.url.toString().includes(\"/system\") || pm.request.url.toString().includes(\"/auth\")){", " postman.setNextRequest(null);", " return;", "}" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "let IGNORE = {", " \"PUT\": [", " \"/api/plugins/658188e93cde9987c3228806/files\"", " ],", " \"POST\": [", " \"/api/plugins/658188e93cde9987c3228806/start\",", " \"/api/endpoints/658189336fa19198939caa21/commands/6581fc8ac20cb522e02868ff\"", " ],", " \"GET\": [", " \"/auth\"", " ]", "};", "", "let URLS = [", " \"auth\",", " \"system\"", "]", "", "console.log(\"Check ignore object\", pm.request.method, pm.request.url.toString());", "", "", "if(Object.prototype.hasOwnProperty.call(IGNORE, pm.request.method)){", "", " let skip1 = IGNORE[pm.request.method].some((url) => {", " return pm.request.url.toString().includes(url);", " });", "", " let skip2 = URLS.some((url) => {", " return pm.request.url.toString().includes(url);", " });", "", "", " console.log(\"Ignore\", pm.request.url.toString(), skip1 || skip2);", "", " if(skip1 || skip2){", " return;", " }", "", "}", "", "", "pm.test(\"Status code 200 || 202\", () => {", " pm.expect(pm.response.code).to.be.oneOf([", " 200,", " 202", " ]);", "});", "", "", "pm.test(\"content-type = application/json\", () => {", " pm.expect(pm.response.headers.get('Content-Type')).to.include('application/json');", "});", "", "", "pm.test(\"Response has no error field\", () => {", "", " let length = pm.response.headers.get(\"content-length\");", "", " // ignore empty response/no body", " if(!length || Number(length) === 0){", " return;", " }", "", " let json = pm.response.json();", " pm.expect(!json.error, true);", "", "});" ] } } ], "variable": [ { "key": "HOST", "value": "127.0.0.1" }, { "key": "PORT", "value": "8080" }, { "key": "X-AUTH-TOKEN", "value": "" } ] }