Query Latest Measurement Point¶
根据测点标识符等信息获取最新的测点读数。
请求格式¶
GET/POST https://{api-gateway}/cds-realtime-service/v1.0/measurement-point/latest?action=query
请求参数¶
名称 |
位置 |
必需/可选 |
数据类型 |
描述 |
---|---|---|---|---|
orgId |
Query |
必需 |
String |
测点所属的组织 ID。如何获取 orgId 信息>> |
mdmIds |
Query/Form |
必需 |
String |
测点对应的对象实例的标识符,多个对象实例之间用英文逗号隔开。单次查询指定的对象实例数量不超过 20000。为保证查询性能,建议单次查询指定的对象实例数量不超过 100。 |
pointIds |
Query/Form |
必需 |
String |
测点的标识符,多个测点之间用英文逗号隔开。单次查询指定的测点数量不超过 100。如何获取 pointId 信息>> |
返回内容类型¶
application/json; charset = UTF-8
返回码¶
参见 通用数据服务 API 返回码。
示例¶
请求示例¶
GET https://{api-gateway}/cds-realtime-service/v1.0/measurement-point/latest?action=query&orgId=yourOrgId&mdmIds=yourMdmId&pointIds=yourPointId
返回示例¶
{
"data": {
"yourMdmId": {
"points": {
"SITE.a": {
"value": 0,
"timestamp": 1572430440009,
"localtime":"2020-03-31T23:59:59",
"attributes": {}
},
"SITE.b": {
"value": 29,
"timestamp": 1572430440009,
"localtime":"2020-03-31T23:59:59",
"attributes": {}
},
"SITE.c": {
"value": 282720,
"timestamp": 1572430440009,
"localtime":"2020-03-31T23:59:59",
"attributes": {}
}
}
}
},
"code": 0,
"msg": "OK",
"traceId": "1234567890abcdefghijkl0987654321"
}