About TSDB Data Service API V2.1


This version is available for the EnOS 2.1.3 update and later releases. For the previous version, see V2.0.


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

  • Device status duration data

  • Generic data

  • Power consumption/production data


For more information about TSDB storage, see Time Series Data Management.


Refer to the table below for the list of APIs, and whether they can be used by EnOS Cloud and EnOS Edge.


API List

API Name

Description

EnOS Cloud

EnOS Edge

Filter Asset Latest Data

Filter and query the latest data of a single measurement point for multiple devices.

Get Asset AI Data with Aggregation Logic

Get the original AI data (or aggregated data) of a specified measurement point of a specified device within a certain period.

Get Asset AI Raw Data

Get the original AI data of a specified measurement point of a specified device within a certain period.

Get Asset Current Day Electric Power

Get the accumulated power consumption/production data of a specified device from 00:00 (local time) to current time.

Get Asset DI Data

Get the status (DI) data of a specified device within a certain period.

Get Asset DI Data Duration

Get the duration of different status (DI) data of a specified device within a certain period.

Get Asset Electric Power Data

Get the power consumption/production data of a specified device within a certain period.

Get Asset Generic Data

Get the generic data of a specified measurement point of a specified device within a certain period.

Get Asset Latest Data

Get the latest data of specified measurement points of a specified device.

Get Asset Raw Data By Time Range

Get the original data of a specified measurement point of a specified device within a certain period (including AI, DI, and Generic data types).

Get Asset Unformatted Data

Get unformatted original data of specified measurement point of specified devices within a certain period.

×

Delete Asset Latest Data

Delete the latest data of specified measurement points of a specified device.

×

Get Last Changed Data

Get the last changed data of the specified measurement points of specified devices.

Check Dead Data

Check whether data of the specified measurement point of specified device is dead data and return the last changed data of the measurement point.

Submit Data Deletion Job

Submit a data deletion job to delete the historical data of specified assets stored in TSDB.

×

Get Data Deletion Details

Get the operation results of the data cleaning task.

×

Resubmit Data Deletion Job

When a data deletion job fails, resubmit the job by specifying the data deletion job ID.

×

Delete Point Metadata

Delete unnecessary measurement in TSDB Schema.

×

Get Asset Unified Raw Data

Query Standard Data and Non-Standard Data.

×

Request Method

TSDB Data Service support POST method. Except for the orgId parameter, the request parameters are included in the request body in the format of JSON.

Recommend Poseidon version:

<dependency>
    <groupId>com.envisioniot</groupId>
    <artifactId>apim-poseidon</artifactId>
    <version>0.1.14</version>
</dependency>

Common Error Codes

Code

Message

Description

0

OK

API request is successful.

80400

Invalid param error

Invalid One or more parameters are invalid. For details, see the error message.

80401

Assset unauthorized

The SA does not have access permission to assets. Check the authorization to the application SA.

80500

Internal server error

Internal server error.