{"_id":"55f28173f9f3991900f38a1e","editedParams2":true,"project":"54ebb40d6423300d003672c0","category":{"_id":"55f28172f9f3991900f38a16","__v":3,"pages":["55f28173f9f3991900f38a1d","55f28173f9f3991900f38a1e","55f28173f9f3991900f38a1f","55f28173f9f3991900f38a20","55f28173f9f3991900f38a21","55f28173f9f3991900f38a22","55f28173f9f3991900f38a23","55f28173f9f3991900f38a24","55f28173f9f3991900f38a25","55f28173f9f3991900f38a26","55f28173f9f3991900f38a27","55f63d46fe4cce21005c785e","55f65cc16be5ea0d00bbbf4c"],"project":"54ebb40d6423300d003672c0","version":"55f28172f9f3991900f38a13","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-17T05:23:31.147Z","from_sync":false,"order":2,"slug":"api-endpoints","title":"API Endpoints"},"__v":4,"editedParams":true,"githubsync":"","user":"557e2561eb75d80d00af3dab","version":{"_id":"55f28172f9f3991900f38a13","project":"54ebb40d6423300d003672c0","__v":2,"createdAt":"2015-09-11T07:23:30.065Z","releaseDate":"2015-09-11T07:23:30.065Z","categories":["55f28172f9f3991900f38a14","55f28172f9f3991900f38a15","55f28172f9f3991900f38a16","55f66acb297b37170058accb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"parentDoc":null,"updates":["56bf82dd99c0960d00883a82"],"next":{"pages":[],"description":""},"createdAt":"2015-06-17T05:24:25.983Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"get","results":{"codes":[{"name":"","status":200,"language":"json","code":"[\n  {\n    \"id\": \"d3b2f2d97452\",\n    \"uuid\": \"8fa5f072-af97-44ed-ae54-e70fd7bd9d20\",\n    \"label\": \"Left Lamp\",\n    \"connected\": true,\n    \"power\": \"on\",\n    \"color\": {\n      \"hue\": 250.0,\n      \"saturation\": 0.5,\n      \"kelvin\": 3500\n    },\n    \"infrared\": \"1.0\",\n    \"brightness\": 0.5,\n    \"effect\": \"OFF\",\n    \"group\": {\n      \"id\": \"1c8de82b81f445e7cfaafae49b259c71\",\n      \"name\": \"Lounge\"\n    },\n    \"location\": {\n      \"id\": \"1d6fe8ef0fde4c6d77b0012dc736662c\",\n      \"name\": \"Home\"\n    },\n    \"last_seen\": \"2015-03-02T08:53:02.867+00:00\",\n    \"seconds_since_seen\": 0.002869418,\n    \"product\": {\n      \"name\": \"LIFX+ A19\",\n      \"company\": \"LIFX\",\n      \"identifier\": \"lifx_plus_a19\",\n\t    \"capabilities\": {\n  \t    \"has_color\": true,\n    \t  \"has_variable_color_temp\": true,\n\t\t\t\t\"min_kelvin\": 2500,\n        \"max_kelvin\": 9000,\n        \"has_ir\": true,\n        \"has_multizone\": false\n    \t}\n    }\n  }\n]"}]},"settings":"","examples":{"codes":[{"code":"curl \"https://api.lifx.com/v1/lights/all\" \\\n     -H \"Authorization: Bearer [[app:Token]]\"","language":"curl","name":"cURL"},{"language":"php","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":"python","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)"},{"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","language":"go"}]},"auth":"required","params":[{"_id":"55810638a5474a0d00d94378","ref":"","in":"path","required":true,"desc":"The [selector](doc:selectors) to limit which light information is returned.","default":"","type":"string","name":"selector"}],"url":"/lights/:selector"},"isReference":false,"order":1,"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\"","excerpt":"","slug":"list-lights","type":"endpoint","title":"List Lights"}

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 }}