TSDB Data Service Overview¶
TSDB-based asset data service. The asset refers to the object after the model is instantiated. The asset data refers to the data sent by the measurement point of the asset. Currently, EnOS TSDB database can store the following asset data:
Original data of AI measurement points
Minute-level normalized data of AI measurement points
Device status (DI) data
Generic data
Power consumption/production data
For more information about TSDB storage, see Managing Time Series Data.
For the above data types, the TSDB service provides the following interfaces for developers to invoke for data and application development.
API List¶
Operation Name |
Description |
---|---|
Filter and query the latest data of a single measurement point on multiple devices. Numeric and string supported as the data types for query. |
|
Get the original AI data (or aggregated data) of a specified measurement point of a specified device within a certain period. |
|
Get the original AI data of a specified measurement point of a specified device within a certain period. |
|
Get the accumulated power consumption/production data of a specified device from 00:00 (local time) to current time. |
|
Get the status (DI) data of a specified device within a certain period. |
|
Get the duration of different status (DI) data of a specified device within a certain period. |
|
Get the power consumption/production data of a specified device within a certain period. |
|
Get the generic data of a specified measurement point of a specified device within a certain period. |
|
Get the latest data of all measurement points of a specified device. |
|
Get the original data of a specified measurement point of a specified device within a certain period (including AI, DI, and Generic data types). |
Common Error Codes¶
Code |
Error Information |
Description |
---|---|---|
0 |
Success |
Success |
You do not have permission for the following assets |
The current application does not have access permissions to the following devices |
|
400 |
Exception: Invalid param accessKey |
Error occurs with the parameter |
xxx is required |
The parameter xxx cannot be null |
|
All asset authentication failed |
The current application does not have access permissions for all queried devices |
|
Invalid Argument |
Invalid or missing parameters |
|
modelId permission denied! |
Invalid or missing modelId |
|
430 |
The result set is too large. Failed to call the service |
|
701 |
Service error |
|
702 |
Params startTime[] or endTime[] is invalid, and date format of them should be consistent |
Time format error. The local time format is YYYY-MM-DD HH:MM:SS; Timezone information is required for UTC time format, e.g. 2019-06-01T00:00:00+08:00 |
xxx cannot be null or negative |
The parameter xxx cannot be null or negative |
|
xxx is empty |
The parameter xxx cannot be null |
|
only one xxx is allowed |
At most one parameter xxx is allowed |
|
assetIds size* measurement points size* pageSize is too large to query, result size may exceed RPC limit |
The result set of a single query is too large |
|
param xxx is invalid |
The parameter xxx is invalid |
|
endTime should not be later than startTime |
The query end time should be later than the start time |
|
is not a valid integer |
The parameter is not a valid integer |
|
assetIds or measurement point does not match the model |
Device or measurement point does not match with the model |
|
Please config/check storage group for org[] and model[] |
The storage policy is not configured or the modelId is incorrect |