{"_id":"5c47d2fda9ac54015a770282","project":"54ebb40d6423300d003672c0","version":{"_id":"55f28172f9f3991900f38a13","project":"54ebb40d6423300d003672c0","__v":3,"createdAt":"2015-09-11T07:23:30.065Z","releaseDate":"2015-09-11T07:23:30.065Z","categories":["55f28172f9f3991900f38a14","55f28172f9f3991900f38a15","55f28172f9f3991900f38a16","55f66acb297b37170058accb","5d229ff5e59b8e003ab3a9da"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"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"},"user":"58e43269015a960f00849c4e","__v":6,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-01-23T02:35:41.342Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":"2XX","language":"json","code":"{\n  \"results\": [\n    {\n      \"id\": \"d3b2f2d97452\",\n      \"label\": \"Left Lamp\",\n      \"status\": \"ok\"\n    }\n  ]\n}","name":""}]},"settings":"","examples":{"codes":[{"name":null,"language":"curl","code":"curl -X POST \"https://api.lifx.com/v1/lights/all/effects/move\" \\\n     -H \"Authorization: Bearer [[app:Token]]\" \\\n     -d 'period=10' \\\n     -d 'cycles=1' \\\n     -d 'direction=backward'"},{"code":"import requests\n\ntoken = \"[[app:Token]]\"\n\nheaders = {\n    \"Authorization\": \"Bearer %s\" % token,\n}\n\ndata = {\n    \"period\": 10,\n    \"cycles\": 1,\n    \"direction\": \"backward\",\n}\n\nresponse = requests.post('https://api.lifx.com/v1/lights/all/effects/move', data=data, headers=headers)","language":"python"}]},"method":"post","auth":"required","params":[{"_id":"5c47d5fd69cb1d04074725d2","ref":"","in":"body","required":false,"desc":"Move direction, can be `forward` or `backward`.","default":"forward","type":"string","name":"direction"},{"_id":"5c47d5fd69cb1d04074725d1","ref":"","in":"body","required":false,"desc":"The time in seconds for one cycle of the effect.","default":"1","type":"double","name":"period"},{"_id":"5c47d5fd69cb1d04074725d0","ref":"","in":"body","required":false,"desc":"The number of times to move the pattern across the device.  Special cases are `0` to switch the effect off, and unspecified to continue indefinitely.","default":"Infinite","type":"float","name":"cycles"},{"_id":"5c47d5fd69cb1d04074725cf","ref":"","in":"body","required":false,"desc":"Switch any selected device that is off to on before performing the effect.","default":"true","type":"boolean","name":"power_on"},{"_id":"5c47d63469cb1d04074725d3","ref":"","in":"path","required":false,"desc":"The [selector](doc:selectors) to limit which devices will run the effect.","default":"","type":"string","name":"selector"}],"url":"/lights/:selector/effects/move"},"isReference":false,"order":7,"body":"Performs a move effect on a linear device with zones, by moving the current pattern across the device.  Use the parameters to tweak the effect.","excerpt":"","slug":"move-effect","type":"endpoint","title":"Move Effect"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

selector:
string
The [selector](doc:selectors) to limit which devices will run the effect.

Body Params

direction:
stringforward
Move direction, can be `forward` or `backward`.
period:
double1
The time in seconds for one cycle of the effect.
cycles:
floatInfinite
The number of times to move the pattern across the device. Special cases are `0` to switch the effect off, and unspecified to continue indefinitely.
power_on:
booleantrue
Switch any selected device that is off to on before performing the effect.

Examples


Result Format


Documentation

Performs a move effect on a linear device with zones, by moving the current pattern across the device. Use the parameters to tweak the effect.

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