选择设备指标选择器
本地
本地
GET
http://127.0.0.1:9999/api/v1/device/metrics/{id}
请求参数
Path 参数
id
string
必需
示例值:
14b4d7c3-1434-69c1-d59a-198cf78fb7fc
Header 参数
x-token
string
可选
默认值:
{{x-token}}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://127.0.0.1:9999/api/v1/device/metrics/14b4d7c3-1434-69c1-d59a-198cf78fb7fc' \
--header 'x-token: {{x-token}}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
array [object {2}]
必需
data_source_type
string
必需
options
array [object {3}]
必需
示例
{
"code": 200,
"message": "success",
"data": [
{
"data_source_type": "telemetry",
"options": [
{
"key": "temp1",
"label": null,
"data_type": "number"
}
]
},
{
"data_source_type": "attributes",
"options": [
{
"key": "temp7",
"label": null,
"data_type": "number"
},
{
"key": "temp2",
"label": null,
"data_type": "number"
},
{
"key": "temp4",
"label": null,
"data_type": "number"
},
{
"key": "hum6",
"label": null,
"data_type": "number"
},
{
"key": "hum4",
"label": null,
"data_type": "number"
},
{
"key": "temp5",
"label": null,
"data_type": "number"
},
{
"key": "hum5",
"label": null,
"data_type": "number"
},
{
"key": "temp6",
"label": null,
"data_type": "number"
},
{
"key": "hum7",
"label": null,
"data_type": "number"
},
{
"key": "temp",
"label": null,
"data_type": "number"
},
{
"key": "hum",
"label": null,
"data_type": "number"
},
{
"key": "hum3",
"label": null,
"data_type": "number"
},
{
"key": "temp1",
"label": null,
"data_type": "number"
},
{
"key": "hum2",
"label": null,
"data_type": "number"
},
{
"key": "temp3",
"label": null,
"data_type": "number"
}
]
},
{
"data_source_type": "event",
"options": [
{
"key": "yanhao",
"label": null,
"data_type": "string"
}
]
},
{
"data_source_type": "command",
"options": [
{
"key": "yanhao2",
"label": "testname",
"data_type": "string"
}
]
}
]
}
修改于 2025-03-24 10:10:45