Skip to main content
Version: V4.0

Scene Management API


Get Scene List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
scene_idStringBodyScene ID
scene_nameStringBodyScene name
is_autoBooleanBodyWhether the scene is automation or not?
true: yes
false: no
enable_autoBooleanBodyWhether the scene automation is enable or not?
true: enable
false: disable
manualBooleanBodyWhether the scene is manual or not?
true: yes
false: no
scene_entity_idStringBodyScene entity ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_scene_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db",
"scene_name": "my scene",
"is_auto": true,
"enable_auto": true,
"manual": true,
"scene_entity_id": "es8b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}

Failure Return Example

See Failure Return Example



Get Scene Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
scene_idStringBodyYesScene ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
scene_nameStringBodyScene name
is_autoBooleanBodyWhether the scene is automation or not?
true: yes
false: no
manualBooleanBodyWhether the scene is manual or not?
true: yes
false: no
scene_entity_idStringBodyScene entity ID
triggers[]Object<trigger>BodyTrigger information
conditions[]Object<condition>BodyCondition information
actions[]Object<action>BodyAction information

trigger description

Parameter NameTypeLocationDescription
trigger_configStringBodyTrigger config, see Scene Trigger Config
device_idStringBodyDevice ID
ability_idStringBodyAbility ID
ability_typeStringBodyAbility type
trigger_typeStringBodyTrigger type, see Scene Trigger Config
attributeObjectBodyAttribute, see Standard Device Model

condition description

Parameter NameTypeLocationDescription
condition_configStringBodyCondition config, see Scene Condition Config
device_idStringBodyDevice ID
ability_idStringBodyAbility ID
ability_typeStringBodyAbility type
condition_typeStringBodyCondition type, see Scene Condition Config
attributeObjectBodyAttribute, see Standard Device Model

action description

Parameter NameTypeLocationDescription
action_configStringBodyAction config, see Scene Action Config
device_idStringBodyDevice ID
ability_idStringBodyAbility ID
ability_typeStringBodyAbility type
action_typeStringBodyAction type, see Scene Action Config
attributeObjectBodyAttribute, see Standard Device Model

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_scene_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"scene_name": "my scene",
"is_auto": true,
"manual": true,
"scene_entity_id": "es8b5a73f8dd84abaa94dcs248be49b0d2",
"triggers": [
{
"trigger_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea1",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec1",
"ability_type": "switch",
"trigger_type": "turned_on"
}
],
"conditions": [
{
"condition_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea2",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec2",
"ability_type": "switch",
"condition_type": "is_on"
}
],
"actions": [
{
"action_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea3",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec3",
"ability_type": "switch",
"action_type": "turn_on"
}
]
}
]
}

Failure Return Example

See Failure Return Example



Get Device Trigger List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyNoDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
device_nameStringBodyDevice name
device_typeStringBodyDevice type
device_idStringBodyDevice ID
triggers[]Object<trigger>BodyTrigger information

trigger description

Parameter NameTypeLocationDescription
trigger_configStringBodyTrigger config, see Scene Trigger Config
device_idStringBodyDevice ID
ability_idStringBodyAbility ID
ability_typeStringBodyAbility type
trigger_typeStringBodyTrigger type, see Scene Trigger Config

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_device_trigger_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_name": "My Device",
"device_type": "Switch",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"triggers": [
{
"trigger_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec7",
"ability_type": "switch",
"trigger_type": "turned_on"
}
]
}
]
}

Failure Return Example

See Failure Return Example



Get Device Condition List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyNoDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
device_nameStringBodyDevice name
device_typeStringBodyDevice type
device_idStringBodyDevice ID
conditions[]Object<condition>BodyCondition information

condition description

Parameter NameTypeLocationDescription
condition_configStringBodyCondition config, see Scene Condition Config
device_idStringBodyDevice ID
ability_idStringBodyAbility ID
ability_typeStringBodyAbility type
condition_typeStringBodyCondition type, see Scene Condition Config

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_device_condition_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_name": "My Device",
"device_type": "Switch",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"conditions": [
{
"condition_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec7",
"ability_type": "switch",
"condition_type": "is_on"
}
]
}
]
}

