TSDB Data Service Overview¶
The EnOS Time Series Database (TSDB) data service provides the interfaces listed below for developers to invoke for data and application development. EnOS TSDB provides efficient and stable storage management for time series data that is ingested from devices or generated by the stream processing engine. Currently, EnOS TSDB can store the following types of 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.
API List¶
API Name |
Description |
---|---|
Filter and query the latest data of a single measurement point for multiple devices. |
|
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). |
Request Method¶
TSDB Data Service supports both the GET and POST methods:
GET: The request parameters are included in the request URL, which can be used for requests with less parameters.
POST: The request parameters are included in the request body, which can be used for requests with long parameters (e.g., when querying data of multiple assets).
The API documentation provides reference for both the GET and POST methods.
Common Error Codes¶
Code |
Error Information |
Description |
---|---|---|
0 |
Success |
API request is successful. |
400 |
Invalid param error |
Parameters or parameter values are not valid. For details, refer to the error messages. |
701 |
Sata service ERROR |
An exception occurs with the data service. |
702 |
An error occurred when execute query in data service. |
Data query failed due to error of the data service. Please try again later. |