1. 接口描述
接口请求域名: weilingwith.tencentcloudapi.com 。
模型列表查询/单个查询(产品模型/标准模型)
默认接口请求频率限制:20次/秒。
推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
参数名称 | 必选 | 类型 | 描述 |
---|---|---|---|
Action | 是 | String | 公共参数,本接口取值:DescribeModelList。 |
Version | 是 | String | 公共参数,本接口取值:2023-04-27。 |
Region | 是 | String | 公共参数,详见产品支持的 地域列表。 |
WorkspaceId | 是 | Integer | 工作空间id 示例值:1016 |
PageNumber | 是 | Integer | 分页查询,第几页,大于0 示例值:1 |
PageSize | 是 | Integer | 每页条数,大于0 示例值:20 |
ApplicationToken | 是 | String | 应用token 示例值:YzenL5LdGoxQM5gqJfCCoMDeGqUSsY78 |
DeviceTypeSet.N | 否 | Array of String | 设备类型 示例值:w02020 |
ProductIdSet.N | 否 | Array of Integer | 产品 pid 示例值:29 |
ModelIdSet.N | 否 | Array of String | 模型id 示例值:0123 |
3. 输出参数
参数名称 | 类型 | 描述 |
---|---|---|
Result | ModelSet | 模型列表查询结果 |
RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 物模型列表返回示例
物模型列表
输入示例
POST / HTTP/1.1
Host: weilingwith.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeModelList
<公共请求参数>
{
"WorkspaceId": 1016,
"PageNumber": 1,
"PageSize": 1,
"ApplicationToken": "YzenL5LdGoxQM5gqJfCCoMDeGqUSsY78"
}
输出示例
{
"Response": {
"RequestId": "934fc559-1b2c-42b4-9bb7-b21dad005d90",
"Result": {
"PageNumber": 1,
"PageSize": 1,
"Set": [
{
"DeviceType": "w0404024",
"DeviceTypeName": "空调温控器",
"ModelId": "2000055",
"ModelName": "边缘温控器",
"ModelParams": "x-json:{\"properties\":[{\"required\":false,\"name\":\"当前温度\",\"id\":\"temperature\",\"mode\":\"rw\",\"desc\":\"\",\"define\":{\"type\":\"double\",\"min\":-30,\"max\":55,\"unit\":\"°C\"},\"order\":1681354602280},{\"required\":false,\"name\":\"设定温度\",\"id\":\"setTemperature\",\"mode\":\"rw\",\"desc\":\"\",\"define\":{\"type\":\"double\",\"min\":16,\"max\":35,\"unit\":\"°C\"},\"order\":1681354625728},{\"required\":false,\"name\":\"运行模式\",\"id\":\"mode\",\"mode\":\"rw\",\"desc\":\"\",\"define\":{\"type\":\"enum\",\"mapping\":{\"0\":\"关闭\",\"1\":\"制冷\",\"2\":\"制热\",\"3\":\"送风\"}},\"order\":1681354654730},{\"required\":false,\"name\":\"风速\",\"id\":\"setWind\",\"mode\":\"rw\",\"desc\":\"\",\"define\":{\"type\":\"enum\",\"mapping\":{\"0\":\"自动\",\"1\":\"1档\",\"2\":\"2档\",\"3\":\"3档\",\"4\":\"4档\",\"5\":\"5档\"}},\"order\":1684390032099,\"level\":1,\"key\":\"properties\",\"parentId\":\"setWind\",\"value\":[],\"type\":\"枚举型\"}],\"services\":[{\"required\":false,\"name\":\"控制\",\"id\":\"control\",\"mode\":\"rw\",\"desc\":\"\",\"define\":{},\"callType\":\"async\",\"inputData\":[{\"required\":false,\"name\":\"设定温度\",\"id\":\"setTemperature\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"double\"},\"order\":1684292612782},{\"required\":false,\"name\":\"设定运行模式\",\"id\":\"mode\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"enum\",\"mapping\":{\"0\":\"关闭\",\"1\":\"制冷\",\"2\":\"制热\",\"3\":\"送风\"}},\"order\":1684292898776},{\"required\":false,\"name\":\"设定风速\",\"id\":\"setWind\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"enum\",\"mapping\":{\"1\":\"1档\",\"2\":\"2档\",\"3\":\"3档\",\"4\":\"4档\",\"5\":\"5档\"}},\"order\":1684292933365}],\"outputData\":[{\"required\":false,\"name\":\"是否成功\",\"id\":\"success\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"bool\",\"mapping\":{\"0\":\"失败\",\"1\":\"成功\",\"false\":\"失败\",\"true\":\"成功\"}},\"order\":1684292612782},{\"required\":false,\"name\":\"响应码\",\"id\":\"code\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"int\"},\"order\":1684292665854},{\"required\":false,\"name\":\"错误消息\",\"id\":\"errmsg\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"string\",\"min\":0,\"max\":9999999},\"order\":1684292770509}],\"level\":1,\"key\":\"services\",\"parentId\":\"control\",\"value1\":[{\"required\":false,\"name\":\"设定温度\",\"id\":\"setTemperature\",\"desc\":\"/\",\"mode\":\"rw\",\"define\":{\"type\":\"double\"},\"order\":1682596793666,\"type\":\"双精度浮点数\",\"key\":\"services\",\"parentId\":\"control\",\"value\":[],\"level\":2}],\"value2\":[{\"required\":false,\"name\":\"是否成功\",\"id\":\"success\",\"desc\":\"/\",\"mode\":\"rw\",\"define\":{\"type\":\"bool\",\"mapping\":{\"0\":\"失败\",\"1\":\"成功\",\"false\":\"失败\",\"true\":\"成功\"}},\"order\":1682596861463,\"type\":\"布尔型\",\"key\":\"services\",\"parentId\":\"control\",\"value\":[],\"level\":2}],\"value\":[{\"required\":false,\"name\":\"设定温度\",\"id\":\"setTemperature\",\"desc\":\"/\",\"mode\":\"rw\",\"define\":{\"type\":\"double\"},\"order\":1682596793666,\"type\":\"双精度浮点数\",\"key\":\"services\",\"parentId\":\"control\",\"value\":[],\"level\":2},{\"required\":false,\"name\":\"是否成功\",\"id\":\"success\",\"desc\":\"/\",\"mode\":\"rw\",\"define\":{\"type\":\"bool\",\"mapping\":{\"0\":\"失败\",\"1\":\"成功\",\"false\":\"失败\",\"true\":\"成功\"}},\"order\":1682596861463,\"type\":\"布尔型\",\"key\":\"services\",\"parentId\":\"control\",\"value\":[],\"level\":2}],\"type\":\"/\"}],\"events\":[{\"required\":false,\"name\":\"高温告警\",\"id\":\"highTemperature\",\"mode\":\"rw\",\"desc\":\"\",\"define\":{},\"properties\":[{\"required\":false,\"name\":\"告警类型\",\"id\":\"eventType\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"int\"},\"order\":1684378396844},{\"required\":false,\"name\":\"告警时间\",\"id\":\"eventTs\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"long\"},\"order\":1684378416811},{\"required\":false,\"name\":\"描述\",\"id\":\"describe\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"string\",\"min\":0,\"max\":100},\"order\":1684378433361},{\"required\":false,\"name\":\"告警等级\",\"id\":\"alarmLevel\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"int\"},\"order\":1684378459333}],\"type\":\"notify\"},{\"required\":false,\"name\":\"低温告警\",\"id\":\"lowTemperature\",\"mode\":\"rw\",\"desc\":\"\",\"define\":{},\"properties\":[{\"required\":false,\"name\":\"告警类型\",\"id\":\"eventType\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"int\"},\"order\":1684381625535},{\"required\":false,\"name\":\"告警时间\",\"id\":\"eventTs\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"long\"},\"order\":1684381625535},{\"required\":false,\"name\":\"描述\",\"id\":\"describe\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"string\",\"min\":0,\"max\":100},\"order\":1684381625535},{\"required\":false,\"name\":\"告警等级\",\"id\":\"alarmLevel\",\"desc\":\"\",\"mode\":\"rw\",\"define\":{\"type\":\"int\"},\"order\":1684381625535}],\"type\":\"notify\",\"level\":1,\"key\":\"events\",\"parentId\":\"lowTemperature\",\"value\":[{\"required\":false,\"name\":\"告警类型\",\"id\":\"eventType\",\"desc\":\"/\",\"mode\":\"rw\",\"define\":{\"type\":\"int\"},\"order\":1684378396844,\"type\":\"整数型\",\"key\":\"events\",\"parentId\":\"lowTemperature\",\"value\":[],\"level\":2},{\"required\":false,\"name\":\"告警时间\",\"id\":\"eventTs\",\"desc\":\"/\",\"mode\":\"rw\",\"define\":{\"type\":\"long\"},\"order\":1684378416811,\"type\":\"64位长整数\",\"key\":\"events\",\"parentId\":\"lowTemperature\",\"value\":[],\"level\":2},{\"required\":false,\"name\":\"描述\",\"id\":\"describe\",\"desc\":\"/\",\"mode\":\"rw\",\"define\":{\"type\":\"string\",\"min\":0,\"max\":100},\"order\":1684378433361,\"type\":\"字符串\",\"key\":\"events\",\"parentId\":\"lowTemperature\",\"value\":[],\"level\":2},{\"required\":false,\"name\":\"告警等级\",\"id\":\"alarmLevel\",\"desc\":\"/\",\"mode\":\"rw\",\"define\":{\"type\":\"int\",\"min\":\"\",\"max\":\"\"},\"order\":1684378459333,\"type\":\"整数型\",\"key\":\"events\",\"parentId\":\"lowTemperature\",\"value\":[],\"level\":2}]}]}",
"ModelType": 1,
"RelatedProduct": [
{
"Id": 2000055,
"Name": "边缘温控器"
}
],
"WorkspaceId": 1016
}
],
"TotalPage": 156,
"TotalRow": 156
}
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python: GitHub Gitee
- Tencent Cloud SDK 3.0 for Java: GitHub Gitee
- Tencent Cloud SDK 3.0 for PHP: GitHub Gitee
- Tencent Cloud SDK 3.0 for Go: GitHub Gitee
- Tencent Cloud SDK 3.0 for Node.js: GitHub Gitee
- Tencent Cloud SDK 3.0 for .NET: GitHub Gitee
- Tencent Cloud SDK 3.0 for C++: GitHub Gitee
- Tencent Cloud SDK 3.0 for Ruby: GitHub Gitee
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
错误码 | 描述 |
---|---|
AuthFailure.TokenExpired | token已过期,请重新申请 |
InvalidParameter | 参数错误。 |
InvalidParameterValue.InvalidWorkspaceId | 错误的工作空间Id |
ResourceNotFound | 资源不存在。 |