Failure Return Example

See Failure Return Example



Get Device Action List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyNoDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
device_nameStringBodyDevice name
device_typeStringBodyDevice type
device_idStringBodyDevice ID
actions[]Object<action>BodyAction information

action description

Parameter NameTypeLocationDescription
action_configStringBodyAction config, see Scene Action Config
device_idStringBodyDevice ID
ability_idStringBodyAbility ID
ability_typeStringBodyAbility type
action_typeStringBodyAction type, see Scene Action Config

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_device_action_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_name": "My Device",
"device_type": "Switch",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"actions": [
{
"action_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec7",
"ability_type": "switch",
"action_type": "turn_on"
}
]
}
]
}

Failure Return Example

See Failure Return Example



Create Scene Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
scene_nameStringBodyYesScene name
manualBooleanBodyYesWhether the scene is manual or not?
true: yes
false: no
triggers[]Object<trigger>BodyYesTrigger information
conditions[]Object<condition>BodyYesCondition information
actions[]Object<action>BodyYesAction information

trigger description

Parameter NameTypeLocationRequiredDescription
trigger_configStringBodyYesTrigger config, see Scene Trigger Config
device_idStringBodyNoDevice ID
ability_idStringBodyNoAbility ID
ability_typeStringBodyNoAbility type
trigger_typeStringBodyNoTrigger type, see Scene Trigger Config
attributeObjectBodyNoAttribute, see Standard Device Model

condition description

Parameter NameTypeLocationRequiredDescription
condition_configStringBodyYesCondition config, see Scene Condition Config
device_idStringBodyNoDevice ID
ability_idStringBodyNoAbility ID
ability_typeStringBodyNoAbility type
condition_typeStringBodyNoCondition type, see Scene Condition Config
attributeObjectBodyNoAttribute, see Standard Device Model

action description

Parameter NameTypeLocationRequiredDescription
action_configStringBodyYesAction config, see Scene Action Config
device_idStringBodyNoDevice ID
ability_idStringBodyNoAbility ID
ability_typeStringBodyNoAbility type
action_typeStringBodyNoAction type, see Scene Action Config
attributeObjectBodyNoAttribute, see Standard Device Model

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "create_scene_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"scene_name": "test",
"manual": true,
"triggers": [
{
"trigger_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea1",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec1",
"ability_type": "switch",
"trigger_type": "turned_on"
}
],
"conditions": [
{
"condition_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea2",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec2",
"ability_type": "switch",
"condition_type": "is_on"
}
],
"actions": [
{
"action_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea3",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec3",
"ability_type": "switch",
"action_type": "turn_on"
}
]
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Update Scene Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
scene_idStringBodyYesScene ID
scene_nameStringBodyYesScene name
manualBooleanBodyYesWhether the scene is manual or not?
true: yes
false: no
triggers[]Object<trigger>BodyYesTrigger information
conditions[]Object<condition>BodyYesCondition information
actions[]Object<action>BodyYesAction information

trigger description

Parameter NameTypeLocationRequiredDescription
trigger_configStringBodyYesTrigger config, see Scene Trigger Config
device_idStringBodyNoDevice ID
ability_idStringBodyNoAbility ID
ability_typeStringBodyNoAbility type
trigger_typeStringBodyNoTrigger type, see Scene Trigger Config
attributeObjectBodyNoAttribute, see Standard Device Model

condition description

Parameter NameTypeLocationRequiredDescription
condition_configStringBodyYesCondition config, see Scene Condition Config
device_idStringBodyNoDevice ID
ability_idStringBodyNoAbility ID
ability_typeStringBodyNoAbility type
condition_typeStringBodyNoCondition type, see Scene Condition Config
attributeObjectBodyNoAttribute, see Standard Device Model

action description

