主题管理

CreateUIoTCoreProductTopic

创建产品Topic

请求参数

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProductSNstring产品序列号Yes
Topicstring产品Topic名称Yes
PermissionstringTopic权限,默认为sub,合法值为: sub,pub,pubsubNo
DescriptionstringTopic描述No

响应参数

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes

请求示例

https://api.ucloud.cn/?Action=CreateUIoTCoreProductTopic
&ProductSN=7ab051kbfhhjakc0
&Topic=/7ab051kbfhhjakc0/${DeviceSN}/hello
&Permission=sub
&Description=hello
&Region=cn-sh2
&公共请求参数

响应示例

{
    "RetCode": 0,
    "Action": "CreateUIoTCoreProductTopicResponse"
}

ModifyUIoTCoreProductTopic

修改产品Topic

请求参数

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProductSNstring产品序列号Yes
TopicstringTopic名称Yes
NewTopicstring修改后的Topic名称No
NewPermissionstring修改后的Topic权限,合法值为: sub,pub,pubsubNo
NewDescriptionstring修改后的Topic描述No

响应参数

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes

请求示例

https://api.ucloud.cn/?Action=ModifyUIoTCoreProductTopic
&ProductSN=7ab051kbfhhjakc0
&Topic=/7ab051kbfhhjakc0/${DeviceSN}/hello
&NewTopic=/7ab051kbfhhjakc0/${DeviceSN}/world
&NewPermission=pubsub
&NewDescription=world
&Region=cn-sh2
&公共请求参数

响应示例

{
    "RetCode": 0,
    "Action": "ModifyUIoTCoreProductTopicResponse"
}

DeleteUIoTCoreProductTopic

删除产品Topic

请求参数

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProductSNstring产品序列号Yes
Topicstring产品TopicYes

响应参数

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes

请求示例

https://api.ucloud.cn/?Action=DeleteUIoTCoreProductTopic
&ProductSN=7ab051kbfhhjakc0
&Topic=/7ab051kbfhhjakc0/${DeviceSN}/world
&Region=cn-sh2
&公共请求参数

响应示例

{
    "RetCode": 0,
    "Action": "DeleteUIoTCoreProductTopicResponse"
}

GetUIoTCoreProductTopicList

获取产品topic列表

请求参数

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProductSNstring产品序列号Yes
Offsetint列表起始位置偏移量,默认为0No
Limitint返回最大数据长度,默认为20,最大为100No

响应参数

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
TotalCountint总记录数Yes
TopicSetarray[TopicSet]Topic列表Yes

TopicSet 产品topic列表

Parameter nameTypeDescriptionRequired
TopicstringTopic名称Yes
Permissionstring权限 取pub、sub或pubsubYes
Typestringtopic类型, sys或者userYes
RuleEnginePermissionstring规则引擎权限 pub, sub或者pubsubYes
DescriptionstringTopic描述No

请求示例

https://api.ucloud.cn/?Action=GetUIoTCoreProductTopicList
&ProductSN=7ab051kbfhhjakc0
&Offset=0
&Limit=100
&Region=cn-sh2
&公共请求参数

响应示例

{
    "Action":"GetUIoTCoreProductTopicListResponse",
    "RetCode":0,
    "TopicSet":[
        {
            "Topic":"/undefined/7ab051kbfhhjakc0/${DeviceSN}/device/status",
            "Permission":"-",
            "Description":"设备状态变化(仅供规则引擎订阅)",
            "Type":"sys",
            "RuleEnginePermission":"sub"
        },
        {
            "Topic":"/undefined/7ab051kbfhhjakc0/${DeviceSN}/shadow/document",
            "Permission":"-",
            "Description":"设备影子发生变化时将发送完整的设备影子文档(仅供规则引擎订阅)",
            "Type":"sys",
            "RuleEnginePermission":"sub"
        },
        {
            "Topic":"/undefined/7ab051kbfhhjakc0/${DeviceSN}/tmodel/command",
            "Permission":"sub",
            "Description":"下发物模型命令到设备",
            "Type":"sys",
            "RuleEnginePermission":"pub"
        },
        {
            "Topic":"/undefined/7ab051kbfhhjakc0/${DeviceSN}/tmodel/command_reply/+",
            "Permission":"pub",
            "Description":"设备回复物模型命令",
            "Type":"sys",
            "RuleEnginePermission":"sub"
        },
        {
            "Topic":"/undefined/7ab051kbfhhjakc0/${DeviceSN}/tmodel/event/post",
            "Permission":"pub",
            "Description":"设备上报物模型事件",
            "Type":"sys",
            "RuleEnginePermission":"sub"
        },
        {
            "Topic":"/undefined/7ab051kbfhhjakc0/${DeviceSN}/tmodel/property/document",
            "Permission":"-",
            "Description":"设备的物模型属性发生变化时将发送完整的物模型属性文档(仅供规则引擎订阅)",
            "Type":"sys",
            "RuleEnginePermission":"sub"
        },
        {
            "Topic":"/undefined/7ab051kbfhhjakc0/${DeviceSN}/tmodel/property/post",
            "Permission":"pub",
            "Description":"设备上报物模型属性",
            "Type":"sys",
            "RuleEnginePermission":"sub"
        },
        {
            "Topic":"/undefined/7ab051kbfhhjakc0/${DeviceSN}/tmodel/property/set",
            "Permission":"sub",
            "Description":"设备接受物模型属性设置",
            "Type":"sys",
            "RuleEnginePermission":"pub"
        },
        {
            "Topic":"/7ab051kbfhhjakc0/${DeviceSN}/upload/event",
            "Permission":"pub",
            "Type":"user",
            "RuleEnginePermission":"pubsub"
        },
        {
            "Topic":"/7ab051kbfhhjakc0/${DeviceSN}/upload",
            "Permission":"pub",
            "Type":"user",
            "RuleEnginePermission":"pubsub"
        },
        {
            "Topic":"/7ab051kbfhhjakc0/${DeviceSN}/set",
            "Permission":"sub",
            "Type":"user",
            "RuleEnginePermission":"pubsub"
        }
    ],
    "TotalCount":11
}