├── Nanoleaf.postman_environment.json ├── README.md └── Postman Collections └── Nanoleaf.json /Nanoleaf.postman_environment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "c7913b62-9a17-40cc-a6ed-bf7c7c21c2f8", 3 | "name": "Nanoleaf", 4 | "values": [ 5 | { 6 | "key": "ipAddress", 7 | "value": "192.168.x.x:16021", 8 | "enabled": true, 9 | "type": "text" 10 | }, 11 | { 12 | "key": "authToken", 13 | "value": "Add-a-user-to-generate-auth-token", 14 | "enabled": true, 15 | "type": "text" 16 | } 17 | ], 18 | "_postman_variable_scope": "environment", 19 | "_postman_exported_at": "2018-05-07T21:54:12.680Z", 20 | "_postman_exported_using": "Postman/6.0.10" 21 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Nanoleaf 2 | 3 | From Section 7 of the [Nanoleaf Open API Reference](http://forum.nanoleaf.me/docs/openapi). Requires setting up a developer account and signing in to their developer portal. 4 | 5 | ![[nanoleaf logo](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/nanoleaf-logo.png)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/nanoleaf-logo.png) 6 | 7 | Click the Run in Postman button below to import this Postman Collection and Environment into your local instance of the [Postman app](https://www.getpostman.com/apps). 8 | 9 | [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/b6c8948a002d2dcd6364#?env%5BNanoleaf%5D=W3sia2V5IjoiaXBBZGRyZXNzIiwidmFsdWUiOiIxOTIuMTY4LngueDoxNjAyMSIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJ0ZXh0In0seyJrZXkiOiJhdXRoVG9rZW4iLCJ2YWx1ZSI6IkFkZC1hLXVzZXItdG8tZ2VuZXJhdGUtYXV0aC10b2tlbiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJ0ZXh0In1d) 10 | 11 | ### Generate an authorization token 12 | 13 | 1. On the Nanoleaf controller, hold the on-off button for 5-7 seconds until the LED starts flashing in a pattern. 14 | 2. From the Postman app or your own app, send a POST request to the authorization endpoint within 30 seconds of activating pairing, like this (substituting the IP address and port for your central controller): 15 | 16 | `http://192.188.x.x:16021/api/v1/new` 17 | 18 | > **Finding your IP:** The IP address of your Nanoleaf can be found using your router. Once you have the Nanoleaf connected to your WiFi, go to your router webpage and browse the devices connected to your network. Once you find your Nanoleaf, you can see the IP assigned to the device. 19 | 20 | > Remember if you're accessing the Nanoleaf at a local IP address, like when your router assigns a local IP address to the connected devices, both the Nanoleaf device and the client accessing the Nanoleaf (Postman) must be on the same local network. For example, both the Nanoleaf and laptop with Postman should be connected to the same WiFi network. 21 | 22 | The result returned will be a 32-character authorization token that you will use in all of your subsequent calls. 23 | 24 | ### Quickstart 25 | 26 | 1. [Update the Postman environment](https://www.getpostman.com/docs/v6/postman/environments_and_globals/manage_environments#editing-an-active-environment) with your IP and port. 27 | 2. If you already have an authorization token, update the Postman environment with your token. Otherwise, you will need to use the [Add a user](https://documenter.getpostman.com/view/1559645/RW1gEcCH#edd41442-c94f-49dc-977b-8180be92e018) `POST` request to generate an authorization token. 28 | 29 | In this Postman collection, I added a Quickstart folder to group a handful of requests to demonstrate a possible workflow (visible in the pre-request and test script sections). The remaining folders are replicated from the [Nanoleaf Open API Reference](http://forum.nanoleaf.me/docs/openapi). For more details and to see example responses, check out the [collection documentation](https://documenter.getpostman.com/view/1559645/RW1gEcCH). 30 | 31 | ![[nanoleaf documentation](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/nanoleaf-documentation.png)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/nanoleaf-documentation.png) 32 | -------------------------------------------------------------------------------- /Postman Collections/Nanoleaf.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "4dd99456-8db0-4594-8ddb-c621671c5c78", 4 | "name": "Nanoleaf", 5 | "description": "From Section 7 of the [Nanoleaf Open API Reference](http://forum.nanoleaf.me/docs/openapi). Requires setting up a developer account and signing in to their developer portal.\n\n![[nanoleaf logo](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/nanoleaf-logo.png)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/nanoleaf-logo.png)\n\nClick the orange **Run in Postman** button to import this Postman collection and environment into your local instance of [the Postman app](https://www.getpostman.com/apps).\n\n### Quickstart\n\n1. [Update the Postman environment](https://www.getpostman.com/docs/v6/postman/environments_and_globals/manage_environments#editing-an-active-environment) with your IP and port.\n\n2. If you already have an authorization token, update the Postman environment with your token. Otherwise, you will need to use the [Add a user](insert collection docs link) `POST` request to generate an authorization token.", 6 | "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" 7 | }, 8 | "item": [ 9 | { 10 | "_postman_id": "f7b37c20-37bb-48b1-93e1-13a79f9bcb34", 11 | "name": "Quickstart: lighting up the Nanoleaf", 12 | "description": "In this Postman collection, I added a Quickstart folder to group a handful of requests to demonstrate a possible workflow (details visible in the pre-request and test script sections). The remaining folders are replicated from the [Nanoleaf Open API Reference](http://forum.nanoleaf.me/docs/openapi).", 13 | "item": [ 14 | { 15 | "_postman_id": "0fe71046-6a4b-46b7-ab05-9ea648b06c89", 16 | "name": "Quickstart: Add a user", 17 | "event": [ 18 | { 19 | "listen": "test", 20 | "script": { 21 | "id": "ab8098e5-4e1a-4233-818f-8cd1fecbaee1", 22 | "type": "text/javascript", 23 | "exec": [ 24 | "pm.test(\"Status code is 200\", function () {", 25 | " pm.response.to.have.status(200);", 26 | "});", 27 | "", 28 | "pm.test(\"Set auth token\", function () {", 29 | " ", 30 | " if (pm.response.to.have.status(200)) {", 31 | " ", 32 | " // set the auth token as an environment variable", 33 | " let token = pm.response.json().auth_token;", 34 | " pm.environment.set(\"authToken\", token);", 35 | " ", 36 | " } else {", 37 | " ", 38 | " // log status code and reason, terminate collection run", 39 | " console.log('Status code: ', pm.response.code);", 40 | " console.log('Reason: ', pm.response.reason);", 41 | " postman.setNextRequest(null);", 42 | " return -1;", 43 | " }", 44 | " ", 45 | "});", 46 | "" 47 | ] 48 | } 49 | } 50 | ], 51 | "request": { 52 | "method": "POST", 53 | "header": [], 54 | "body": { 55 | "mode": "raw", 56 | "raw": "" 57 | }, 58 | "url": "http://{{ipAddress}}/api/v1/new", 59 | "description": "A user is authorized to access the OpenAPI if they can demonstrate physical access of the Light Panels. \n\n### Generate an authorization token\n\n1. On the Nanoleaf controller, hold the on-off button for 5-7 seconds until the LED starts flashing in a pattern.\n2. From the Postman app or your own app, send a POST request to the authorization endpoint within 30 seconds of activating pairing, like this (substituting the IP address and port for your central controller):\n\n`http://192.188.x.x:16021/api/v1/new`\n\n> **Finding your IP:** The IP address of your Nanoleaf can be found using your router. Once you have the Nanoleaf connected to your WiFi, go to your router webpage and browse the devices connected to your network. Once you find your Nanoleaf, you can see the IP assigned to the device. \n\n> Remember if you're accessing the Nanoleaf at a local IP address, like when your router assigns a local IP address to the connected devices, both the Nanoleaf device and the client accessing the Nanoleaf (Postman) must be on the same local network. For example, both the Nanoleaf and laptop with Postman should be connected to the same WiFi network.\n\nThe result returned will be a 32-character authorization token that you will use in all of your subsequent calls.\n\nRefer to Section 6 of the [Nanoleaf Open API Documentation](http://forum.nanoleaf.me/docs/openapi).\n\n**Note:** In this request's test script, the auth token value will be set as an environment variable called `authToken`. If you already have an authorization token that you'd like to use, [update the Postman environment](https://www.getpostman.com/docs/v6/postman/environments_and_globals/manage_environments#editing-an-active-environment) with your token." 60 | }, 61 | "response": [ 62 | { 63 | "id": "aa363295-74e3-4c4f-8239-807b7741167d", 64 | "name": "Add a user", 65 | "originalRequest": { 66 | "method": "POST", 67 | "header": [], 68 | "body": { 69 | "mode": "raw", 70 | "raw": "" 71 | }, 72 | "url": "http://{{ipAddress}}/api/v1/new" 73 | }, 74 | "status": "OK", 75 | "code": 200, 76 | "_postman_previewlanguage": "json", 77 | "header": [ 78 | { 79 | "key": "Content-Length", 80 | "value": "49", 81 | "name": "Content-Length", 82 | "description": "The length of the response body in octets (8-bit bytes)" 83 | }, 84 | { 85 | "key": "Content-Type", 86 | "value": "application/json", 87 | "name": "Content-Type", 88 | "description": "The mime type of this content" 89 | } 90 | ], 91 | "cookie": [], 92 | "responseTime": null, 93 | "body": "{\"auth_token\":\"zbp3aHIDoj0Ox2iAr857WMFck58mOBaL\"}" 94 | } 95 | ] 96 | }, 97 | { 98 | "_postman_id": "e3c3a502-711a-4cfc-a8b0-1c67402c5ede", 99 | "name": "Quickstart: Get all light controller info", 100 | "event": [ 101 | { 102 | "listen": "test", 103 | "script": { 104 | "id": "f93e039f-49bc-47e6-92f9-210cb4942115", 105 | "type": "text/javascript", 106 | "exec": [ 107 | "pm.test(\"Status code is 200\", function () {", 108 | " pm.response.to.have.status(200);", 109 | "});", 110 | "", 111 | "try {", 112 | " ", 113 | " let response = pm.response.json();", 114 | " ", 115 | " // if state is off, turn on state, otherwise update the effect", 116 | " if (!response.state.on.value) {", 117 | " console.log(\"Nanoleaf is off. Set next request to turn on.\");", 118 | " postman.setNextRequest(\"Quickstart: Update on/off\");", 119 | " } else {", 120 | " console.log(\"Nanoleaf is on. Set next request to list effects.\");", 121 | " postman.setNextRequest(\"Quickstart: List Effects\");", 122 | " }", 123 | " ", 124 | "}", 125 | "catch (e) {", 126 | " throw (e);", 127 | "}" 128 | ] 129 | } 130 | } 131 | ], 132 | "request": { 133 | "method": "GET", 134 | "header": [], 135 | "body": { 136 | "mode": "raw", 137 | "raw": "" 138 | }, 139 | "url": { 140 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/", 141 | "protocol": "http", 142 | "host": [ 143 | "{{ipAddress}}" 144 | ], 145 | "path": [ 146 | "api", 147 | "v1", 148 | ":auth_token", 149 | "" 150 | ], 151 | "variable": [ 152 | { 153 | "key": "auth_token", 154 | "value": "{{authToken}}" 155 | } 156 | ] 157 | } 158 | }, 159 | "response": [ 160 | { 161 | "id": "c62543f0-8e2c-48d5-9cbc-98acd5aa220b", 162 | "name": "Get all light controller info", 163 | "originalRequest": { 164 | "method": "GET", 165 | "header": [], 166 | "body": { 167 | "mode": "raw", 168 | "raw": "" 169 | }, 170 | "url": { 171 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/", 172 | "protocol": "http", 173 | "host": [ 174 | "{{ipAddress}}" 175 | ], 176 | "path": [ 177 | "api", 178 | "v1", 179 | ":auth_token", 180 | "" 181 | ], 182 | "variable": [ 183 | { 184 | "key": "auth_token", 185 | "value": "{{authToken}}" 186 | } 187 | ] 188 | } 189 | }, 190 | "status": "OK", 191 | "code": 200, 192 | "_postman_previewlanguage": "json", 193 | "header": [ 194 | { 195 | "key": "Content-Length", 196 | "value": "827", 197 | "name": "Content-Length", 198 | "description": "The length of the response body in octets (8-bit bytes)" 199 | }, 200 | { 201 | "key": "Content-Type", 202 | "value": "application/json", 203 | "name": "Content-Type", 204 | "description": "The mime type of this content" 205 | } 206 | ], 207 | "cookie": [], 208 | "responseTime": null, 209 | "body": "{\"name\":\"Nanoleaf Light Panels 52:c4:ce\",\"serialNo\":\"S18122A0754\",\"manufacturer\":\"Nanoleaf\",\"firmwareVersion\":\"2.3.0\",\"model\":\"NL22\",\"state\":{\"on\":{\"value\":true},\"brightness\":{\"value\":100,\"max\":100,\"min\":0},\"hue\":{\"value\":0,\"max\":360,\"min\":0},\"sat\":{\"value\":0,\"max\":100,\"min\":0},\"ct\":{\"value\":4000,\"max\":6500,\"min\":1200},\"colorMode\":\"effect\"},\"effects\":{\"select\":\"Northern Lights\",\"effectsList\":[\"Color Burst\",\"Flames\",\"Forest\",\"Inner Peace\",\"Nemo\",\"Northern Lights\",\"Romantic\",\"Snowfall\"]},\"panelLayout\":{\"layout\":{\"numPanels\":1,\"sideLength\":150,\"positionData\":[{\"panelId\":186,\"x\":-74,\"y\":43,\"o\":180}]},\"globalOrientation\":{\"value\":0,\"max\":360,\"min\":0}},\"rhythm\":{\"rhythmConnected\":false,\"rhythmActive\":null,\"rhythmId\":null,\"hardwareVersion\":null,\"firmwareVersion\":null,\"auxAvailable\":null,\"rhythmMode\":null,\"rhythmPos\":null}}" 210 | } 211 | ] 212 | }, 213 | { 214 | "_postman_id": "0a639f20-2de7-4fcf-8529-5e43b968e34b", 215 | "name": "Quickstart: update on/off", 216 | "event": [ 217 | { 218 | "listen": "test", 219 | "script": { 220 | "id": "59f7ef47-7439-4e5e-adb3-6c82cd31c090", 221 | "type": "text/javascript", 222 | "exec": [ 223 | "pm.test(\"Status code is 204\", function () {", 224 | " pm.response.to.have.status(204);", 225 | "});" 226 | ] 227 | } 228 | } 229 | ], 230 | "request": { 231 | "method": "PUT", 232 | "header": [ 233 | { 234 | "key": "Content-Type", 235 | "value": "application/json" 236 | } 237 | ], 238 | "body": { 239 | "mode": "raw", 240 | "raw": "{\n \"on\": {\n \"value\": true\n }\n}" 241 | }, 242 | "url": { 243 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state", 244 | "protocol": "http", 245 | "host": [ 246 | "{{ipAddress}}" 247 | ], 248 | "path": [ 249 | "api", 250 | "v1", 251 | ":auth_token", 252 | "state" 253 | ], 254 | "variable": [ 255 | { 256 | "key": "auth_token", 257 | "value": "{{authToken}}" 258 | } 259 | ] 260 | } 261 | }, 262 | "response": [ 263 | { 264 | "id": "95cf7627-5fc2-425f-a7b2-deef07206693", 265 | "name": "Quickstart: update on/off", 266 | "originalRequest": { 267 | "method": "PUT", 268 | "header": [ 269 | { 270 | "key": "Content-Type", 271 | "value": "application/json" 272 | } 273 | ], 274 | "body": { 275 | "mode": "raw", 276 | "raw": "{\n \"on\": {\n \"value\": true\n }\n}" 277 | }, 278 | "url": { 279 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state", 280 | "protocol": "http", 281 | "host": [ 282 | "{{ipAddress}}" 283 | ], 284 | "path": [ 285 | "api", 286 | "v1", 287 | ":auth_token", 288 | "state" 289 | ], 290 | "variable": [ 291 | { 292 | "key": "auth_token", 293 | "value": "{{authToken}}" 294 | } 295 | ] 296 | } 297 | }, 298 | "status": "No Content", 299 | "code": 204, 300 | "_postman_previewlanguage": "plain", 301 | "header": [ 302 | { 303 | "key": "Content-Length", 304 | "value": "0", 305 | "name": "Content-Length", 306 | "description": "The length of the response body in octets (8-bit bytes)" 307 | } 308 | ], 309 | "cookie": [], 310 | "responseTime": null, 311 | "body": "" 312 | } 313 | ] 314 | }, 315 | { 316 | "_postman_id": "e5ef5040-dad0-4bbd-b8b4-6bc2a23fe641", 317 | "name": "Quickstart: List Effects", 318 | "event": [ 319 | { 320 | "listen": "test", 321 | "script": { 322 | "id": "cf6e3f5b-2288-4f3f-ad43-2bdd67fcf2a1", 323 | "type": "text/javascript", 324 | "exec": [ 325 | "pm.test(\"Status code is 200\", function () {", 326 | " pm.response.to.have.status(200);", 327 | "});", 328 | "", 329 | "pm.test(\"Set next Effect\", function () {", 330 | " ", 331 | " if (pm.response.to.have.status(200)) {", 332 | " ", 333 | " // select random effect, and set as an environment variable", 334 | " let arrayEffects = pm.response.json();", 335 | " let indexSelected = Math.floor(Math.random() * arrayEffects.length);", 336 | " pm.environment.set(\"nextEffect\", arrayEffects[indexSelected]);", 337 | " ", 338 | " } else {", 339 | " ", 340 | " // log status code and reason, terminate collection run", 341 | " console.log('Status code: ', pm.response.code);", 342 | " console.log('Reason: ', pm.response.reason);", 343 | " postman.setNextRequest(null);", 344 | " return -1;", 345 | " }", 346 | " ", 347 | "});", 348 | "" 349 | ] 350 | } 351 | } 352 | ], 353 | "request": { 354 | "method": "GET", 355 | "header": [], 356 | "body": { 357 | "mode": "raw", 358 | "raw": "" 359 | }, 360 | "url": { 361 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects/effectsList", 362 | "protocol": "http", 363 | "host": [ 364 | "{{ipAddress}}" 365 | ], 366 | "path": [ 367 | "api", 368 | "v1", 369 | ":auth_token", 370 | "effects", 371 | "effectsList" 372 | ], 373 | "variable": [ 374 | { 375 | "key": "auth_token", 376 | "value": "{{authToken}}" 377 | } 378 | ] 379 | } 380 | }, 381 | "response": [ 382 | { 383 | "id": "8bbe15a8-88f7-49a4-b739-de1e1e6a21fd", 384 | "name": "List", 385 | "originalRequest": { 386 | "method": "GET", 387 | "header": [], 388 | "body": { 389 | "mode": "raw", 390 | "raw": "" 391 | }, 392 | "url": { 393 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects/effectsList", 394 | "protocol": "http", 395 | "host": [ 396 | "{{ipAddress}}" 397 | ], 398 | "path": [ 399 | "api", 400 | "v1", 401 | ":auth_token", 402 | "effects", 403 | "effectsList" 404 | ], 405 | "variable": [ 406 | { 407 | "key": "auth_token", 408 | "value": "{{authToken}}" 409 | } 410 | ] 411 | } 412 | }, 413 | "status": "OK", 414 | "code": 200, 415 | "_postman_previewlanguage": "json", 416 | "header": [ 417 | { 418 | "key": "Content-Length", 419 | "value": "223", 420 | "name": "Content-Length", 421 | "description": "The length of the response body in octets (8-bit bytes)" 422 | }, 423 | { 424 | "key": "Content-Type", 425 | "value": "application/json", 426 | "name": "Content-Type", 427 | "description": "The mime type of this content" 428 | } 429 | ], 430 | "cookie": [], 431 | "responseTime": null, 432 | "body": "[\"Color Burst\",\"Fireworks\",\"Flames\",\"Forest\",\"Inner Peace\",\"Meteor Shower\",\"Nemo\",\"Northern Lights\",\"Paint Splatter\",\"Pulse Pop Beats\",\"Rhythmic Northern Lights\",\"Ripple\",\"Romantic\",\"Snowfall\",\"Sound Bar\",\"Streaking Notes\"]" 433 | } 434 | ] 435 | }, 436 | { 437 | "_postman_id": "3a5eab0a-4bdf-41dd-b0b8-813d8f66f7d6", 438 | "name": "Quickstart: Update Effect", 439 | "event": [ 440 | { 441 | "listen": "test", 442 | "script": { 443 | "id": "e173498c-a528-42c5-8106-21e9c0894b4f", 444 | "type": "text/javascript", 445 | "exec": [ 446 | "pm.test(\"Status code is 204\", function () {", 447 | " pm.response.to.have.status(204);", 448 | " console.log(\"Effect updated to: \" + pm.environment.get(\"nextEffect\"));", 449 | "});", 450 | "", 451 | "pm.environment.unset(\"nextEffect\");", 452 | "", 453 | "// terminate collection run", 454 | "postman.setNextRequest(null);" 455 | ] 456 | } 457 | } 458 | ], 459 | "request": { 460 | "method": "PUT", 461 | "header": [], 462 | "body": { 463 | "mode": "raw", 464 | "raw": "{\"select\" : \"{{nextEffect}}\"}" 465 | }, 466 | "url": { 467 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects", 468 | "protocol": "http", 469 | "host": [ 470 | "{{ipAddress}}" 471 | ], 472 | "path": [ 473 | "api", 474 | "v1", 475 | ":auth_token", 476 | "effects" 477 | ], 478 | "variable": [ 479 | { 480 | "key": "auth_token", 481 | "value": "{{authToken}}" 482 | } 483 | ] 484 | } 485 | }, 486 | "response": [ 487 | { 488 | "id": "ba50f090-e94c-4321-88eb-85ec046bbad0", 489 | "name": "Select - update", 490 | "originalRequest": { 491 | "method": "PUT", 492 | "header": [], 493 | "body": { 494 | "mode": "raw", 495 | "raw": "{\"select\" : \"Snowfall\"}" 496 | }, 497 | "url": { 498 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects", 499 | "protocol": "http", 500 | "host": [ 501 | "{{ipAddress}}" 502 | ], 503 | "path": [ 504 | "api", 505 | "v1", 506 | ":auth_token", 507 | "effects" 508 | ], 509 | "variable": [ 510 | { 511 | "key": "auth_token", 512 | "value": "{{authToken}}" 513 | } 514 | ] 515 | } 516 | }, 517 | "status": "No Content", 518 | "code": 204, 519 | "_postman_previewlanguage": "plain", 520 | "header": [ 521 | { 522 | "key": "Content-Length", 523 | "value": "0", 524 | "name": "Content-Length", 525 | "description": "The length of the response body in octets (8-bit bytes)" 526 | } 527 | ], 528 | "cookie": [], 529 | "responseTime": null, 530 | "body": "" 531 | } 532 | ] 533 | } 534 | ], 535 | "event": [ 536 | { 537 | "listen": "prerequest", 538 | "script": { 539 | "id": "7ece8c15-9df0-425e-a420-ec41080e649b", 540 | "type": "text/javascript", 541 | "exec": [ 542 | "" 543 | ] 544 | } 545 | }, 546 | { 547 | "listen": "test", 548 | "script": { 549 | "id": "fcce4722-6f7e-4ce6-9784-f6f329956582", 550 | "type": "text/javascript", 551 | "exec": [ 552 | "" 553 | ] 554 | } 555 | } 556 | ] 557 | }, 558 | { 559 | "_postman_id": "2bee1873-aedb-4a8f-9353-035e2d9ad584", 560 | "name": "Authorization", 561 | "description": null, 562 | "item": [ 563 | { 564 | "_postman_id": "edd41442-c94f-49dc-977b-8180be92e018", 565 | "name": "Add a user", 566 | "event": [ 567 | { 568 | "listen": "test", 569 | "script": { 570 | "id": "a86416d9-1760-49e7-a3fe-484e36475957", 571 | "type": "text/javascript", 572 | "exec": [ 573 | "pm.test(\"Status code is 200\", function () {", 574 | " pm.response.to.have.status(200);", 575 | "});", 576 | "", 577 | "pm.test(\"Set auth token\", function () {", 578 | " if (pm.response.to.have.status(200)) {", 579 | " let token = pm.response.json().auth_token;", 580 | " pm.environment.set(\"authToken\", token);", 581 | " }", 582 | "});", 583 | "" 584 | ] 585 | } 586 | } 587 | ], 588 | "request": { 589 | "method": "POST", 590 | "header": [], 591 | "body": { 592 | "mode": "raw", 593 | "raw": "" 594 | }, 595 | "url": "http://{{ipAddress}}/api/v1/new", 596 | "description": "A user is authorized to access the OpenAPI if they can demonstrate physical access of the Light Panels. \n\n### Generate an authorization token\n\n1. On the Nanoleaf controller, hold the on-off button for 5-7 seconds until the LED starts flashing in a pattern.\n2. From the Postman app or your own app, send a POST request to the authorization endpoint within 30 seconds of activating pairing, like this (substituting the IP address and port for your central controller):\n\n`http://192.188.x.x:16021/api/v1/new`\n\n> **Finding your IP:** The IP address of your Nanoleaf can be found using your router. Once you have the Nanoleaf connected to your WiFi, go to your router webpage and browse the devices connected to your network. Once you find your Nanoleaf, you can see the IP assigned to the device. \n\n> Remember if you're accessing the Nanoleaf at a local IP address, like when your router assigns a local IP address to the connected devices, both the Nanoleaf device and the client accessing the Nanoleaf (Postman) must be on the same local network. For example, both the Nanoleaf and laptop with Postman should be connected to the same WiFi network.\n\nThe result returned will be a 32-character authorization token that you will use in all of your subsequent calls.\n\nRefer to Section 6 of the [Nanoleaf Open API Documentation](http://forum.nanoleaf.me/docs/openapi).\n\n**Note:** In this request's test script, the auth token value will be set as an environment variable called `authToken`. If you already have an authorization token that you'd like to use, [update the Postman environment](https://www.getpostman.com/docs/v6/postman/environments_and_globals/manage_environments#editing-an-active-environment) with your token." 597 | }, 598 | "response": [ 599 | { 600 | "id": "f4016ff5-0051-46c8-98fc-8d00afc95b8c", 601 | "name": "Add a user", 602 | "originalRequest": { 603 | "method": "POST", 604 | "header": [], 605 | "body": { 606 | "mode": "raw", 607 | "raw": "" 608 | }, 609 | "url": "http://{{ipAddress}}/api/v1/new" 610 | }, 611 | "status": "OK", 612 | "code": 200, 613 | "_postman_previewlanguage": "Text", 614 | "header": [], 615 | "cookie": [], 616 | "responseTime": null, 617 | "body": "{\n \"auth_token\": \"zbp3aHIDoj0Ox2iAr857WMFck58mOBaL\"\n}" 618 | } 619 | ] 620 | }, 621 | { 622 | "_postman_id": "cc5ebd2e-f2b2-4a0b-86b9-e0107556da97", 623 | "name": "Delete a user", 624 | "event": [ 625 | { 626 | "listen": "test", 627 | "script": { 628 | "id": "b8740a35-11ce-4470-a198-4443953d85fd", 629 | "type": "text/javascript", 630 | "exec": [ 631 | "pm.test(\"Status code is 204\", function () {", 632 | " pm.response.to.have.status(204);", 633 | "});" 634 | ] 635 | } 636 | } 637 | ], 638 | "request": { 639 | "method": "DELETE", 640 | "header": [], 641 | "body": { 642 | "mode": "raw", 643 | "raw": "" 644 | }, 645 | "url": { 646 | "raw": "http://{{ipAddress}}/api/v1/:auth_token", 647 | "protocol": "http", 648 | "host": [ 649 | "{{ipAddress}}" 650 | ], 651 | "path": [ 652 | "api", 653 | "v1", 654 | ":auth_token" 655 | ], 656 | "variable": [ 657 | { 658 | "key": "auth_token", 659 | "value": "{{authToken}}" 660 | } 661 | ] 662 | }, 663 | "description": "Requires an authorization token of an existing user." 664 | }, 665 | "response": [ 666 | { 667 | "id": "0badb1da-5fe6-491f-b22f-e2340163d0d4", 668 | "name": "Delete a user", 669 | "originalRequest": { 670 | "method": "DELETE", 671 | "header": [], 672 | "body": { 673 | "mode": "raw", 674 | "raw": "" 675 | }, 676 | "url": { 677 | "raw": "http://{{ipAddress}}/api/v1/:auth_token", 678 | "protocol": "http", 679 | "host": [ 680 | "{{ipAddress}}" 681 | ], 682 | "path": [ 683 | "api", 684 | "v1", 685 | ":auth_token" 686 | ], 687 | "variable": [ 688 | { 689 | "key": "auth_token", 690 | "value": "{{authToken}}" 691 | } 692 | ] 693 | } 694 | }, 695 | "status": "No Content", 696 | "code": 204, 697 | "_postman_previewlanguage": "plain", 698 | "header": [ 699 | { 700 | "key": "Content-Length", 701 | "value": "0", 702 | "name": "Content-Length", 703 | "description": "The length of the response body in octets (8-bit bytes)" 704 | } 705 | ], 706 | "cookie": [], 707 | "responseTime": null, 708 | "body": "" 709 | } 710 | ] 711 | } 712 | ] 713 | }, 714 | { 715 | "_postman_id": "c722b0bd-eddf-4e55-9c96-73ca3a8af160", 716 | "name": "Get all controller info", 717 | "description": null, 718 | "item": [ 719 | { 720 | "_postman_id": "4af1567b-e1b4-47d5-85ff-2142043a0c7a", 721 | "name": "Get all light controller info", 722 | "event": [ 723 | { 724 | "listen": "test", 725 | "script": { 726 | "id": "68b7880d-2b57-4285-96e1-34df6351b931", 727 | "type": "text/javascript", 728 | "exec": [ 729 | "pm.test(\"Status code is 200\", function () {", 730 | " pm.response.to.have.status(200);", 731 | "});" 732 | ] 733 | } 734 | } 735 | ], 736 | "request": { 737 | "method": "GET", 738 | "header": [], 739 | "body": { 740 | "mode": "raw", 741 | "raw": "" 742 | }, 743 | "url": { 744 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/", 745 | "protocol": "http", 746 | "host": [ 747 | "{{ipAddress}}" 748 | ], 749 | "path": [ 750 | "api", 751 | "v1", 752 | ":auth_token", 753 | "" 754 | ], 755 | "variable": [ 756 | { 757 | "key": "auth_token", 758 | "value": "{{authToken}}" 759 | } 760 | ] 761 | } 762 | }, 763 | "response": [ 764 | { 765 | "id": "bc57d99d-9736-4f57-929c-78db7096cfaf", 766 | "name": "Get all light controller info", 767 | "originalRequest": { 768 | "method": "GET", 769 | "header": [], 770 | "body": { 771 | "mode": "raw", 772 | "raw": "" 773 | }, 774 | "url": { 775 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/", 776 | "protocol": "http", 777 | "host": [ 778 | "{{ipAddress}}" 779 | ], 780 | "path": [ 781 | "api", 782 | "v1", 783 | ":auth_token", 784 | "" 785 | ], 786 | "variable": [ 787 | { 788 | "key": "auth_token", 789 | "value": "{{authToken}}" 790 | } 791 | ] 792 | } 793 | }, 794 | "status": "OK", 795 | "code": 200, 796 | "_postman_previewlanguage": "json", 797 | "header": [ 798 | { 799 | "key": "Content-Length", 800 | "value": "827", 801 | "name": "Content-Length", 802 | "description": "The length of the response body in octets (8-bit bytes)" 803 | }, 804 | { 805 | "key": "Content-Type", 806 | "value": "application/json", 807 | "name": "Content-Type", 808 | "description": "The mime type of this content" 809 | } 810 | ], 811 | "cookie": [], 812 | "responseTime": null, 813 | "body": "{\"name\":\"Nanoleaf Light Panels 52:c4:ce\",\"serialNo\":\"S18122A0754\",\"manufacturer\":\"Nanoleaf\",\"firmwareVersion\":\"2.3.0\",\"model\":\"NL22\",\"state\":{\"on\":{\"value\":true},\"brightness\":{\"value\":100,\"max\":100,\"min\":0},\"hue\":{\"value\":0,\"max\":360,\"min\":0},\"sat\":{\"value\":0,\"max\":100,\"min\":0},\"ct\":{\"value\":4000,\"max\":6500,\"min\":1200},\"colorMode\":\"effect\"},\"effects\":{\"select\":\"Northern Lights\",\"effectsList\":[\"Color Burst\",\"Flames\",\"Forest\",\"Inner Peace\",\"Nemo\",\"Northern Lights\",\"Romantic\",\"Snowfall\"]},\"panelLayout\":{\"layout\":{\"numPanels\":1,\"sideLength\":150,\"positionData\":[{\"panelId\":186,\"x\":-74,\"y\":43,\"o\":180}]},\"globalOrientation\":{\"value\":0,\"max\":360,\"min\":0}},\"rhythm\":{\"rhythmConnected\":false,\"rhythmActive\":null,\"rhythmId\":null,\"hardwareVersion\":null,\"firmwareVersion\":null,\"auxAvailable\":null,\"rhythmMode\":null,\"rhythmPos\":null}}" 814 | } 815 | ] 816 | } 817 | ] 818 | }, 819 | { 820 | "_postman_id": "cbbfadae-fa4a-4cdf-933e-1e9d8fbf40d0", 821 | "name": "State", 822 | "description": "When writing state information, you set the value of a state or operate using increment where applicable. Increment can be positive or negative and will only go to the min or max value.", 823 | "item": [ 824 | { 825 | "_postman_id": "4b0facc8-c865-4006-98cb-4c2195a028ad", 826 | "name": "On/Off", 827 | "event": [ 828 | { 829 | "listen": "test", 830 | "script": { 831 | "id": "9a5b6fd3-bbc3-4ac2-a2e2-01dcf54d0989", 832 | "type": "text/javascript", 833 | "exec": [ 834 | "pm.test(\"Status code is 204: no content\", function () {", 835 | " pm.response.to.have.status(204);", 836 | "});" 837 | ] 838 | } 839 | } 840 | ], 841 | "request": { 842 | "method": "GET", 843 | "header": [], 844 | "body": { 845 | "mode": "raw", 846 | "raw": "" 847 | }, 848 | "url": { 849 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/on", 850 | "protocol": "http", 851 | "host": [ 852 | "{{ipAddress}}" 853 | ], 854 | "path": [ 855 | "api", 856 | "v1", 857 | ":auth_token", 858 | "state", 859 | "on" 860 | ], 861 | "variable": [ 862 | { 863 | "key": "auth_token", 864 | "value": "{{authToken}}" 865 | } 866 | ] 867 | } 868 | }, 869 | "response": [ 870 | { 871 | "id": "c60822ef-2493-454f-9322-ab2b42d016f6", 872 | "name": "On/Off", 873 | "originalRequest": { 874 | "method": "GET", 875 | "header": [], 876 | "body": { 877 | "mode": "raw", 878 | "raw": "" 879 | }, 880 | "url": { 881 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/on", 882 | "protocol": "http", 883 | "host": [ 884 | "{{ipAddress}}" 885 | ], 886 | "path": [ 887 | "api", 888 | "v1", 889 | ":auth_token", 890 | "state", 891 | "on" 892 | ], 893 | "variable": [ 894 | { 895 | "key": "auth_token", 896 | "value": "{{authToken}}" 897 | } 898 | ] 899 | } 900 | }, 901 | "status": "OK", 902 | "code": 200, 903 | "_postman_previewlanguage": "json", 904 | "header": [ 905 | { 906 | "key": "Content-Length", 907 | "value": "14", 908 | "name": "Content-Length", 909 | "description": "The length of the response body in octets (8-bit bytes)" 910 | }, 911 | { 912 | "key": "Content-Type", 913 | "value": "application/json", 914 | "name": "Content-Type", 915 | "description": "The mime type of this content" 916 | } 917 | ], 918 | "cookie": [], 919 | "responseTime": null, 920 | "body": "{\"value\":true}" 921 | } 922 | ] 923 | }, 924 | { 925 | "_postman_id": "562c79e1-5405-4cd9-9287-13fec5a6bd57", 926 | "name": "On/Off - update", 927 | "event": [ 928 | { 929 | "listen": "test", 930 | "script": { 931 | "id": "b596e742-19d1-45d5-a7ce-569314a7d589", 932 | "type": "text/javascript", 933 | "exec": [ 934 | "pm.test(\"Status code is 204\", function () {", 935 | " pm.response.to.have.status(204);", 936 | "});" 937 | ] 938 | } 939 | } 940 | ], 941 | "request": { 942 | "method": "PUT", 943 | "header": [ 944 | { 945 | "key": "Content-Type", 946 | "value": "application/json" 947 | } 948 | ], 949 | "body": { 950 | "mode": "raw", 951 | "raw": "{\n \"on\": {\n \"value\": true\n }\n}" 952 | }, 953 | "url": { 954 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state", 955 | "protocol": "http", 956 | "host": [ 957 | "{{ipAddress}}" 958 | ], 959 | "path": [ 960 | "api", 961 | "v1", 962 | ":auth_token", 963 | "state" 964 | ], 965 | "variable": [ 966 | { 967 | "key": "auth_token", 968 | "value": "{{authToken}}" 969 | } 970 | ] 971 | } 972 | }, 973 | "response": [ 974 | { 975 | "id": "59352682-bb12-4f5a-9eb1-6ed6e004cb3e", 976 | "name": "On/Off - update", 977 | "originalRequest": { 978 | "method": "PUT", 979 | "header": [ 980 | { 981 | "key": "Content-Type", 982 | "value": "application/json" 983 | } 984 | ], 985 | "body": { 986 | "mode": "raw", 987 | "raw": "{\n \"on\": {\n \"value\": true\n }\n}" 988 | }, 989 | "url": { 990 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state", 991 | "protocol": "http", 992 | "host": [ 993 | "{{ipAddress}}" 994 | ], 995 | "path": [ 996 | "api", 997 | "v1", 998 | ":auth_token", 999 | "state" 1000 | ], 1001 | "variable": [ 1002 | { 1003 | "key": "auth_token", 1004 | "value": "{{authToken}}" 1005 | } 1006 | ] 1007 | } 1008 | }, 1009 | "status": "No Content", 1010 | "code": 204, 1011 | "_postman_previewlanguage": "plain", 1012 | "header": [ 1013 | { 1014 | "key": "Content-Length", 1015 | "value": "0", 1016 | "name": "Content-Length", 1017 | "description": "The length of the response body in octets (8-bit bytes)" 1018 | } 1019 | ], 1020 | "cookie": [], 1021 | "responseTime": null, 1022 | "body": "" 1023 | } 1024 | ] 1025 | }, 1026 | { 1027 | "_postman_id": "797bdeb9-af77-40eb-bc41-230320dcfbdd", 1028 | "name": "Brightness", 1029 | "event": [ 1030 | { 1031 | "listen": "test", 1032 | "script": { 1033 | "id": "b02559f8-a279-4d58-8fd7-ee375dfb93bd", 1034 | "type": "text/javascript", 1035 | "exec": [ 1036 | "pm.test(\"Status code is 200\", function () {", 1037 | " pm.response.to.have.status(200);", 1038 | "});" 1039 | ] 1040 | } 1041 | } 1042 | ], 1043 | "request": { 1044 | "method": "GET", 1045 | "header": [], 1046 | "body": { 1047 | "mode": "raw", 1048 | "raw": "" 1049 | }, 1050 | "url": { 1051 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/brightness", 1052 | "protocol": "http", 1053 | "host": [ 1054 | "{{ipAddress}}" 1055 | ], 1056 | "path": [ 1057 | "api", 1058 | "v1", 1059 | ":auth_token", 1060 | "state", 1061 | "brightness" 1062 | ], 1063 | "variable": [ 1064 | { 1065 | "key": "auth_token", 1066 | "value": "{{authToken}}" 1067 | } 1068 | ] 1069 | } 1070 | }, 1071 | "response": [ 1072 | { 1073 | "id": "15e11dc7-3987-44e9-8ede-3deb84b849c7", 1074 | "name": "Brightness", 1075 | "originalRequest": { 1076 | "method": "GET", 1077 | "header": [], 1078 | "body": { 1079 | "mode": "raw", 1080 | "raw": "" 1081 | }, 1082 | "url": { 1083 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/brightness", 1084 | "protocol": "http", 1085 | "host": [ 1086 | "{{ipAddress}}" 1087 | ], 1088 | "path": [ 1089 | "api", 1090 | "v1", 1091 | ":auth_token", 1092 | "state", 1093 | "brightness" 1094 | ], 1095 | "variable": [ 1096 | { 1097 | "key": "auth_token", 1098 | "value": "{{authToken}}" 1099 | } 1100 | ] 1101 | } 1102 | }, 1103 | "status": "OK", 1104 | "code": 200, 1105 | "_postman_previewlanguage": "json", 1106 | "header": [ 1107 | { 1108 | "key": "Content-Length", 1109 | "value": "31", 1110 | "name": "Content-Length", 1111 | "description": "The length of the response body in octets (8-bit bytes)" 1112 | }, 1113 | { 1114 | "key": "Content-Type", 1115 | "value": "application/json", 1116 | "name": "Content-Type", 1117 | "description": "The mime type of this content" 1118 | } 1119 | ], 1120 | "cookie": [], 1121 | "responseTime": null, 1122 | "body": "{\"value\":100,\"max\":100,\"min\":0}" 1123 | } 1124 | ] 1125 | }, 1126 | { 1127 | "_postman_id": "2a1a6ec5-19dd-43f2-8ccb-9fc2df9a1502", 1128 | "name": "Brightness - update", 1129 | "event": [ 1130 | { 1131 | "listen": "test", 1132 | "script": { 1133 | "id": "25f7ba61-583b-41aa-b9c8-1b8a29ce0451", 1134 | "type": "text/javascript", 1135 | "exec": [ 1136 | "pm.test(\"Status code is 204\", function () {", 1137 | " pm.response.to.have.status(204);", 1138 | "});" 1139 | ] 1140 | } 1141 | } 1142 | ], 1143 | "request": { 1144 | "method": "PUT", 1145 | "header": [], 1146 | "body": { 1147 | "mode": "raw", 1148 | "raw": "{\"brightness\" : {\"value\":100, \"duration\":30}}" 1149 | }, 1150 | "url": { 1151 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state", 1152 | "protocol": "http", 1153 | "host": [ 1154 | "{{ipAddress}}" 1155 | ], 1156 | "path": [ 1157 | "api", 1158 | "v1", 1159 | ":auth_token", 1160 | "state" 1161 | ], 1162 | "variable": [ 1163 | { 1164 | "key": "auth_token", 1165 | "value": "{{authToken}}" 1166 | } 1167 | ] 1168 | }, 1169 | "description": "Duration field is optional, and specified in seconds." 1170 | }, 1171 | "response": [ 1172 | { 1173 | "id": "4c0bb769-9626-43d4-8108-001e390d1dba", 1174 | "name": "Brightness - update", 1175 | "originalRequest": { 1176 | "method": "PUT", 1177 | "header": [], 1178 | "body": { 1179 | "mode": "raw", 1180 | "raw": "{\"brightness\" : {\"value\":100, \"duration\":30}}" 1181 | }, 1182 | "url": { 1183 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state", 1184 | "protocol": "http", 1185 | "host": [ 1186 | "{{ipAddress}}" 1187 | ], 1188 | "path": [ 1189 | "api", 1190 | "v1", 1191 | ":auth_token", 1192 | "state" 1193 | ], 1194 | "variable": [ 1195 | { 1196 | "key": "auth_token", 1197 | "value": "{{authToken}}" 1198 | } 1199 | ] 1200 | } 1201 | }, 1202 | "status": "No Content", 1203 | "code": 204, 1204 | "_postman_previewlanguage": "plain", 1205 | "header": [ 1206 | { 1207 | "key": "Content-Length", 1208 | "value": "0", 1209 | "name": "Content-Length", 1210 | "description": "The length of the response body in octets (8-bit bytes)" 1211 | } 1212 | ], 1213 | "cookie": [], 1214 | "responseTime": null, 1215 | "body": "" 1216 | } 1217 | ] 1218 | }, 1219 | { 1220 | "_postman_id": "d1bbab0d-7f41-466a-817f-eea22d988e2f", 1221 | "name": "Hue", 1222 | "event": [ 1223 | { 1224 | "listen": "test", 1225 | "script": { 1226 | "id": "666d9017-a2a2-478a-8931-cef28a431265", 1227 | "type": "text/javascript", 1228 | "exec": [ 1229 | "pm.test(\"Status code is 200\", function () {", 1230 | " pm.response.to.have.status(200);", 1231 | "});" 1232 | ] 1233 | } 1234 | } 1235 | ], 1236 | "request": { 1237 | "method": "GET", 1238 | "header": [], 1239 | "body": { 1240 | "mode": "raw", 1241 | "raw": "" 1242 | }, 1243 | "url": { 1244 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/hue", 1245 | "protocol": "http", 1246 | "host": [ 1247 | "{{ipAddress}}" 1248 | ], 1249 | "path": [ 1250 | "api", 1251 | "v1", 1252 | ":auth_token", 1253 | "state", 1254 | "hue" 1255 | ], 1256 | "variable": [ 1257 | { 1258 | "key": "auth_token", 1259 | "value": "{{authToken}}" 1260 | } 1261 | ] 1262 | } 1263 | }, 1264 | "response": [ 1265 | { 1266 | "id": "c344604d-757e-4265-af98-4dbe70008aca", 1267 | "name": "Hue", 1268 | "originalRequest": { 1269 | "method": "GET", 1270 | "header": [], 1271 | "body": { 1272 | "mode": "raw", 1273 | "raw": "" 1274 | }, 1275 | "url": { 1276 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/hue", 1277 | "protocol": "http", 1278 | "host": [ 1279 | "{{ipAddress}}" 1280 | ], 1281 | "path": [ 1282 | "api", 1283 | "v1", 1284 | ":auth_token", 1285 | "state", 1286 | "hue" 1287 | ], 1288 | "variable": [ 1289 | { 1290 | "key": "auth_token", 1291 | "value": "{{authToken}}" 1292 | } 1293 | ] 1294 | } 1295 | }, 1296 | "status": "OK", 1297 | "code": 200, 1298 | "_postman_previewlanguage": "json", 1299 | "header": [ 1300 | { 1301 | "key": "Content-Length", 1302 | "value": "29", 1303 | "name": "Content-Length", 1304 | "description": "The length of the response body in octets (8-bit bytes)" 1305 | }, 1306 | { 1307 | "key": "Content-Type", 1308 | "value": "application/json", 1309 | "name": "Content-Type", 1310 | "description": "The mime type of this content" 1311 | } 1312 | ], 1313 | "cookie": [], 1314 | "responseTime": null, 1315 | "body": "{\"value\":0,\"max\":360,\"min\":0}" 1316 | } 1317 | ] 1318 | }, 1319 | { 1320 | "_postman_id": "b6918f7e-d156-4c80-ac6a-1f429c989c74", 1321 | "name": "Hue - update", 1322 | "event": [ 1323 | { 1324 | "listen": "test", 1325 | "script": { 1326 | "id": "9aa09750-d124-498f-815e-1a6799030607", 1327 | "type": "text/javascript", 1328 | "exec": [ 1329 | "pm.test(\"Status code is 204\", function () {", 1330 | " pm.response.to.have.status(204);", 1331 | "});" 1332 | ] 1333 | } 1334 | } 1335 | ], 1336 | "request": { 1337 | "method": "PUT", 1338 | "header": [], 1339 | "body": { 1340 | "mode": "raw", 1341 | "raw": "{\"hue\" : {\"value\":120}}" 1342 | }, 1343 | "url": { 1344 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state", 1345 | "protocol": "http", 1346 | "host": [ 1347 | "{{ipAddress}}" 1348 | ], 1349 | "path": [ 1350 | "api", 1351 | "v1", 1352 | ":auth_token", 1353 | "state" 1354 | ], 1355 | "variable": [ 1356 | { 1357 | "key": "auth_token", 1358 | "value": "{{authToken}}" 1359 | } 1360 | ] 1361 | } 1362 | }, 1363 | "response": [ 1364 | { 1365 | "id": "5cf3a94d-8b13-40fa-be1f-1879ffeaf5e7", 1366 | "name": "Hue - update", 1367 | "originalRequest": { 1368 | "method": "PUT", 1369 | "header": [], 1370 | "body": { 1371 | "mode": "raw", 1372 | "raw": "{\"hue\" : {\"value\":120}}" 1373 | }, 1374 | "url": { 1375 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state", 1376 | "protocol": "http", 1377 | "host": [ 1378 | "{{ipAddress}}" 1379 | ], 1380 | "path": [ 1381 | "api", 1382 | "v1", 1383 | ":auth_token", 1384 | "state" 1385 | ], 1386 | "variable": [ 1387 | { 1388 | "key": "auth_token", 1389 | "value": "{{authToken}}" 1390 | } 1391 | ] 1392 | } 1393 | }, 1394 | "status": "No Content", 1395 | "code": 204, 1396 | "_postman_previewlanguage": "plain", 1397 | "header": [ 1398 | { 1399 | "key": "Content-Length", 1400 | "value": "0", 1401 | "name": "Content-Length", 1402 | "description": "The length of the response body in octets (8-bit bytes)" 1403 | } 1404 | ], 1405 | "cookie": [], 1406 | "responseTime": null, 1407 | "body": "" 1408 | } 1409 | ] 1410 | }, 1411 | { 1412 | "_postman_id": "4299cd10-7dd5-416e-a1cc-55cca7607e39", 1413 | "name": "Saturation", 1414 | "event": [ 1415 | { 1416 | "listen": "test", 1417 | "script": { 1418 | "id": "d4c38982-3dea-4ec9-81f4-f6c8e1806a7f", 1419 | "type": "text/javascript", 1420 | "exec": [ 1421 | "pm.test(\"Status code is 200\", function () {", 1422 | " pm.response.to.have.status(200);", 1423 | "});" 1424 | ] 1425 | } 1426 | } 1427 | ], 1428 | "request": { 1429 | "method": "GET", 1430 | "header": [], 1431 | "body": { 1432 | "mode": "raw", 1433 | "raw": "" 1434 | }, 1435 | "url": { 1436 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/sat", 1437 | "protocol": "http", 1438 | "host": [ 1439 | "{{ipAddress}}" 1440 | ], 1441 | "path": [ 1442 | "api", 1443 | "v1", 1444 | ":auth_token", 1445 | "state", 1446 | "sat" 1447 | ], 1448 | "variable": [ 1449 | { 1450 | "key": "auth_token", 1451 | "value": "{{authToken}}" 1452 | } 1453 | ] 1454 | } 1455 | }, 1456 | "response": [ 1457 | { 1458 | "id": "80154a65-adc4-4e52-968a-a20f026de50c", 1459 | "name": "Saturation", 1460 | "originalRequest": { 1461 | "method": "GET", 1462 | "header": [], 1463 | "body": { 1464 | "mode": "raw", 1465 | "raw": "" 1466 | }, 1467 | "url": { 1468 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/sat", 1469 | "protocol": "http", 1470 | "host": [ 1471 | "{{ipAddress}}" 1472 | ], 1473 | "path": [ 1474 | "api", 1475 | "v1", 1476 | ":auth_token", 1477 | "state", 1478 | "sat" 1479 | ], 1480 | "variable": [ 1481 | { 1482 | "key": "auth_token", 1483 | "value": "{{authToken}}" 1484 | } 1485 | ] 1486 | } 1487 | }, 1488 | "status": "OK", 1489 | "code": 200, 1490 | "_postman_previewlanguage": "json", 1491 | "header": [ 1492 | { 1493 | "key": "Content-Length", 1494 | "value": "29", 1495 | "name": "Content-Length", 1496 | "description": "The length of the response body in octets (8-bit bytes)" 1497 | }, 1498 | { 1499 | "key": "Content-Type", 1500 | "value": "application/json", 1501 | "name": "Content-Type", 1502 | "description": "The mime type of this content" 1503 | } 1504 | ], 1505 | "cookie": [], 1506 | "responseTime": null, 1507 | "body": "{\"value\":0,\"max\":100,\"min\":0}" 1508 | } 1509 | ] 1510 | }, 1511 | { 1512 | "_postman_id": "857718c3-9d3d-4ae0-9649-ba5daef3afd7", 1513 | "name": "Saturation - update", 1514 | "event": [ 1515 | { 1516 | "listen": "test", 1517 | "script": { 1518 | "id": "8ea88783-2578-40d1-adfb-bde4fd55f63a", 1519 | "type": "text/javascript", 1520 | "exec": [ 1521 | "pm.test(\"Status code is 204\", function () {", 1522 | " pm.response.to.have.status(204);", 1523 | "});" 1524 | ] 1525 | } 1526 | } 1527 | ], 1528 | "request": { 1529 | "method": "PUT", 1530 | "header": [], 1531 | "body": { 1532 | "mode": "raw", 1533 | "raw": "{\"sat\" : {\"value\": 20}}" 1534 | }, 1535 | "url": { 1536 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/sat", 1537 | "protocol": "http", 1538 | "host": [ 1539 | "{{ipAddress}}" 1540 | ], 1541 | "path": [ 1542 | "api", 1543 | "v1", 1544 | ":auth_token", 1545 | "state", 1546 | "sat" 1547 | ], 1548 | "variable": [ 1549 | { 1550 | "key": "auth_token", 1551 | "value": "{{authToken}}" 1552 | } 1553 | ] 1554 | } 1555 | }, 1556 | "response": [ 1557 | { 1558 | "id": "f523a90e-cdfa-483d-b4de-5019e914fb79", 1559 | "name": "Saturation - update", 1560 | "originalRequest": { 1561 | "method": "PUT", 1562 | "header": [], 1563 | "body": { 1564 | "mode": "raw", 1565 | "raw": "{\"sat\" : {\"value\": 20}}" 1566 | }, 1567 | "url": { 1568 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/sat", 1569 | "protocol": "http", 1570 | "host": [ 1571 | "{{ipAddress}}" 1572 | ], 1573 | "path": [ 1574 | "api", 1575 | "v1", 1576 | ":auth_token", 1577 | "state", 1578 | "sat" 1579 | ], 1580 | "variable": [ 1581 | { 1582 | "key": "auth_token", 1583 | "value": "{{authToken}}" 1584 | } 1585 | ] 1586 | } 1587 | }, 1588 | "status": "No Content", 1589 | "code": 204, 1590 | "_postman_previewlanguage": "plain", 1591 | "header": [ 1592 | { 1593 | "key": "Content-Length", 1594 | "value": "0", 1595 | "name": "Content-Length", 1596 | "description": "The length of the response body in octets (8-bit bytes)" 1597 | } 1598 | ], 1599 | "cookie": [], 1600 | "responseTime": null, 1601 | "body": "" 1602 | } 1603 | ] 1604 | }, 1605 | { 1606 | "_postman_id": "5efd8097-4780-4a83-b621-6f35a1ec7626", 1607 | "name": "Color Temperature", 1608 | "event": [ 1609 | { 1610 | "listen": "test", 1611 | "script": { 1612 | "id": "1bfc6387-378c-4fb5-9f30-160e2af381c3", 1613 | "type": "text/javascript", 1614 | "exec": [ 1615 | "pm.test(\"Status code is 200\", function () {", 1616 | " pm.response.to.have.status(200);", 1617 | "});" 1618 | ] 1619 | } 1620 | } 1621 | ], 1622 | "request": { 1623 | "method": "GET", 1624 | "header": [], 1625 | "body": { 1626 | "mode": "raw", 1627 | "raw": "" 1628 | }, 1629 | "url": { 1630 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/ct", 1631 | "protocol": "http", 1632 | "host": [ 1633 | "{{ipAddress}}" 1634 | ], 1635 | "path": [ 1636 | "api", 1637 | "v1", 1638 | ":auth_token", 1639 | "state", 1640 | "ct" 1641 | ], 1642 | "variable": [ 1643 | { 1644 | "key": "auth_token", 1645 | "value": "{{authToken}}" 1646 | } 1647 | ] 1648 | }, 1649 | "description": "1.5.0:\n\n- Min and max values returned for ct are wrong. They should be 1200-6500, but are returned 0-100." 1650 | }, 1651 | "response": [ 1652 | { 1653 | "id": "03016c49-46f7-496d-b4c9-7030179320f0", 1654 | "name": "Color Temperature", 1655 | "originalRequest": { 1656 | "method": "GET", 1657 | "header": [], 1658 | "body": { 1659 | "mode": "raw", 1660 | "raw": "" 1661 | }, 1662 | "url": { 1663 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/ct", 1664 | "protocol": "http", 1665 | "host": [ 1666 | "{{ipAddress}}" 1667 | ], 1668 | "path": [ 1669 | "api", 1670 | "v1", 1671 | ":auth_token", 1672 | "state", 1673 | "ct" 1674 | ], 1675 | "variable": [ 1676 | { 1677 | "key": "auth_token", 1678 | "value": "{{authToken}}" 1679 | } 1680 | ] 1681 | } 1682 | }, 1683 | "status": "OK", 1684 | "code": 200, 1685 | "_postman_previewlanguage": "json", 1686 | "header": [ 1687 | { 1688 | "key": "Content-Length", 1689 | "value": "36", 1690 | "name": "Content-Length", 1691 | "description": "The length of the response body in octets (8-bit bytes)" 1692 | }, 1693 | { 1694 | "key": "Content-Type", 1695 | "value": "application/json", 1696 | "name": "Content-Type", 1697 | "description": "The mime type of this content" 1698 | } 1699 | ], 1700 | "cookie": [], 1701 | "responseTime": null, 1702 | "body": "{\"value\":4000,\"max\":6500,\"min\":1200}" 1703 | } 1704 | ] 1705 | }, 1706 | { 1707 | "_postman_id": "1c2f7264-ad94-4846-a59c-8f97c7499538", 1708 | "name": "Color Temperature - update", 1709 | "event": [ 1710 | { 1711 | "listen": "test", 1712 | "script": { 1713 | "id": "ccdd172d-1a36-4155-a2b7-b92f0f96db4b", 1714 | "type": "text/javascript", 1715 | "exec": [ 1716 | "pm.test(\"Status code is 204\", function () {", 1717 | " pm.response.to.have.status(204);", 1718 | "});" 1719 | ] 1720 | } 1721 | } 1722 | ], 1723 | "request": { 1724 | "method": "PUT", 1725 | "header": [], 1726 | "body": { 1727 | "mode": "raw", 1728 | "raw": "{\"ct\" : {\"value\": 3000}}" 1729 | }, 1730 | "url": { 1731 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state", 1732 | "protocol": "http", 1733 | "host": [ 1734 | "{{ipAddress}}" 1735 | ], 1736 | "path": [ 1737 | "api", 1738 | "v1", 1739 | ":auth_token", 1740 | "state" 1741 | ], 1742 | "variable": [ 1743 | { 1744 | "key": "auth_token", 1745 | "value": "{{authToken}}" 1746 | } 1747 | ] 1748 | }, 1749 | "description": "1.5.0:\n\n- Min and max values returned for ct are wrong. They should be 1200-6500, but are returned 0-100." 1750 | }, 1751 | "response": [ 1752 | { 1753 | "id": "224383a6-9358-4bac-aaf9-d5a307324c47", 1754 | "name": "Color Temperature - update", 1755 | "originalRequest": { 1756 | "method": "PUT", 1757 | "header": [], 1758 | "body": { 1759 | "mode": "raw", 1760 | "raw": "{\"ct\" : {\"value\": 3000}}" 1761 | }, 1762 | "url": { 1763 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state", 1764 | "protocol": "http", 1765 | "host": [ 1766 | "{{ipAddress}}" 1767 | ], 1768 | "path": [ 1769 | "api", 1770 | "v1", 1771 | ":auth_token", 1772 | "state" 1773 | ], 1774 | "variable": [ 1775 | { 1776 | "key": "auth_token", 1777 | "value": "{{authToken}}" 1778 | } 1779 | ] 1780 | } 1781 | }, 1782 | "status": "No Content", 1783 | "code": 204, 1784 | "_postman_previewlanguage": "plain", 1785 | "header": [ 1786 | { 1787 | "key": "Content-Length", 1788 | "value": "0", 1789 | "name": "Content-Length", 1790 | "description": "The length of the response body in octets (8-bit bytes)" 1791 | } 1792 | ], 1793 | "cookie": [], 1794 | "responseTime": null, 1795 | "body": "" 1796 | } 1797 | ] 1798 | }, 1799 | { 1800 | "_postman_id": "6469515a-de91-44f1-8bc6-4ba827ee89e4", 1801 | "name": "Color Mode", 1802 | "event": [ 1803 | { 1804 | "listen": "test", 1805 | "script": { 1806 | "id": "b4b572e6-f6b5-4d31-8736-626954b1d578", 1807 | "type": "text/javascript", 1808 | "exec": [ 1809 | "pm.test(\"Status code is 200\", function () {", 1810 | " pm.response.to.have.status(200);", 1811 | "});" 1812 | ] 1813 | } 1814 | } 1815 | ], 1816 | "request": { 1817 | "method": "GET", 1818 | "header": [], 1819 | "body": { 1820 | "mode": "raw", 1821 | "raw": "" 1822 | }, 1823 | "url": { 1824 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/colorMode", 1825 | "protocol": "http", 1826 | "host": [ 1827 | "{{ipAddress}}" 1828 | ], 1829 | "path": [ 1830 | "api", 1831 | "v1", 1832 | ":auth_token", 1833 | "state", 1834 | "colorMode" 1835 | ], 1836 | "variable": [ 1837 | { 1838 | "key": "auth_token", 1839 | "value": "{{authToken}}" 1840 | } 1841 | ] 1842 | } 1843 | }, 1844 | "response": [ 1845 | { 1846 | "id": "e30d13f5-740d-4ab1-abf8-ddc2e0a595ed", 1847 | "name": "Color Mode", 1848 | "originalRequest": { 1849 | "method": "GET", 1850 | "header": [], 1851 | "body": { 1852 | "mode": "raw", 1853 | "raw": "" 1854 | }, 1855 | "url": { 1856 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/state/colorMode", 1857 | "protocol": "http", 1858 | "host": [ 1859 | "{{ipAddress}}" 1860 | ], 1861 | "path": [ 1862 | "api", 1863 | "v1", 1864 | ":auth_token", 1865 | "state", 1866 | "colorMode" 1867 | ], 1868 | "variable": [ 1869 | { 1870 | "key": "auth_token", 1871 | "value": "{{authToken}}" 1872 | } 1873 | ] 1874 | } 1875 | }, 1876 | "status": "OK", 1877 | "code": 200, 1878 | "_postman_previewlanguage": "json", 1879 | "header": [ 1880 | { 1881 | "key": "Content-Length", 1882 | "value": "4", 1883 | "name": "Content-Length", 1884 | "description": "The length of the response body in octets (8-bit bytes)" 1885 | }, 1886 | { 1887 | "key": "Content-Type", 1888 | "value": "application/json", 1889 | "name": "Content-Type", 1890 | "description": "The mime type of this content" 1891 | } 1892 | ], 1893 | "cookie": [], 1894 | "responseTime": null, 1895 | "body": "\"ct\"" 1896 | } 1897 | ] 1898 | } 1899 | ] 1900 | }, 1901 | { 1902 | "_postman_id": "e193e990-1c00-4d1c-b6bf-e23b069633aa", 1903 | "name": "Effects", 1904 | "description": null, 1905 | "item": [ 1906 | { 1907 | "_postman_id": "45cf2e37-45bd-48a3-90f1-4b58c680c38e", 1908 | "name": "Select", 1909 | "event": [ 1910 | { 1911 | "listen": "test", 1912 | "script": { 1913 | "id": "a11467eb-fee7-49b1-8a65-8f63d4a06cbf", 1914 | "type": "text/javascript", 1915 | "exec": [ 1916 | "pm.test(\"Status code is 200\", function () {", 1917 | " pm.response.to.have.status(200);", 1918 | "});" 1919 | ] 1920 | } 1921 | } 1922 | ], 1923 | "request": { 1924 | "method": "GET", 1925 | "header": [], 1926 | "body": { 1927 | "mode": "raw", 1928 | "raw": "" 1929 | }, 1930 | "url": { 1931 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects/select", 1932 | "protocol": "http", 1933 | "host": [ 1934 | "{{ipAddress}}" 1935 | ], 1936 | "path": [ 1937 | "api", 1938 | "v1", 1939 | ":auth_token", 1940 | "effects", 1941 | "select" 1942 | ], 1943 | "variable": [ 1944 | { 1945 | "key": "auth_token", 1946 | "value": "{{authToken}}" 1947 | } 1948 | ] 1949 | } 1950 | }, 1951 | "response": [ 1952 | { 1953 | "id": "cbef51b9-a22a-4b8b-a9ae-345bfac22228", 1954 | "name": "Select", 1955 | "originalRequest": { 1956 | "method": "GET", 1957 | "header": [], 1958 | "body": { 1959 | "mode": "raw", 1960 | "raw": "" 1961 | }, 1962 | "url": { 1963 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects/select", 1964 | "protocol": "http", 1965 | "host": [ 1966 | "{{ipAddress}}" 1967 | ], 1968 | "path": [ 1969 | "api", 1970 | "v1", 1971 | ":auth_token", 1972 | "effects", 1973 | "select" 1974 | ], 1975 | "variable": [ 1976 | { 1977 | "key": "auth_token", 1978 | "value": "{{authToken}}" 1979 | } 1980 | ] 1981 | } 1982 | }, 1983 | "status": "OK", 1984 | "code": 200, 1985 | "_postman_previewlanguage": "json", 1986 | "header": [ 1987 | { 1988 | "key": "Content-Length", 1989 | "value": "11", 1990 | "name": "Content-Length", 1991 | "description": "The length of the response body in octets (8-bit bytes)" 1992 | }, 1993 | { 1994 | "key": "Content-Type", 1995 | "value": "application/json", 1996 | "name": "Content-Type", 1997 | "description": "The mime type of this content" 1998 | } 1999 | ], 2000 | "cookie": [], 2001 | "responseTime": null, 2002 | "body": "\"Fireworks\"" 2003 | } 2004 | ] 2005 | }, 2006 | { 2007 | "_postman_id": "94ab52c6-8ab7-4aae-a649-d1de08bd4550", 2008 | "name": "Select - update", 2009 | "event": [ 2010 | { 2011 | "listen": "test", 2012 | "script": { 2013 | "id": "2fa2339b-9d55-4647-bc1e-1b06d639ed09", 2014 | "type": "text/javascript", 2015 | "exec": [ 2016 | "pm.test(\"Status code is 204\", function () {", 2017 | " pm.response.to.have.status(204);", 2018 | "});" 2019 | ] 2020 | } 2021 | } 2022 | ], 2023 | "request": { 2024 | "method": "PUT", 2025 | "header": [], 2026 | "body": { 2027 | "mode": "raw", 2028 | "raw": "{\"select\" : \"Snowfall\"}" 2029 | }, 2030 | "url": { 2031 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects", 2032 | "protocol": "http", 2033 | "host": [ 2034 | "{{ipAddress}}" 2035 | ], 2036 | "path": [ 2037 | "api", 2038 | "v1", 2039 | ":auth_token", 2040 | "effects" 2041 | ], 2042 | "variable": [ 2043 | { 2044 | "key": "auth_token", 2045 | "value": "{{authToken}}" 2046 | } 2047 | ] 2048 | } 2049 | }, 2050 | "response": [ 2051 | { 2052 | "id": "4f665573-e185-4eec-b198-26aad770eb72", 2053 | "name": "Select - update", 2054 | "originalRequest": { 2055 | "method": "PUT", 2056 | "header": [], 2057 | "body": { 2058 | "mode": "raw", 2059 | "raw": "{\"select\" : \"Snowfall\"}" 2060 | }, 2061 | "url": { 2062 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects", 2063 | "protocol": "http", 2064 | "host": [ 2065 | "{{ipAddress}}" 2066 | ], 2067 | "path": [ 2068 | "api", 2069 | "v1", 2070 | ":auth_token", 2071 | "effects" 2072 | ], 2073 | "variable": [ 2074 | { 2075 | "key": "auth_token", 2076 | "value": "{{authToken}}" 2077 | } 2078 | ] 2079 | } 2080 | }, 2081 | "status": "No Content", 2082 | "code": 204, 2083 | "_postman_previewlanguage": "plain", 2084 | "header": [ 2085 | { 2086 | "key": "Content-Length", 2087 | "value": "0", 2088 | "name": "Content-Length", 2089 | "description": "The length of the response body in octets (8-bit bytes)" 2090 | } 2091 | ], 2092 | "cookie": [], 2093 | "responseTime": null, 2094 | "body": "" 2095 | } 2096 | ] 2097 | }, 2098 | { 2099 | "_postman_id": "07633137-3dd9-41d6-949f-e77b0a9e80eb", 2100 | "name": "List", 2101 | "event": [ 2102 | { 2103 | "listen": "test", 2104 | "script": { 2105 | "id": "3e311d34-298d-4e7a-bb09-3661f8e09b89", 2106 | "type": "text/javascript", 2107 | "exec": [ 2108 | "pm.test(\"Status code is 200\", function () {", 2109 | " pm.response.to.have.status(200);", 2110 | "});" 2111 | ] 2112 | } 2113 | } 2114 | ], 2115 | "request": { 2116 | "method": "GET", 2117 | "header": [], 2118 | "body": { 2119 | "mode": "raw", 2120 | "raw": "" 2121 | }, 2122 | "url": { 2123 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects/effectsList", 2124 | "protocol": "http", 2125 | "host": [ 2126 | "{{ipAddress}}" 2127 | ], 2128 | "path": [ 2129 | "api", 2130 | "v1", 2131 | ":auth_token", 2132 | "effects", 2133 | "effectsList" 2134 | ], 2135 | "variable": [ 2136 | { 2137 | "key": "auth_token", 2138 | "value": "{{authToken}}" 2139 | } 2140 | ] 2141 | } 2142 | }, 2143 | "response": [ 2144 | { 2145 | "id": "edef2b84-793d-4184-8f05-f515b6296edf", 2146 | "name": "List", 2147 | "originalRequest": { 2148 | "method": "GET", 2149 | "header": [], 2150 | "body": { 2151 | "mode": "raw", 2152 | "raw": "" 2153 | }, 2154 | "url": { 2155 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects/effectsList", 2156 | "protocol": "http", 2157 | "host": [ 2158 | "{{ipAddress}}" 2159 | ], 2160 | "path": [ 2161 | "api", 2162 | "v1", 2163 | ":auth_token", 2164 | "effects", 2165 | "effectsList" 2166 | ], 2167 | "variable": [ 2168 | { 2169 | "key": "auth_token", 2170 | "value": "{{authToken}}" 2171 | } 2172 | ] 2173 | } 2174 | }, 2175 | "status": "OK", 2176 | "code": 200, 2177 | "_postman_previewlanguage": "json", 2178 | "header": [ 2179 | { 2180 | "key": "Content-Length", 2181 | "value": "223", 2182 | "name": "Content-Length", 2183 | "description": "The length of the response body in octets (8-bit bytes)" 2184 | }, 2185 | { 2186 | "key": "Content-Type", 2187 | "value": "application/json", 2188 | "name": "Content-Type", 2189 | "description": "The mime type of this content" 2190 | } 2191 | ], 2192 | "cookie": [], 2193 | "responseTime": null, 2194 | "body": "[\"Color Burst\",\"Fireworks\",\"Flames\",\"Forest\",\"Inner Peace\",\"Meteor Shower\",\"Nemo\",\"Northern Lights\",\"Paint Splatter\",\"Pulse Pop Beats\",\"Rhythmic Northern Lights\",\"Ripple\",\"Romantic\",\"Snowfall\",\"Sound Bar\",\"Streaking Notes\"]" 2195 | } 2196 | ] 2197 | }, 2198 | { 2199 | "_postman_id": "bff185d5-ad6f-4bef-84b6-70cadfa92e20", 2200 | "name": "Write", 2201 | "event": [ 2202 | { 2203 | "listen": "test", 2204 | "script": { 2205 | "id": "eaa6069f-7c7b-4482-ad06-70aab0a1242d", 2206 | "type": "text/javascript", 2207 | "exec": [ 2208 | "pm.test(\"Successful PUT request\", function () {", 2209 | " pm.expect(pm.response.code).to.be.oneOf([200,204]);", 2210 | "});" 2211 | ] 2212 | } 2213 | } 2214 | ], 2215 | "request": { 2216 | "method": "PUT", 2217 | "header": [], 2218 | "body": { 2219 | "mode": "raw", 2220 | "raw": "{\"write\" : {\"command\" : \"request\", \"animName\" : \"Northern Lights\"}}" 2221 | }, 2222 | "url": { 2223 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects", 2224 | "protocol": "http", 2225 | "host": [ 2226 | "{{ipAddress}}" 2227 | ], 2228 | "path": [ 2229 | "api", 2230 | "v1", 2231 | ":auth_token", 2232 | "effects" 2233 | ], 2234 | "variable": [ 2235 | { 2236 | "key": "auth_token", 2237 | "value": "{{authToken}}" 2238 | } 2239 | ] 2240 | } 2241 | }, 2242 | "response": [ 2243 | { 2244 | "id": "556b3726-32bb-4986-84ef-0046b5d44037", 2245 | "name": "Write", 2246 | "originalRequest": { 2247 | "method": "PUT", 2248 | "header": [], 2249 | "body": { 2250 | "mode": "raw", 2251 | "raw": "{\"write\" : {\"command\" : \"request\", \"animName\" : \"Northern Lights\"}}" 2252 | }, 2253 | "url": { 2254 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/effects", 2255 | "protocol": "http", 2256 | "host": [ 2257 | "{{ipAddress}}" 2258 | ], 2259 | "path": [ 2260 | "api", 2261 | "v1", 2262 | ":auth_token", 2263 | "effects" 2264 | ], 2265 | "variable": [ 2266 | { 2267 | "key": "auth_token", 2268 | "value": "{{authToken}}" 2269 | } 2270 | ] 2271 | } 2272 | }, 2273 | "status": "OK", 2274 | "code": 200, 2275 | "_postman_previewlanguage": "json", 2276 | "header": [ 2277 | { 2278 | "key": "Content-Length", 2279 | "value": "619", 2280 | "name": "Content-Length", 2281 | "description": "The length of the response body in octets (8-bit bytes)" 2282 | }, 2283 | { 2284 | "key": "Content-Type", 2285 | "value": "application/json", 2286 | "name": "Content-Type", 2287 | "description": "The mime type of this content" 2288 | } 2289 | ], 2290 | "cookie": [], 2291 | "responseTime": null, 2292 | "body": "{\"animName\":\"Northern Lights\",\"loop\":true,\"palette\":[{\"hue\":227,\"saturation\":100,\"brightness\":99},{\"hue\":182,\"saturation\":100,\"brightness\":100},{\"hue\":125,\"saturation\":100,\"brightness\":93},{\"hue\":62,\"saturation\":100,\"brightness\":100},{\"hue\":31,\"saturation\":100,\"brightness\":100},{\"hue\":2,\"saturation\":100,\"brightness\":100},{\"hue\":307,\"saturation\":100,\"brightness\":100}],\"version\":\"1.0\",\"transTime\":{\"maxValue\":20,\"minValue\":20},\"windowSize\":2,\"flowFactor\":0,\"delayTime\":{\"maxValue\":20,\"minValue\":5},\"colorType\":\"HSB\",\"animType\":\"wheel\",\"explodeFactor\":0,\"brightnessRange\":{\"maxValue\":0,\"minValue\":0},\"direction\":\"left\"}" 2293 | } 2294 | ] 2295 | } 2296 | ] 2297 | }, 2298 | { 2299 | "_postman_id": "f0062d31-dc34-4f67-a996-dcd25e26d8b1", 2300 | "name": "Panel Layout", 2301 | "description": null, 2302 | "item": [ 2303 | { 2304 | "_postman_id": "701416c8-2660-453c-bcd2-e2b72290171a", 2305 | "name": "Global orientation", 2306 | "event": [ 2307 | { 2308 | "listen": "test", 2309 | "script": { 2310 | "id": "f03235c1-fa28-4f0c-bc19-a6cea421c89d", 2311 | "type": "text/javascript", 2312 | "exec": [ 2313 | "pm.test(\"Status code is 200\", function () {", 2314 | " pm.response.to.have.status(200);", 2315 | "});" 2316 | ] 2317 | } 2318 | } 2319 | ], 2320 | "request": { 2321 | "method": "GET", 2322 | "header": [], 2323 | "body": { 2324 | "mode": "raw", 2325 | "raw": "" 2326 | }, 2327 | "url": { 2328 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/panelLayout/globalOrientation", 2329 | "protocol": "http", 2330 | "host": [ 2331 | "{{ipAddress}}" 2332 | ], 2333 | "path": [ 2334 | "api", 2335 | "v1", 2336 | ":auth_token", 2337 | "panelLayout", 2338 | "globalOrientation" 2339 | ], 2340 | "variable": [ 2341 | { 2342 | "key": "auth_token", 2343 | "value": "{{authToken}}" 2344 | } 2345 | ] 2346 | } 2347 | }, 2348 | "response": [ 2349 | { 2350 | "id": "6c7e8723-4a94-43d0-b2fa-2f94be619d16", 2351 | "name": "Global orientation", 2352 | "originalRequest": { 2353 | "method": "GET", 2354 | "header": [], 2355 | "body": { 2356 | "mode": "raw", 2357 | "raw": "" 2358 | }, 2359 | "url": { 2360 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/panelLayout/globalOrientation", 2361 | "protocol": "http", 2362 | "host": [ 2363 | "{{ipAddress}}" 2364 | ], 2365 | "path": [ 2366 | "api", 2367 | "v1", 2368 | ":auth_token", 2369 | "panelLayout", 2370 | "globalOrientation" 2371 | ], 2372 | "variable": [ 2373 | { 2374 | "key": "auth_token", 2375 | "value": "{{authToken}}" 2376 | } 2377 | ] 2378 | } 2379 | }, 2380 | "status": "OK", 2381 | "code": 200, 2382 | "_postman_previewlanguage": "json", 2383 | "header": [ 2384 | { 2385 | "key": "Content-Length", 2386 | "value": "29", 2387 | "name": "Content-Length", 2388 | "description": "The length of the response body in octets (8-bit bytes)" 2389 | }, 2390 | { 2391 | "key": "Content-Type", 2392 | "value": "application/json", 2393 | "name": "Content-Type", 2394 | "description": "The mime type of this content" 2395 | } 2396 | ], 2397 | "cookie": [], 2398 | "responseTime": null, 2399 | "body": "{\"value\":0,\"max\":360,\"min\":0}" 2400 | } 2401 | ] 2402 | }, 2403 | { 2404 | "_postman_id": "064d0e64-26fd-4cd5-99d6-d7ab68a3c66e", 2405 | "name": "Global orientation - update", 2406 | "event": [ 2407 | { 2408 | "listen": "test", 2409 | "script": { 2410 | "id": "1159211b-71a2-430b-a335-b0e9ecf32a07", 2411 | "type": "text/javascript", 2412 | "exec": [ 2413 | "pm.test(\"Status code is 204\", function () {", 2414 | " pm.response.to.have.status(204);", 2415 | "});" 2416 | ] 2417 | } 2418 | } 2419 | ], 2420 | "request": { 2421 | "method": "PUT", 2422 | "header": [], 2423 | "body": { 2424 | "mode": "raw", 2425 | "raw": "{\"globalOrientation\" : {\"value\": 120}}" 2426 | }, 2427 | "url": { 2428 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/panelLayout/globalOrientation", 2429 | "protocol": "http", 2430 | "host": [ 2431 | "{{ipAddress}}" 2432 | ], 2433 | "path": [ 2434 | "api", 2435 | "v1", 2436 | ":auth_token", 2437 | "panelLayout", 2438 | "globalOrientation" 2439 | ], 2440 | "variable": [ 2441 | { 2442 | "key": "auth_token", 2443 | "value": "{{authToken}}" 2444 | } 2445 | ] 2446 | } 2447 | }, 2448 | "response": [ 2449 | { 2450 | "id": "adba916d-c2a0-44be-9eb4-80cd9e4c28b4", 2451 | "name": "Global orientation - update", 2452 | "originalRequest": { 2453 | "method": "PUT", 2454 | "header": [], 2455 | "body": { 2456 | "mode": "raw", 2457 | "raw": "{\"globalOrientation\" : {\"value\": 120}}" 2458 | }, 2459 | "url": { 2460 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/panelLayout/globalOrientation", 2461 | "protocol": "http", 2462 | "host": [ 2463 | "{{ipAddress}}" 2464 | ], 2465 | "path": [ 2466 | "api", 2467 | "v1", 2468 | ":auth_token", 2469 | "panelLayout", 2470 | "globalOrientation" 2471 | ], 2472 | "variable": [ 2473 | { 2474 | "key": "auth_token", 2475 | "value": "{{authToken}}" 2476 | } 2477 | ] 2478 | } 2479 | }, 2480 | "status": "No Content", 2481 | "code": 204, 2482 | "_postman_previewlanguage": "plain", 2483 | "header": [ 2484 | { 2485 | "key": "Content-Length", 2486 | "value": "0", 2487 | "name": "Content-Length", 2488 | "description": "The length of the response body in octets (8-bit bytes)" 2489 | } 2490 | ], 2491 | "cookie": [], 2492 | "responseTime": null, 2493 | "body": "" 2494 | } 2495 | ] 2496 | }, 2497 | { 2498 | "_postman_id": "3eef67f5-8793-415e-ab09-53e75a2586c4", 2499 | "name": "Layout", 2500 | "event": [ 2501 | { 2502 | "listen": "test", 2503 | "script": { 2504 | "id": "357a6c4c-a937-49f4-918f-048e5a3cbf26", 2505 | "type": "text/javascript", 2506 | "exec": [ 2507 | "pm.test(\"Status code is 200\", function () {", 2508 | " pm.response.to.have.status(200);", 2509 | "});" 2510 | ] 2511 | } 2512 | } 2513 | ], 2514 | "request": { 2515 | "method": "GET", 2516 | "header": [], 2517 | "body": { 2518 | "mode": "raw", 2519 | "raw": "" 2520 | }, 2521 | "url": { 2522 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/panelLayout/layout", 2523 | "protocol": "http", 2524 | "host": [ 2525 | "{{ipAddress}}" 2526 | ], 2527 | "path": [ 2528 | "api", 2529 | "v1", 2530 | ":auth_token", 2531 | "panelLayout", 2532 | "layout" 2533 | ], 2534 | "variable": [ 2535 | { 2536 | "key": "auth_token", 2537 | "value": "{{authToken}}" 2538 | } 2539 | ] 2540 | }, 2541 | "description": "To retrieve the panel layout, send an HTTP GET request like this (inserting your authorization token):\n\n `http:192.188.x.x/api/v1//panelLayout/layout`" 2542 | }, 2543 | "response": [ 2544 | { 2545 | "id": "263e0f7e-de8d-4d1d-9494-d4d9daaba85d", 2546 | "name": "Layout", 2547 | "originalRequest": { 2548 | "method": "GET", 2549 | "header": [], 2550 | "body": { 2551 | "mode": "raw", 2552 | "raw": "" 2553 | }, 2554 | "url": { 2555 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/panelLayout/layout", 2556 | "protocol": "http", 2557 | "host": [ 2558 | "{{ipAddress}}" 2559 | ], 2560 | "path": [ 2561 | "api", 2562 | "v1", 2563 | ":auth_token", 2564 | "panelLayout", 2565 | "layout" 2566 | ], 2567 | "variable": [ 2568 | { 2569 | "key": "auth_token", 2570 | "value": "{{authToken}}" 2571 | } 2572 | ] 2573 | } 2574 | }, 2575 | "status": "OK", 2576 | "code": 200, 2577 | "_postman_previewlanguage": "json", 2578 | "header": [ 2579 | { 2580 | "key": "Content-Length", 2581 | "value": "125", 2582 | "name": "Content-Length", 2583 | "description": "The length of the response body in octets (8-bit bytes)" 2584 | }, 2585 | { 2586 | "key": "Content-Type", 2587 | "value": "application/json", 2588 | "name": "Content-Type", 2589 | "description": "The mime type of this content" 2590 | } 2591 | ], 2592 | "cookie": [], 2593 | "responseTime": null, 2594 | "body": "{\"numPanels\":3,\"sideLength\":150,\"positionData\":[{\"panelId\":186,\"x\":-74,\"y\":43,\"o\":180},{\"panelId\":55,\"x\":-74,\"y\":129,\"o\":0}]}" 2595 | } 2596 | ] 2597 | } 2598 | ] 2599 | }, 2600 | { 2601 | "_postman_id": "a0b033b9-f986-406f-8a50-75b5e014fe60", 2602 | "name": "Identify", 2603 | "description": null, 2604 | "item": [ 2605 | { 2606 | "_postman_id": "1799362a-5301-4a70-98f5-e48bdf580fcd", 2607 | "name": "Identify", 2608 | "event": [ 2609 | { 2610 | "listen": "test", 2611 | "script": { 2612 | "id": "48aaa5dc-8acd-40ba-9a11-1c590716f07d", 2613 | "type": "text/javascript", 2614 | "exec": [ 2615 | "pm.test(\"Status code is 200\", function () {", 2616 | " pm.response.to.have.status(200);", 2617 | "});" 2618 | ] 2619 | } 2620 | } 2621 | ], 2622 | "request": { 2623 | "method": "PUT", 2624 | "header": [], 2625 | "body": { 2626 | "mode": "raw", 2627 | "raw": "" 2628 | }, 2629 | "url": { 2630 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/identify", 2631 | "protocol": "http", 2632 | "host": [ 2633 | "{{ipAddress}}" 2634 | ], 2635 | "path": [ 2636 | "api", 2637 | "v1", 2638 | ":auth_token", 2639 | "identify" 2640 | ], 2641 | "variable": [ 2642 | { 2643 | "key": "auth_token", 2644 | "value": "{{authToken}}" 2645 | } 2646 | ] 2647 | }, 2648 | "description": "Causes the panels to flash in unison. This is typically used to help users differentiate between multiple panels." 2649 | }, 2650 | "response": [ 2651 | { 2652 | "id": "9fd3dc0b-dd83-4d99-a1ba-69d456c11ebc", 2653 | "name": "Identify", 2654 | "originalRequest": { 2655 | "method": "PUT", 2656 | "header": [], 2657 | "body": { 2658 | "mode": "raw", 2659 | "raw": "" 2660 | }, 2661 | "url": { 2662 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/identify", 2663 | "protocol": "http", 2664 | "host": [ 2665 | "{{ipAddress}}" 2666 | ], 2667 | "path": [ 2668 | "api", 2669 | "v1", 2670 | ":auth_token", 2671 | "identify" 2672 | ], 2673 | "variable": [ 2674 | { 2675 | "key": "auth_token", 2676 | "value": "{{authToken}}" 2677 | } 2678 | ] 2679 | } 2680 | }, 2681 | "status": "OK", 2682 | "code": 200, 2683 | "_postman_previewlanguage": "plain", 2684 | "header": [ 2685 | { 2686 | "key": "Content-Length", 2687 | "value": "0", 2688 | "name": "Content-Length", 2689 | "description": "The length of the response body in octets (8-bit bytes)" 2690 | } 2691 | ], 2692 | "cookie": [], 2693 | "responseTime": null, 2694 | "body": "" 2695 | } 2696 | ] 2697 | } 2698 | ] 2699 | }, 2700 | { 2701 | "_postman_id": "cc3fe936-fea1-433d-b4d7-7164eb41a3c9", 2702 | "name": "Rhythm", 2703 | "description": "The /rhythm Endpoint allows you to get information about the Rhythm and switch the Rhythm mode from microphone to aux input.", 2704 | "item": [ 2705 | { 2706 | "_postman_id": "5819dacb-a88d-4e91-9225-249f780169d4", 2707 | "name": "Rhythm connected", 2708 | "event": [ 2709 | { 2710 | "listen": "test", 2711 | "script": { 2712 | "id": "6ea6d154-92bc-49be-adee-0f08348b5cd6", 2713 | "type": "text/javascript", 2714 | "exec": [ 2715 | "pm.test(\"Status code is 200\", function () {", 2716 | " pm.response.to.have.status(200);", 2717 | "});" 2718 | ] 2719 | } 2720 | } 2721 | ], 2722 | "request": { 2723 | "method": "GET", 2724 | "header": [], 2725 | "body": { 2726 | "mode": "raw", 2727 | "raw": "" 2728 | }, 2729 | "url": { 2730 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmConnected", 2731 | "protocol": "http", 2732 | "host": [ 2733 | "{{ipAddress}}" 2734 | ], 2735 | "path": [ 2736 | "api", 2737 | "v1", 2738 | ":auth_token", 2739 | "rhythm", 2740 | "rhythmConnected" 2741 | ], 2742 | "variable": [ 2743 | { 2744 | "key": "auth_token", 2745 | "value": "{{authToken}}" 2746 | } 2747 | ] 2748 | }, 2749 | "description": "Indicates if the Rhythm is connected to the Light Panels or not." 2750 | }, 2751 | "response": [ 2752 | { 2753 | "id": "39f7f894-93b3-498b-a10a-f8decad12bf2", 2754 | "name": "Rhythm connected - connected", 2755 | "originalRequest": { 2756 | "method": "GET", 2757 | "header": [], 2758 | "body": { 2759 | "mode": "raw", 2760 | "raw": "" 2761 | }, 2762 | "url": { 2763 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmConnected", 2764 | "protocol": "http", 2765 | "host": [ 2766 | "{{ipAddress}}" 2767 | ], 2768 | "path": [ 2769 | "api", 2770 | "v1", 2771 | ":auth_token", 2772 | "rhythm", 2773 | "rhythmConnected" 2774 | ], 2775 | "variable": [ 2776 | { 2777 | "key": "auth_token", 2778 | "value": "{{authToken}}" 2779 | } 2780 | ] 2781 | } 2782 | }, 2783 | "status": "OK", 2784 | "code": 200, 2785 | "_postman_previewlanguage": "json", 2786 | "header": [ 2787 | { 2788 | "key": "Content-Length", 2789 | "value": "4", 2790 | "name": "Content-Length", 2791 | "description": "The length of the response body in octets (8-bit bytes)" 2792 | }, 2793 | { 2794 | "key": "Content-Type", 2795 | "value": "application/json", 2796 | "name": "Content-Type", 2797 | "description": "The mime type of this content" 2798 | } 2799 | ], 2800 | "cookie": [], 2801 | "responseTime": null, 2802 | "body": "true" 2803 | }, 2804 | { 2805 | "id": "974aea75-b077-41bc-b450-324bd91f35ce", 2806 | "name": "Rhythm connected - not connected", 2807 | "originalRequest": { 2808 | "method": "GET", 2809 | "header": [], 2810 | "body": { 2811 | "mode": "raw", 2812 | "raw": "" 2813 | }, 2814 | "url": { 2815 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmConnected", 2816 | "protocol": "http", 2817 | "host": [ 2818 | "{{ipAddress}}" 2819 | ], 2820 | "path": [ 2821 | "api", 2822 | "v1", 2823 | ":auth_token", 2824 | "rhythm", 2825 | "rhythmConnected" 2826 | ], 2827 | "variable": [ 2828 | { 2829 | "key": "auth_token", 2830 | "value": "{{authToken}}" 2831 | } 2832 | ] 2833 | } 2834 | }, 2835 | "status": "OK", 2836 | "code": 200, 2837 | "_postman_previewlanguage": "json", 2838 | "header": [ 2839 | { 2840 | "key": "Content-Length", 2841 | "value": "5", 2842 | "name": "Content-Length", 2843 | "description": "The length of the response body in octets (8-bit bytes)" 2844 | }, 2845 | { 2846 | "key": "Content-Type", 2847 | "value": "application/json", 2848 | "name": "Content-Type", 2849 | "description": "The mime type of this content" 2850 | } 2851 | ], 2852 | "cookie": [], 2853 | "responseTime": null, 2854 | "body": "false" 2855 | } 2856 | ] 2857 | }, 2858 | { 2859 | "_postman_id": "2bd47af4-0803-4d90-b54e-5a642256539b", 2860 | "name": "Rhythm active", 2861 | "event": [ 2862 | { 2863 | "listen": "test", 2864 | "script": { 2865 | "id": "de91826b-60b5-4b48-8fb6-ba385e88f8b2", 2866 | "type": "text/javascript", 2867 | "exec": [ 2868 | "pm.test(\"Status code is 200\", function () {", 2869 | " pm.response.to.have.status(200);", 2870 | "});" 2871 | ] 2872 | } 2873 | } 2874 | ], 2875 | "request": { 2876 | "method": "GET", 2877 | "header": [], 2878 | "body": { 2879 | "mode": "raw", 2880 | "raw": "" 2881 | }, 2882 | "url": { 2883 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmActive", 2884 | "protocol": "http", 2885 | "host": [ 2886 | "{{ipAddress}}" 2887 | ], 2888 | "path": [ 2889 | "api", 2890 | "v1", 2891 | ":auth_token", 2892 | "rhythm", 2893 | "rhythmActive" 2894 | ], 2895 | "variable": [ 2896 | { 2897 | "key": "auth_token", 2898 | "value": "{{authToken}}" 2899 | } 2900 | ] 2901 | }, 2902 | "description": "Indicates if the Rhythm's microphone is currently active or not." 2903 | }, 2904 | "response": [ 2905 | { 2906 | "id": "89f6b7ff-1662-49ef-8ecc-99e5c86973b9", 2907 | "name": "Rhythm active", 2908 | "originalRequest": { 2909 | "method": "GET", 2910 | "header": [], 2911 | "body": { 2912 | "mode": "raw", 2913 | "raw": "" 2914 | }, 2915 | "url": { 2916 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmActive", 2917 | "protocol": "http", 2918 | "host": [ 2919 | "{{ipAddress}}" 2920 | ], 2921 | "path": [ 2922 | "api", 2923 | "v1", 2924 | ":auth_token", 2925 | "rhythm", 2926 | "rhythmActive" 2927 | ], 2928 | "variable": [ 2929 | { 2930 | "key": "auth_token", 2931 | "value": "{{authToken}}" 2932 | } 2933 | ] 2934 | } 2935 | }, 2936 | "status": "OK", 2937 | "code": 200, 2938 | "_postman_previewlanguage": "json", 2939 | "header": [ 2940 | { 2941 | "key": "Content-Length", 2942 | "value": "4", 2943 | "name": "Content-Length", 2944 | "description": "The length of the response body in octets (8-bit bytes)" 2945 | }, 2946 | { 2947 | "key": "Content-Type", 2948 | "value": "application/json", 2949 | "name": "Content-Type", 2950 | "description": "The mime type of this content" 2951 | } 2952 | ], 2953 | "cookie": [], 2954 | "responseTime": null, 2955 | "body": "true" 2956 | } 2957 | ] 2958 | }, 2959 | { 2960 | "_postman_id": "5fab7603-ce3a-41fd-adf7-da789d780ef9", 2961 | "name": "Rhythm id", 2962 | "event": [ 2963 | { 2964 | "listen": "test", 2965 | "script": { 2966 | "id": "7e94fd10-a10f-4f57-88bf-c3695c9a9583", 2967 | "type": "text/javascript", 2968 | "exec": [ 2969 | "pm.test(\"Status code is 200\", function () {", 2970 | " pm.response.to.have.status(200);", 2971 | "});" 2972 | ] 2973 | } 2974 | } 2975 | ], 2976 | "request": { 2977 | "method": "GET", 2978 | "header": [], 2979 | "body": { 2980 | "mode": "raw", 2981 | "raw": "" 2982 | }, 2983 | "url": { 2984 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmId", 2985 | "protocol": "http", 2986 | "host": [ 2987 | "{{ipAddress}}" 2988 | ], 2989 | "path": [ 2990 | "api", 2991 | "v1", 2992 | ":auth_token", 2993 | "rhythm", 2994 | "rhythmId" 2995 | ], 2996 | "variable": [ 2997 | { 2998 | "key": "auth_token", 2999 | "value": "{{authToken}}" 3000 | } 3001 | ] 3002 | }, 3003 | "description": "Indicates the Rhythm's Id in the Light Panel system." 3004 | }, 3005 | "response": [ 3006 | { 3007 | "id": "3cd54461-e5ed-43d1-b62b-8ee4a469ed29", 3008 | "name": "Rhythm id", 3009 | "originalRequest": { 3010 | "method": "GET", 3011 | "header": [], 3012 | "body": { 3013 | "mode": "raw", 3014 | "raw": "" 3015 | }, 3016 | "url": { 3017 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmId", 3018 | "protocol": "http", 3019 | "host": [ 3020 | "{{ipAddress}}" 3021 | ], 3022 | "path": [ 3023 | "api", 3024 | "v1", 3025 | ":auth_token", 3026 | "rhythm", 3027 | "rhythmId" 3028 | ], 3029 | "variable": [ 3030 | { 3031 | "key": "auth_token", 3032 | "value": "{{authToken}}" 3033 | } 3034 | ] 3035 | } 3036 | }, 3037 | "status": "OK", 3038 | "code": 200, 3039 | "_postman_previewlanguage": "json", 3040 | "header": [ 3041 | { 3042 | "key": "Content-Length", 3043 | "value": "3", 3044 | "name": "Content-Length", 3045 | "description": "The length of the response body in octets (8-bit bytes)" 3046 | }, 3047 | { 3048 | "key": "Content-Type", 3049 | "value": "application/json", 3050 | "name": "Content-Type", 3051 | "description": "The mime type of this content" 3052 | } 3053 | ], 3054 | "cookie": [], 3055 | "responseTime": null, 3056 | "body": "406" 3057 | } 3058 | ] 3059 | }, 3060 | { 3061 | "_postman_id": "8c67133b-b063-4f04-a01e-49bd7ad709e2", 3062 | "name": "Hardware version", 3063 | "event": [ 3064 | { 3065 | "listen": "test", 3066 | "script": { 3067 | "id": "4fcf8750-e00a-4ffe-8112-e6965193fcd7", 3068 | "type": "text/javascript", 3069 | "exec": [ 3070 | "pm.test(\"Status code is 200\", function () {", 3071 | " pm.response.to.have.status(200);", 3072 | "});" 3073 | ] 3074 | } 3075 | } 3076 | ], 3077 | "request": { 3078 | "method": "GET", 3079 | "header": [], 3080 | "body": { 3081 | "mode": "raw", 3082 | "raw": "" 3083 | }, 3084 | "url": { 3085 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/hardwareVersion", 3086 | "protocol": "http", 3087 | "host": [ 3088 | "{{ipAddress}}" 3089 | ], 3090 | "path": [ 3091 | "api", 3092 | "v1", 3093 | ":auth_token", 3094 | "rhythm", 3095 | "hardwareVersion" 3096 | ], 3097 | "variable": [ 3098 | { 3099 | "key": "auth_token", 3100 | "value": "{{authToken}}" 3101 | } 3102 | ] 3103 | }, 3104 | "description": "Indicates the Rhythm's hardware version." 3105 | }, 3106 | "response": [ 3107 | { 3108 | "id": "7d216aa7-f911-4714-b2a0-69657fe2a897", 3109 | "name": "Hardware version", 3110 | "originalRequest": { 3111 | "method": "GET", 3112 | "header": [], 3113 | "body": { 3114 | "mode": "raw", 3115 | "raw": "" 3116 | }, 3117 | "url": { 3118 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/hardwareVersion", 3119 | "protocol": "http", 3120 | "host": [ 3121 | "{{ipAddress}}" 3122 | ], 3123 | "path": [ 3124 | "api", 3125 | "v1", 3126 | ":auth_token", 3127 | "rhythm", 3128 | "hardwareVersion" 3129 | ], 3130 | "variable": [ 3131 | { 3132 | "key": "auth_token", 3133 | "value": "{{authToken}}" 3134 | } 3135 | ] 3136 | } 3137 | }, 3138 | "status": "OK", 3139 | "code": 200, 3140 | "_postman_previewlanguage": "json", 3141 | "header": [ 3142 | { 3143 | "key": "Content-Length", 3144 | "value": "5", 3145 | "name": "Content-Length", 3146 | "description": "The length of the response body in octets (8-bit bytes)" 3147 | }, 3148 | { 3149 | "key": "Content-Type", 3150 | "value": "application/json", 3151 | "name": "Content-Type", 3152 | "description": "The mime type of this content" 3153 | } 3154 | ], 3155 | "cookie": [], 3156 | "responseTime": null, 3157 | "body": "\"1.4\"" 3158 | } 3159 | ] 3160 | }, 3161 | { 3162 | "_postman_id": "b26cc3cd-99e7-4556-a101-5da9ba37d87e", 3163 | "name": "Firmware version", 3164 | "event": [ 3165 | { 3166 | "listen": "test", 3167 | "script": { 3168 | "id": "a7b06d87-d5fd-4338-8f55-6390ebf73188", 3169 | "type": "text/javascript", 3170 | "exec": [ 3171 | "pm.test(\"Status code is 200\", function () {", 3172 | " pm.response.to.have.status(200);", 3173 | "});" 3174 | ] 3175 | } 3176 | } 3177 | ], 3178 | "request": { 3179 | "method": "GET", 3180 | "header": [], 3181 | "body": { 3182 | "mode": "raw", 3183 | "raw": "" 3184 | }, 3185 | "url": { 3186 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/firmwareVersion", 3187 | "protocol": "http", 3188 | "host": [ 3189 | "{{ipAddress}}" 3190 | ], 3191 | "path": [ 3192 | "api", 3193 | "v1", 3194 | ":auth_token", 3195 | "rhythm", 3196 | "firmwareVersion" 3197 | ], 3198 | "variable": [ 3199 | { 3200 | "key": "auth_token", 3201 | "value": "{{authToken}}" 3202 | } 3203 | ] 3204 | }, 3205 | "description": "Indicates the Rhythm's firmware version." 3206 | }, 3207 | "response": [ 3208 | { 3209 | "id": "a1d8da4e-d215-45f7-b39c-e646582e7668", 3210 | "name": "Firmware version", 3211 | "originalRequest": { 3212 | "method": "GET", 3213 | "header": [], 3214 | "body": { 3215 | "mode": "raw", 3216 | "raw": "" 3217 | }, 3218 | "url": { 3219 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/firmwareVersion", 3220 | "protocol": "http", 3221 | "host": [ 3222 | "{{ipAddress}}" 3223 | ], 3224 | "path": [ 3225 | "api", 3226 | "v1", 3227 | ":auth_token", 3228 | "rhythm", 3229 | "firmwareVersion" 3230 | ], 3231 | "variable": [ 3232 | { 3233 | "key": "auth_token", 3234 | "value": "{{authToken}}" 3235 | } 3236 | ] 3237 | } 3238 | }, 3239 | "status": "OK", 3240 | "code": 200, 3241 | "_postman_previewlanguage": "json", 3242 | "header": [ 3243 | { 3244 | "key": "Content-Length", 3245 | "value": "5", 3246 | "name": "Content-Length", 3247 | "description": "The length of the response body in octets (8-bit bytes)" 3248 | }, 3249 | { 3250 | "key": "Content-Type", 3251 | "value": "application/json", 3252 | "name": "Content-Type", 3253 | "description": "The mime type of this content" 3254 | } 3255 | ], 3256 | "cookie": [], 3257 | "responseTime": null, 3258 | "body": "\"2.0\"" 3259 | } 3260 | ] 3261 | }, 3262 | { 3263 | "_postman_id": "fe641b77-5f9f-40f4-b384-fec503dbb907", 3264 | "name": "Aux available", 3265 | "event": [ 3266 | { 3267 | "listen": "test", 3268 | "script": { 3269 | "id": "5d6fb84d-b263-40e2-bf40-f0aeebc577a8", 3270 | "type": "text/javascript", 3271 | "exec": [ 3272 | "pm.test(\"Status code is 200\", function () {", 3273 | " pm.response.to.have.status(200);", 3274 | "});" 3275 | ] 3276 | } 3277 | } 3278 | ], 3279 | "request": { 3280 | "method": "GET", 3281 | "header": [], 3282 | "body": { 3283 | "mode": "raw", 3284 | "raw": "" 3285 | }, 3286 | "url": { 3287 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/auxAvailable", 3288 | "protocol": "http", 3289 | "host": [ 3290 | "{{ipAddress}}" 3291 | ], 3292 | "path": [ 3293 | "api", 3294 | "v1", 3295 | ":auth_token", 3296 | "rhythm", 3297 | "auxAvailable" 3298 | ], 3299 | "variable": [ 3300 | { 3301 | "key": "auth_token", 3302 | "value": "{{authToken}}" 3303 | } 3304 | ] 3305 | }, 3306 | "description": "Indicates if an aux cable (3.5mm) is currently connected to the Rhythm." 3307 | }, 3308 | "response": [ 3309 | { 3310 | "id": "b4cb6717-1612-4bbf-be36-29b6640448f6", 3311 | "name": "Aux available", 3312 | "originalRequest": { 3313 | "method": "GET", 3314 | "header": [], 3315 | "body": { 3316 | "mode": "raw", 3317 | "raw": "" 3318 | }, 3319 | "url": { 3320 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/auxAvailable", 3321 | "protocol": "http", 3322 | "host": [ 3323 | "{{ipAddress}}" 3324 | ], 3325 | "path": [ 3326 | "api", 3327 | "v1", 3328 | ":auth_token", 3329 | "rhythm", 3330 | "auxAvailable" 3331 | ], 3332 | "variable": [ 3333 | { 3334 | "key": "auth_token", 3335 | "value": "{{authToken}}" 3336 | } 3337 | ] 3338 | } 3339 | }, 3340 | "status": "OK", 3341 | "code": 200, 3342 | "_postman_previewlanguage": "json", 3343 | "header": [ 3344 | { 3345 | "key": "Content-Length", 3346 | "value": "5", 3347 | "name": "Content-Length", 3348 | "description": "The length of the response body in octets (8-bit bytes)" 3349 | }, 3350 | { 3351 | "key": "Content-Type", 3352 | "value": "application/json", 3353 | "name": "Content-Type", 3354 | "description": "The mime type of this content" 3355 | } 3356 | ], 3357 | "cookie": [], 3358 | "responseTime": null, 3359 | "body": "false" 3360 | } 3361 | ] 3362 | }, 3363 | { 3364 | "_postman_id": "100d8b84-ae22-4e6a-aec1-46875b026c38", 3365 | "name": "Rhythm mode", 3366 | "event": [ 3367 | { 3368 | "listen": "test", 3369 | "script": { 3370 | "id": "f0df9337-d7c1-454d-b723-c6586ba6976f", 3371 | "type": "text/javascript", 3372 | "exec": [ 3373 | "pm.test(\"Status code is 200\", function () {", 3374 | " pm.response.to.have.status(200);", 3375 | "});" 3376 | ] 3377 | } 3378 | } 3379 | ], 3380 | "request": { 3381 | "method": "GET", 3382 | "header": [], 3383 | "body": { 3384 | "mode": "raw", 3385 | "raw": "" 3386 | }, 3387 | "url": { 3388 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmMode", 3389 | "protocol": "http", 3390 | "host": [ 3391 | "{{ipAddress}}" 3392 | ], 3393 | "path": [ 3394 | "api", 3395 | "v1", 3396 | ":auth_token", 3397 | "rhythm", 3398 | "rhythmMode" 3399 | ], 3400 | "variable": [ 3401 | { 3402 | "key": "auth_token", 3403 | "value": "{{authToken}}" 3404 | } 3405 | ] 3406 | }, 3407 | "description": "Allows the user to control the sound source for the Rhythm. Writing 0 to this field sets the Rhythm's sound source to the microphone, and writing 1 to the field sets the sound source to the aux cable." 3408 | }, 3409 | "response": [ 3410 | { 3411 | "id": "1f291856-ce01-4d24-a9a3-2907b66c1d4e", 3412 | "name": "Rhythm mode", 3413 | "originalRequest": { 3414 | "method": "GET", 3415 | "header": [], 3416 | "body": { 3417 | "mode": "raw", 3418 | "raw": "" 3419 | }, 3420 | "url": { 3421 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmMode", 3422 | "protocol": "http", 3423 | "host": [ 3424 | "{{ipAddress}}" 3425 | ], 3426 | "path": [ 3427 | "api", 3428 | "v1", 3429 | ":auth_token", 3430 | "rhythm", 3431 | "rhythmMode" 3432 | ], 3433 | "variable": [ 3434 | { 3435 | "key": "auth_token", 3436 | "value": "{{authToken}}" 3437 | } 3438 | ] 3439 | } 3440 | }, 3441 | "status": "OK", 3442 | "code": 200, 3443 | "_postman_previewlanguage": "json", 3444 | "header": [ 3445 | { 3446 | "key": "Content-Length", 3447 | "value": "1", 3448 | "name": "Content-Length", 3449 | "description": "The length of the response body in octets (8-bit bytes)" 3450 | }, 3451 | { 3452 | "key": "Content-Type", 3453 | "value": "application/json", 3454 | "name": "Content-Type", 3455 | "description": "The mime type of this content" 3456 | } 3457 | ], 3458 | "cookie": [], 3459 | "responseTime": null, 3460 | "body": "0" 3461 | } 3462 | ] 3463 | }, 3464 | { 3465 | "_postman_id": "097e998e-e0cd-4a09-96da-c76a97505f6f", 3466 | "name": "Rhythm mode - update", 3467 | "event": [ 3468 | { 3469 | "listen": "test", 3470 | "script": { 3471 | "id": "c8672a49-bd4e-4d1a-bb5a-d47f528be845", 3472 | "type": "text/javascript", 3473 | "exec": [ 3474 | "pm.test(\"Status code is 204\", function () {", 3475 | " pm.response.to.have.status(204);", 3476 | "});" 3477 | ] 3478 | } 3479 | } 3480 | ], 3481 | "request": { 3482 | "method": "PUT", 3483 | "header": [], 3484 | "body": { 3485 | "mode": "raw", 3486 | "raw": "{\"rhythmMode\": 1}" 3487 | }, 3488 | "url": { 3489 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmMode", 3490 | "protocol": "http", 3491 | "host": [ 3492 | "{{ipAddress}}" 3493 | ], 3494 | "path": [ 3495 | "api", 3496 | "v1", 3497 | ":auth_token", 3498 | "rhythm", 3499 | "rhythmMode" 3500 | ], 3501 | "variable": [ 3502 | { 3503 | "key": "auth_token", 3504 | "value": "{{authToken}}" 3505 | } 3506 | ] 3507 | }, 3508 | "description": "Allows the user to control the sound source for the Rhythm. Writing 0 to this field sets the Rhythm's sound source to the microphone, and writing 1 to the field sets the sound source to the aux cable." 3509 | }, 3510 | "response": [ 3511 | { 3512 | "id": "41e30fa0-17b6-4c63-bcb5-79d99ef98526", 3513 | "name": "Rhythm mode - update", 3514 | "originalRequest": { 3515 | "method": "PUT", 3516 | "header": [], 3517 | "body": { 3518 | "mode": "raw", 3519 | "raw": "{\"rhythmMode\": 1}" 3520 | }, 3521 | "url": { 3522 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmMode", 3523 | "protocol": "http", 3524 | "host": [ 3525 | "{{ipAddress}}" 3526 | ], 3527 | "path": [ 3528 | "api", 3529 | "v1", 3530 | ":auth_token", 3531 | "rhythm", 3532 | "rhythmMode" 3533 | ], 3534 | "variable": [ 3535 | { 3536 | "key": "auth_token", 3537 | "value": "{{authToken}}" 3538 | } 3539 | ] 3540 | } 3541 | }, 3542 | "status": "No Content", 3543 | "code": 204, 3544 | "_postman_previewlanguage": "plain", 3545 | "header": [ 3546 | { 3547 | "key": "Content-Length", 3548 | "value": "0", 3549 | "name": "Content-Length", 3550 | "description": "The length of the response body in octets (8-bit bytes)" 3551 | } 3552 | ], 3553 | "cookie": [], 3554 | "responseTime": null, 3555 | "body": "" 3556 | } 3557 | ] 3558 | }, 3559 | { 3560 | "_postman_id": "71839658-ff38-4138-956c-4b1f9e38a3bb", 3561 | "name": "Rhythm positions", 3562 | "event": [ 3563 | { 3564 | "listen": "test", 3565 | "script": { 3566 | "id": "65a85b1f-2323-4429-a934-c9da47802d83", 3567 | "type": "text/javascript", 3568 | "exec": [ 3569 | "pm.test(\"Status code is 200\", function () {", 3570 | " pm.response.to.have.status(200);", 3571 | "});" 3572 | ] 3573 | } 3574 | } 3575 | ], 3576 | "request": { 3577 | "method": "GET", 3578 | "header": [], 3579 | "body": { 3580 | "mode": "raw", 3581 | "raw": "" 3582 | }, 3583 | "url": { 3584 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmPos", 3585 | "protocol": "http", 3586 | "host": [ 3587 | "{{ipAddress}}" 3588 | ], 3589 | "path": [ 3590 | "api", 3591 | "v1", 3592 | ":auth_token", 3593 | "rhythm", 3594 | "rhythmPos" 3595 | ], 3596 | "variable": [ 3597 | { 3598 | "key": "auth_token", 3599 | "value": "{{authToken}}" 3600 | } 3601 | ] 3602 | }, 3603 | "description": "Indicates the position and orientation of the Rhythm in the Light Panels' layout." 3604 | }, 3605 | "response": [ 3606 | { 3607 | "id": "700edb36-9759-4a14-86d5-8ea6d766be59", 3608 | "name": "Rhythm positions", 3609 | "originalRequest": { 3610 | "method": "GET", 3611 | "header": [], 3612 | "body": { 3613 | "mode": "raw", 3614 | "raw": "" 3615 | }, 3616 | "url": { 3617 | "raw": "http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmPos", 3618 | "protocol": "http", 3619 | "host": [ 3620 | "{{ipAddress}}" 3621 | ], 3622 | "path": [ 3623 | "api", 3624 | "v1", 3625 | ":auth_token", 3626 | "rhythm", 3627 | "rhythmPos" 3628 | ], 3629 | "variable": [ 3630 | { 3631 | "key": "auth_token", 3632 | "value": "{{authToken}}" 3633 | } 3634 | ] 3635 | } 3636 | }, 3637 | "status": "OK", 3638 | "code": 200, 3639 | "_postman_previewlanguage": "json", 3640 | "header": [ 3641 | { 3642 | "key": "Content-Length", 3643 | "value": "22", 3644 | "name": "Content-Length", 3645 | "description": "The length of the response body in octets (8-bit bytes)" 3646 | }, 3647 | { 3648 | "key": "Content-Type", 3649 | "value": "application/json", 3650 | "name": "Content-Type", 3651 | "description": "The mime type of this content" 3652 | } 3653 | ], 3654 | "cookie": [], 3655 | "responseTime": null, 3656 | "body": "{\"x\":0,\"y\":173,\"o\":60}" 3657 | } 3658 | ] 3659 | } 3660 | ], 3661 | "event": [ 3662 | { 3663 | "listen": "prerequest", 3664 | "script": { 3665 | "id": "3f269797-6619-429b-ae01-222fee74de00", 3666 | "type": "text/javascript", 3667 | "exec": [ 3668 | "" 3669 | ] 3670 | } 3671 | }, 3672 | { 3673 | "listen": "test", 3674 | "script": { 3675 | "id": "7ca85b21-a9de-44a0-ba3d-ff44eb6625a3", 3676 | "type": "text/javascript", 3677 | "exec": [ 3678 | "" 3679 | ] 3680 | } 3681 | } 3682 | ] 3683 | } 3684 | ], 3685 | "event": [ 3686 | { 3687 | "listen": "prerequest", 3688 | "script": { 3689 | "id": "d8d3d88a-a85a-472b-afe7-7c75f8e7216c", 3690 | "type": "text/javascript", 3691 | "exec": [ 3692 | "" 3693 | ] 3694 | } 3695 | }, 3696 | { 3697 | "listen": "test", 3698 | "script": { 3699 | "id": "3bd7f475-785f-4864-858b-606ebb7a1d24", 3700 | "type": "text/javascript", 3701 | "exec": [ 3702 | "" 3703 | ] 3704 | } 3705 | } 3706 | ] 3707 | } --------------------------------------------------------------------------------