Parameter NameTypeLocationRequiredDescription
action_configStringBodyYesAction config, see Scene Action Config
device_idStringBodyNoDevice ID
ability_idStringBodyNoAbility ID
ability_typeStringBodyNoAbility type
action_typeStringBodyNoAction type, see Scene Action Config
attributeObjectBodyNoAttribute, see Standard Device Model

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "update_scene_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"scene_id": "sr31adc223cc4b3bedb6bd4742dedcfa5",
"manual": true,
"scene_name": "test",
"triggers": [
{
"trigger_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea1",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec1",
"ability_type": "switch",
"trigger_type": "turned_on"
}
],
"conditions": [
{
"condition_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea2",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec2",
"ability_type": "switch",
"condition_type": "is_on"
}
],
"actions": [
{
"action_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea3",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec3",
"ability_type": "switch",
"action_type": "turn_on"
}
]
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Delete Scene Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
scene_idStringBodyYesScene ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "delete_scene_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Delete Scene Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
scenes[]Object<scene>BodyYesScene information

scene description

Parameter NameTypeLocationRequiredDescription
scene_idStringBodyYesScene ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_delete_scene_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"scenes": [
{
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db"
}
]
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Manual Trigger Scene

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
scene_entity_idStringBodyYesScene entity ID
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "manual_trigger_scene",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scene_entity_id": "e3b5a73f8dd84abaa94dcs248be49b0db",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Manual Trigger Scene

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
scenes[]Object<scene>BodyYesScene information
residence_idStringBodyYesResidence ID

scene description

Parameter NameTypeLocationRequiredDescription
scene_entity_idStringBodyYesScene entity ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_manual_trigger_scene",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scenes": [
{
"scene_entity_id": "e3b5a73f8dd84abaa94dcs248be49b0db"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Enable Automation Scene

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
scene_entity_idStringBodyYesScene entity ID
residence_idStringBodyYesResidence ID
enable_autoBooleanBodyYesWhether the automation is enable or not?
true: enable
false: disable

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "enable_auto_scene",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scene_entity_id": "e3b5a73f8dd84abaa94dcs248be49b0db",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"enable_auto": true
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Enable Automation Scene

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
scenes[]Object<scene>BodyYesScene information

scene description

Parameter NameTypeLocationRequiredDescription
scene_entity_idStringBodyYesScene entity ID
enable_autoBooleanBodyYesWhether the automation is enable or not?
true: enable
false: disable

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_enable_auto_scene",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scenes": [
{
"scene_entity_id": "e3b5a73f8dd84abaa94dcs248be49b0db",
"enable_auto": true
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Get Scene History

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
scene_idStringBodyYesScene ID
page_sizeIntegerBodyYesPage size
page_indexIntegerBodyYesPage index

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
scene_record_idStringBodyScene record ID
scene_idStringBodyScene ID
scene_nameStringBodyScene name
trigger_sceneBooleanBodyWhether the scene triggering is successful or not?
true: success
false: failure
start_timeStringBodyStart time, UTC
finish_timeStringBodyFinish time, UTC
manualBooleanBodyWhether the scene triggering is manual or not?
true: yes
false: no
detailObject<detail>BodyDetail information

detail description

Parameter NameTypeLocationDescription
space_nameStringBodySpace name
space_idStringBodySpace ID
device_nameStringBodyDevice name
device_idStringBodyDevice ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_scene_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"scene_record_id": "r8b5a73f8dd84abaa94dcs248be49b0d1",
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db",
"scene_name": "my scene",
"trigger_scene": true,
"start_time": "2024-01-16 13:32:43",
"finish_time": "2024-01-16 13:32:45",
"manual": false,
"detail": {
"space_name": "kitchen",
"space_id": "ss8b5a73f8dd84abaa94dcs248be49b0d",
"device_name": "co",
"device_id": "dr8b5a73f8dd84abaa94dcs248be49b0d"
}
}
]
}

Failure Return Example

See Failure Return Example



Delete Scene History

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
scene_record_idStringBodyYesScene record ID
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "delete_scene_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scene_record_id": "r7b5a73f8dd84abaa94dcs248be49b5dh",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Delete Scene History

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
scene_records[]Object<scene_record>BodyYesScene record information
residence_idStringBodyYesResidence ID

scene_record description

Parameter NameTypeLocationRequiredDescription
scene_record_idStringBodyYesScene record ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_delete_scene_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scene_records": [
{
"scene_record_id": "r7b5a73f8dd84abaa94dcs248be49b5dh"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example