{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/lights/:selector","auth":"required","method":"get","params":[{"name":"selector","type":"string","default":"","desc":"The [selector](doc:selectors) to limit which light information is returned.","required":true,"in":"path","ref":"","_id":"55810638a5474a0d00d94378"}],"results":{"codes":[{"code":"[\n  {\n    \"id\": \"d073d5141876\",\n    \"uuid\": \"02a5b510-2d3d-46ea-92ac-c4533f75c24e\",\n    \"label\": \"Lamp\",\n    \"connected\": true,\n    \"power\": \"on\",\n    \"color\": {\n      \"hue\": 59.997253376058595,\n      \"saturation\": 1,\n      \"kelvin\": 3500\n    },\n    \"brightness\": 0.29999237048905164,\n    \"effect\": \"OFF\",\n    \"group\": {\n      \"id\": \"06e3ec50395511e9a0757200055bf1c0\",\n      \"name\": \"Loungeroom\"\n    },\n    \"location\": {\n      \"id\": \"f2c1aa82395411e9a0757200055bf1c0\",\n      \"name\": \"Home\"\n    },\n    \"product\": {\n      \"name\": \"Color 1000\",\n      \"identifier\": \"lifx_color_a19\",\n      \"company\": \"LIFX\",\n      \"capabilities\": {\n        \"has_color\": true,\n        \"has_variable_color_temp\": true,\n        \"has_ir\": false,\n        \"has_chain\": false,\n        \"has_multizone\": false,\n        \"min_kelvin\": 2500,\n        \"max_kelvin\": 9000\n      }\n    },\n    \"last_seen\": \"2019-02-25T23:40:40Z\",\n    \"seconds_since_seen\": 0\n  }\n]","language":"json","status":200,"name":"Bulb Response"},{"name":"Multizone Response","status":200,"language":"json","code":"[\n  {\n    \"id\": \"d073d528d80f\",\n    \"uuid\": \"021e0518-e5bc-4432-a42a-73f4a7d0ddbd\",\n    \"label\": \"MyZ\",\n    \"connected\": true,\n    \"power\": \"on\",\n    \"color\": {\n      \"hue\": 0,\n      \"saturation\": 1,\n      \"kelvin\": 3500\n    },\n    \"brightness\": 0.29999237048905164,\n    \"zones\": {\n      \"count\": 8,\n      \"zones\": [\n        {\n          \"brightness\": 0.3,\n          \"hue\": 0,\n          \"kelvin\": 3500,\n          \"saturation\": 1,\n          \"zone\": 0\n        },\n        {\n          \"brightness\": 0.3,\n          \"hue\": 60,\n          \"kelvin\": 3500,\n          \"saturation\": 1,\n          \"zone\": 1\n        },\n        {\n          \"brightness\": 0.3,\n          \"hue\": 40,\n          \"kelvin\": 3500,\n          \"saturation\": 1,\n          \"zone\": 2\n        },\n        {\n          \"brightness\": 0.3,\n          \"hue\": 127,\n          \"kelvin\": 3500,\n          \"saturation\": 1,\n          \"zone\": 3\n        },\n        {\n          \"brightness\": 0.3,\n          \"hue\": 294,\n          \"kelvin\": 3500,\n          \"saturation\": 1,\n          \"zone\": 4\n        },\n        {\n          \"brightness\": 0.3,\n          \"hue\": 238.99,\n          \"kelvin\": 3500,\n          \"saturation\": 1,\n          \"zone\": 5\n        },\n        {\n          \"brightness\": 0.3,\n          \"hue\": 271,\n          \"kelvin\": 3500,\n          \"saturation\": 1,\n          \"zone\": 6\n        },\n        {\n          \"brightness\": 0.3,\n          \"hue\": 271,\n          \"kelvin\": 3500,\n          \"saturation\": 1,\n          \"zone\": 7\n        }\n      ]\n    },\n    \"effect\": \"OFF\",\n    \"group\": {\n      \"id\": \"f2b54076395411e9a0757200055bf1c0\",\n      \"name\": \"Kitchen\"\n    },\n    \"location\": {\n      \"id\": \"f2c1aa82395411e9a0757200055bf1c0\",\n      \"name\": \"Home\"\n    },\n    \"product\": {\n      \"name\": \"LIFX Z\",\n      \"identifier\": \"lifx_z2\",\n      \"company\": \"LIFX\",\n      \"capabilities\": {\n        \"has_color\": true,\n        \"has_variable_color_temp\": true,\n        \"has_ir\": false,\n        \"has_chain\": false,\n        \"has_multizone\": true,\n        \"min_kelvin\": 2500,\n        \"max_kelvin\": 9000\n      }\n    },\n    \"last_seen\": \"2019-02-25T23:40:56Z\",\n    \"seconds_since_seen\": 0\n  }\n]"},{"name":"Tile Response","status":200,"language":"json","code":"[\n  {\n    \"id\": \"d073d5fb93d8\",\n    \"uuid\": \"02507649-8240-4b67-8cee-4def40e5989e\",\n    \"label\": \"MyTile\",\n    \"connected\": true,\n    \"power\": \"on\",\n    \"color\": {\n      \"hue\": 38.83726253147174,\n      \"saturation\": 1,\n      \"kelvin\": 3500\n    },\n    \"brightness\": 0.09999237048905166,\n    \"effect\": \"OFF\",\n    \"chain\": {\n      \"count\": 2,\n      \"children\": [\n        {\n          \"height\": 8,\n          \"index\": 0,\n          \"user_x\": 0,\n          \"user_y\": 0,\n          \"width\": 8\n        },\n        {\n          \"height\": 8,\n          \"index\": 1,\n          \"user_x\": 1,\n          \"user_y\": 0,\n          \"width\": 8\n        }\n      ]\n    },\n    \"group\": {\n      \"id\": \"f2b54076395411e9a0757200055bf1c0\",\n      \"name\": \"Kitchen\"\n    },\n    \"location\": {\n      \"id\": \"f2c1aa82395411e9a0757200055bf1c0\",\n      \"name\": \"Home\"\n    },\n    \"product\": {\n      \"name\": \"LIFX Tile\",\n      \"identifier\": \"lifx_tile\",\n      \"company\": \"LIFX\",\n      \"capabilities\": {\n        \"has_color\": true,\n        \"has_variable_color_temp\": true,\n        \"has_ir\": false,\n        \"has_chain\": true,\n        \"has_multizone\": false,\n        \"min_kelvin\": 2500,\n        \"max_kelvin\": 9000\n      }\n    },\n    \"last_seen\": \"2019-02-25T23:41:19Z\",\n    \"seconds_since_seen\": 0\n  }\n]"}]},"settings":"","examples":{"codes":[{"name":"cURL","language":"curl","code":"curl \"https://api.lifx.com/v1/lights/all\" \\\n     -H \"Authorization: Bearer [[app:Token]]\""},{"code":"<?php\n\n$link = \"https://api.lifx.com/v1/lights/all\";\n$authToken = \"[[app:Token]]\";\n$ch = curl_init($link);\n$headers = array('Authorization: Bearer ' . $authToken);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n$response = curl_exec($ch);\n\n?>","language":"php"},{"code":"import requests\n\ntoken = \"[[app:Token]]\"\n\nheaders = {\n    \"Authorization\": \"Bearer %s\" % token,\n}\n\nresponse = requests.get('https://api.lifx.com/v1/lights/all', headers=headers)","language":"python"},{"language":"go","code":"package main\n\nimport \"net/http\"\n\nfunc main() {\n\n\treq, err := http.NewRequest(\"GET\", \"https://api.lifx.com/v1/lights/all\", nil)\n\tif err != nil {\n\t\t// handle err\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer [[app:Token]]\")\n\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\t// handle err\n\t}\n\tdefer resp.Body.Close()\n\n}\n"}]}},"next":{"description":"","pages":[]},"title":"List Lights","type":"endpoint","slug":"list-lights","excerpt":"","body":"Gets lights belonging to the authenticated account. Filter the lights using selectors. Properties such as id, label, group and location can be used in selectors. Most endpoints accept selectors when performing actions.\n\nNote that each light has an \"effect\" property that indicates if you have a firmware effect running on the device. Currently only strips and tiles have firmware effects. For lights that do not have a firmware effect, the value will always be \"OFF\". For the tiles and strips it will be either \"OFF\" if no effect is running, or the name of the effect that is running, like \"MORPH\" or \"MOVE\"","updates":["56bf82dd99c0960d00883a82"],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"55f28173f9f3991900f38a1e","editedParams2":true,"project":"54ebb40d6423300d003672c0","category":{"sync":{"isSync":false,"url":""},"pages":["55f28173f9f3991900f38a1d","55f28173f9f3991900f38a1e","55f28173f9f3991900f38a1f","55f28173f9f3991900f38a20","55f28173f9f3991900f38a21","55f28173f9f3991900f38a22","55f28173f9f3991900f38a23","55f28173f9f3991900f38a24","55f28173f9f3991900f38a25","55f28173f9f3991900f38a26","55f28173f9f3991900f38a27","55f63d46fe4cce21005c785e","55f65cc16be5ea0d00bbbf4c"],"title":"API Endpoints","slug":"api-endpoints","order":2,"from_sync":false,"reference":false,"_id":"55f28172f9f3991900f38a16","__v":3,"createdAt":"2015-06-17T05:23:31.147Z","project":"54ebb40d6423300d003672c0","version":"55f28172f9f3991900f38a13"},"__v":5,"editedParams":true,"createdAt":"2015-06-17T05:24:25.983Z","githubsync":"","user":"557e2561eb75d80d00af3dab","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["55f28172f9f3991900f38a14","55f28172f9f3991900f38a15","55f28172f9f3991900f38a16","55f66acb297b37170058accb","5d229ff5e59b8e003ab3a9da"],"_id":"55f28172f9f3991900f38a13","project":"54ebb40d6423300d003672c0","releaseDate":"2015-09-11T07:23:30.065Z","createdAt":"2015-09-11T07:23:30.065Z","__v":3},"parentDoc":null}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

selector:
required
string
The [selector](doc:selectors) to limit which light information is returned.

Examples


Result Format


Documentation

Gets lights belonging to the authenticated account. Filter the lights using selectors. Properties such as id, label, group and location can be used in selectors. Most endpoints accept selectors when performing actions. Note that each light has an "effect" property that indicates if you have a firmware effect running on the device. Currently only strips and tiles have firmware effects. For lights that do not have a firmware effect, the value will always be "OFF". For the tiles and strips it will be either "OFF" if no effect is running, or the name of the effect that is running, like "MORPH" or "MOVE"

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}