Query Bound Scenes

Last Updated on : 2023-12-07 03:33:57

This API applies to scene switch devices. Query a list of scenes bound with the specified device based on the device ID.

API address

GET: /v1.0/devices/{device_id}/scenes

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Return parameter

Parameter nameTypeDescription
resultMapThe returned result.

Request example

GET: /v1.0/devices/6c294c2ad22e4fac2f7qb***/scenes

Return example

{
    "result": {
        "device_id": "vdevo15758****13095",
        "scenes": [
            {
                "code": "scene_2",
                "scene_id": "ilCZllmb***POY36",
                "name": "Test of Adding Scene G-Turn off Light",
                "value": "scene"
            },
            {
                "code": "scene_1",
                "scene_id": "EqFkQ79u***jlkTm",
                "name": "Scene of Turning on Light",
                "value": "scene"
            }
        ]
    },
    "t": 1576036860284,
    "success": true
}

Error code

For more information, see error code.