{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/lights/:selector/clean","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{\n    \"results\": [\n        {\n            \"id\": \"d073d1234f12\",\n            \"status\": \"ok\",\n            \"label\": \"HEV\"\n        },\n        ...\n    ]\n}","language":"json","status":200},{"name":"","code":"{\n\t\"error\": \"[error-message]\"\n}","language":"json","status":400}]},"params":[{"name":"stop","type":"boolean","default":"false","desc":"Turn the device on / off","required":false,"in":"body","ref":"","_id":"5f89347143583500571eec3a"},{"name":"duration","type":"int","default":"0","desc":"Duration in seconds (leaving blank or 0 sets the default duration for the device)","required":false,"in":"body","ref":"","_id":"5f89347143583500571eec39"},{"name":"selector","type":"string","default":"","desc":"Selector","required":false,"in":"path","ref":"","_id":"5f89347143583500571eec38"}],"examples":{"codes":[{"code":"   curl \"https://api.lifx.com/v1/lights/all/clean\" \\\n        -D \"{\\\"duration\\\": 3600}\" \\\n        -H \"Authorization: Bearer [[app:Token]]\"\n        \n   curl \"https://api.lifx.com/v1/lights/all/clean\" \\\n        -D \"{\\\"duration\\\": 0}\" \\\n        -H \"Authorization: Bearer [[app:Token]]\"\n        \n   curl \"https://api.lifx.com/v1/lights/all/clean\" \\\n        -D \"{}\" \\\n        -H \"Authorization: Bearer [[app:Token]]\"","language":"curl"}]},"method":"post"},"next":{"description":"","pages":[]},"title":"Clean","type":"endpoint","slug":"clean","excerpt":"Control clean-capable LIFX devices","body":"This endpoint lets you switch a light to clean mode, with a set duration. Typical use case is for scheduling clean mode.","updates":["60f9bc32a15894005ac0ba48"],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5f87bb4bb3a73201ade76e25","createdAt":"2020-10-15T03:00:27.037Z","user":"58e43269015a960f00849c4e","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"},"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},"project":"54ebb40d6423300d003672c0","__v":18}

postClean

Control clean-capable LIFX devices

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

selector:
string
Selector

Body Params

stop:
booleanfalse
Turn the device on / off
duration:
integer0
Duration in seconds (leaving blank or 0 sets the default duration for the device)

Examples


Result Format


Documentation

This endpoint lets you switch a light to clean mode, with a set duration. Typical use case is for scheduling clean mode.

User Information

Try It Out

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