注意:以下文档只适用于TOP接口,请谨慎使用!

wdk.rex.dm.devive.wot.action (rex平台设备wot指令下行)

rex平台设备wot指令下行

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
rex_dm_wot_top_action_request RexDmWotTopActionRequest 可选 请求体
  • └ device_type
  • String
  • 必须
  • 10057
  • 设备类型
  • └ input
  • String
  • 可选
  • {}
  • 指令入参
  • └ action
  • String
  • 必须
  • REX_ACTION_WakeUpScreen
  • 指令编码
  • └ channel_type
  • String
  • 可选
  • IOT
  • 通道类型
  • └ uuid
  • String
  • 必须
  • Y2jLq0UbXUYD
  • 设备ID
access_key String 必须 aaaaa
  • 默认值:aaaaa
  • 租户AccessKey
    access_sign String 必须 bbbbbbb
  • 默认值:bbbbbbb
  • 租户AccessSign
    access_time Number 可选 1773220720 请求时间(秒)

    响应参数

    名称 类型 示例值 描述
    result Result 响应结果
    • └ action_status
    • Boolean
    • true
    • 请求状态
    • data
    • Data
    • 数据
    • └ output
    • String
    • {}
    • 指令出参
    • └ input
    • String
    • {}
    • 指令入参
    • input_context
    • InputContext
    • 输入上下文
    • └ job_id
    • String
    • ${rex_job_id}
    • 任务ID
    • └ data_id
    • String
    • 64d899388df242cd8070161e23e275e2
    • 数据ID
    • └ biz_id
    • String
    • rex-dm-cmd
    • 业务ID
    • └ session_id
    • String
    • 111111
    • 会话ID
    • └ error_code
    • String
    • iot.device.NotExistedDevice
    • 错误码
    • └ href
    • String
    • /dm/10057/actions/REX_ACTION_WakeUpScreen/64d899388df242cd8070161e23e275e2
    • 指令路径
    • └ message
    • String
    • The device does not exist.
    • 消息
    • └ status
    • String
    • error
    • 执行状态
    • └ success
    • Boolean
    • true
    • 是否成功
    • └ msg_info
    • String
    • ak验证失败
    • 错误信息
    • └ msg_code
    • String
    • WITHOUT_AUTHORIZATION
    • 错误码

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    WdkRexDmDeviveWotActionRequest req = new WdkRexDmDeviveWotActionRequest();
    WdkRexDmDeviveWotActionRequest.RexDmWotTopActionRequest obj1 = new WdkRexDmDeviveWotActionRequest.RexDmWotTopActionRequest();
    obj1.setDeviceType("10057");
    obj1.setInput("{}");
    obj1.setAction("REX_ACTION_WakeUpScreen");
    obj1.setChannelType("IOT");
    obj1.setUuid("Y2jLq0UbXUYD");
    req.setRexDmWotTopActionRequest(obj1);
    req.setAccessKey("aaaaa");
    req.setAccessSign("bbbbbbb");
    req.setAccessTime(1773220720L);
    WdkRexDmDeviveWotActionResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <wdk_rex_dm_devive_wot_action_response>
        <result>
            <action_status>true</action_status>
            <data>
                <output>{}</output>
                <input>{}</input>
                <input_context>
                    <job_id>${rex_job_id}</job_id>
                    <data_id>64d899388df242cd8070161e23e275e2</data_id>
                    <biz_id>rex-dm-cmd</biz_id>
                    <session_id>111111</session_id>
                </input_context>
                <error_code>iot.device.NotExistedDevice</error_code>
                <href>/dm/10057/actions/REX_ACTION_WakeUpScreen/64d899388df242cd8070161e23e275e2</href>
                <message>The device does not exist.</message>
                <status>error</status>
            </data>
            <success>true</success>
            <msg_info>ak验证失败</msg_info>
            <msg_code>WITHOUT_AUTHORIZATION</msg_code>
        </result>
    </wdk_rex_dm_devive_wot_action_response>

    异常示例

    • XML示例
    • JSON示例
    <error_response>
        <code>50</code>
        <msg>Remote service error</msg>
        <sub_code>isv.invalid-parameter</sub_code>
        <sub_msg>非法参数</sub_msg>
    </error_response>

    错误码解释

    错误码 错误描述 解决方案

    API工具

    如何获得此API

    FAQ

    返回
    顶部