{"_id":"55f28173f9f3991900f38a24","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"},"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"},"user":"557e2561eb75d80d00af3dab","__v":7,"editedParams2":true,"editedParams":true,"project":"54ebb40d6423300d003672c0","parentDoc":null,"updates":["5620f0616e20d40d00731053","5718fa41f8f7de1900683fef","577e17d447a9ab0e003dffe7","58697553c0741a2d0015c560","586975931b0bc03700ec2398"],"next":{"pages":[],"description":""},"createdAt":"2015-07-20T01:36:41.057Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -X PUT \"https://api.lifx.com/v1/scenes/scene_id:55a0db9d-3ea7-4973-9b15-b149215bd4db/activate\" \\\n     -H \"Authorization: Bearer [[app:Token]]\"","language":"curl"},{"language":"php","code":"<?php\n\n$scene = '55a0db9d-3ea7-4973-9b15-b149215bd4db';\n$link = \"https://api.lifx.com/v1/scenes/scene_id:$scene/activate\";\n$authToken = \"[[app:Token]]\";\n\n$headers = array('Authorization: Bearer ' . $authToken);\n\n$ch = curl_init($link);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n$response = curl_exec($ch);\n\n?>"},{"code":"import requests\n\ntoken = \"[[app:Token]]\"\nscene = '55a0db9d-3ea7-4973-9b15-b149215bd4db'\n\nheaders = {\n    \"Authorization\": \"Bearer %s\" % token,\n}\n\nresponse = requests.put('https://api.lifx.com/v1/scenes/scene_id:%s/activate' % scene, headers=headers)","language":"python"}]},"method":"put","results":{"codes":[{"name":"","status":"2XX","language":"json","code":"{\n  \"results\": [\n    {\n      \"status\": \"ok\",\n      \"label\": \"Left\",\n      \"id\": \"d073d501cf2c\"\n    },\n    {\n      \"status\": \"ok\",\n      \"label\": \"Right\",\n      \"id\": \"d073d500e948\"\n    },\n    {\n      \"status\": \"ok\",\n      \"label\": \"Left\",\n      \"id\": \"d073d501a6ed\"\n    },\n    {\n      \"status\": \"ok\",\n      \"label\": \"Right\",\n      \"id\": \"d073d5017c04\"\n    }\n  ]\n}"}]},"settings":"","auth":"required","params":[{"_id":"55ac50a95863b817008ae37f","ref":"","in":"path","required":true,"desc":"The UUID for the scene you wish to activate","default":"","type":"string","name":"scene_uuid"},{"_id":"55c2b3e3e61e860d00312324","ref":"","in":"body","required":false,"desc":"The time in seconds to spend performing the scene transition.","default":"1.0","type":"double","name":"duration"},{"_id":"592f72307fd3210025f6d5b7","ref":"","in":"body","required":false,"desc":"Any of *\"power\", \"infrared\", \"duration\", \"intensity\", \"hue\", \"saturation\", \"brightness\"* or *\"kelvin\"*, specifying that these properties should not be changed on devices when applying the scene.","default":"","type":"array_string","name":"ignore"},{"_id":"592f731362a2c90037f73e42","ref":"","in":"body","required":false,"desc":"A `state` object as per  [Set State](doc:set-state) specifying properties to apply to all devices in the scene, overriding those configured in the scene.","default":"","type":"object","name":"overrides"}],"url":"/scenes/scene_id:scene_uuid/activate"},"isReference":false,"order":10,"body":"Activates a scene from the users account","excerpt":"","slug":"activate-scene","type":"endpoint","title":"Activate Scene"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

scene_uuid:
required
string
The UUID for the scene you wish to activate

Body Params

duration:
double1.0
The time in seconds to spend performing the scene transition.
ignore:
array of strings
Any of *"power", "infrared", "duration", "intensity", "hue", "saturation", "brightness"* or *"kelvin"*, specifying that these properties should not be changed on devices when applying the scene.
overrides:
object
A `state` object as per [Set State](doc:set-state) specifying properties to apply to all devices in the scene, overriding those configured in the scene.

Examples


Result Format


Documentation

Activates a scene from the users account

User Information

Try It Out

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