Query Latest Measurement Point¶
Get the latest readings of measurement points by point IDs.
Request Format¶
GET/POST https://{api-gateway}/cds-realtime-service/v1.0/measurement-point/latest?action=query
Request Parameters¶
Name |
Location |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Mandatory |
String |
The organization ID which the measurement point belongs to. How to get orgId >> |
mdmIds |
Query/Form |
Mandatory |
String |
The object instance ID which the measurement point belongs to. Separate multiple IDs by commas. Up to 20000 object instances are allowed in a single query. To ensure query performance, it is recommended that you pass in no more than 100 object instances in a single query. |
pointIds |
Query/Form |
Mandatory |
String |
The measurement point ID. Separate multiple IDs by commas. Up to 100 points are allowed in a single query. How to get pointId>> |
mdmTypes |
Query/Form |
Optional |
Boolean |
Specify how to filter the returned data by the object type that a child asset belongs to. Support specifying only one object type identifier. How to get mdmTypes>> |
filter |
Query/Form |
Optional |
String |
Specify how to filter the returned data by pointIds and attributes. If you specify the field that comes from attributes, the prefix |
orderBy |
Query/Form |
Optional |
String |
Specify how to sort the returned data by pointIds and attributes. If you specify the field that comes from attributes, the prefix |
pageSize |
Query/Form |
Optional |
Integer |
The number of the returned records on a single page. The maximum number is 20000. |
pageNo |
Query/Form |
Optional |
Integer |
The number of page to be returned, starting from 1. |
Response Content Type¶
application/json; charset = UTF-8
Response Parameters¶
Name |
To Return Definitely/Conditionally |
Data Type |
Description |
---|---|---|---|
data |
Definitely |
PointValue Struct |
Describe the details of the point. See PointValue Struct. |
pagination |
Definitely |
Pagination Struct |
Describe the pagination information. See Pagination Struct. |
PointValue Struct ¶
Name |
To Return Definitely/Conditionally |
Data Type |
Description |
---|---|---|---|
value |
Definitely |
Integer/Double/String |
The value of the measurement point. |
timestamp |
Definitely |
Long |
The latest data timestamp (UNIX time). |
localtime |
Definitely |
String |
The latest data timestamp in local time format. |
attributes |
Conditionally |
Object |
Describe the attributes of the measurement point. |
Pagination Struct ¶
Name |
To Return Definitely/Conditionally |
Data Type |
Description |
---|---|---|---|
pageNo |
Definitely |
Integer |
The number of page to be returned, starting from 1. |
pageSize |
Definitely |
Integer |
The number of the returned records on a single page. |
totalSize |
Definitely |
Integer |
The total number of the returned records. |
Response Codes¶
Samples¶
Request Sample¶
GET https://{api-gateway}/cds-realtime-service/v1.0/measurement-point/latest?action=query&orgId=yourOrgId&mdmIds=yourMdmId&pointIds=yourPointId
Response Sample¶
{
"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"
}