Skip to content

场景管理 ​

GET 获取场景列表 ​

GET /clip/v2/resource/scene

说明 获取场景列表 支持房间过滤

Body 请求参数

json
{
  "room_uuid": "string"
}

请求参数 ​

字段位置类型必选说明
room_uuidbodystring是房间ID

返回示例

json
{
  "code": 0,
  "data": {
    "arr": [
      {
        "id": "3EBD2DB5-B946-4BBA-B678-C7B7C6BA4D0F",
        "type": "scene",
        "parent_id": "2F84620F-C289-4AA3-8A1E-D6DE9C33D1F5",
        "parent_type": "group_light",
        "name": "端午龙舟",
        "scene_type": 2,
        "is_active": 1,
        "picture_id": "E423E110-0398-4FFB-9E3D-E8E3A1CEEEEB",
        "picture_type": "file",
        "picture_url": "http://192.168.41.110:8000/20240829_173416_E423E110-0398-4FFB-9E3D-E8E3A1CEEEEB.png",
        "icon": "",
        "background": "",
        "sequence": 0,
        "colors": [
          4293551661,
          4292219417,
          4293890993,
          4283345655,
          4288215906
        ]
      }
    ],
    "len": 1,
    "obj": {}
  },
  "msg": "success"
}

返回结果 ​

状态码状态码含义
200OK

返回数据结构 ​

状态码 200

字段类型必选说明
codeinteger是返回结果码
msgstring是响应消息
dataobject是响应数据
data.arrobject[]是资源列表
data.arr[].idstring是场景ID
data.arr[].typestring是资源类型;此处固定为 scene
data.arr[].parent_idstring是父节点
data.arr[].parent_typestring是父节点;此处固定位 group_light
data.arr[].namestring是名称
data.arr[].scene_typeinteger是场景类型;1颜色场景, 2图片场景
data.arr[].is_activeinteger是是否激活;1已激活, 0否
data.arr[].picture_idstring是图片场景需要用到的字段
data.arr[].picture_typestring是资源类型;此处固定为 file
data.arr[].picture_urlstring是图片地址
data.arr[].iconstring是BweeApp专用
data.arr[].backgroundstring是BweeApp专用
data.arr[].sequenceinteger是BweeApp专用
data.arr[].colorsinteger[]是BweeApp专用