Endpoints to Retrieve Data

post

Sends a query to the computer, describing a table, to be parsed and evaluated.

Authorizations
AuthorizationstringRequired

The identity provider authentication token.

Path parameters
assetIdstringRequired

Asset instance ID.

Query parameters
orientationstringRequired

Represents how the Back End wants the response back.

Example: list_of_dicts or dict_of_lists
Body
fromstringOptional

Begin of the time range.

Example: 2023-01-01T00:00:00.000Z
tostringOptional

End of the time range.

Example: 2023-01-01T00:00:00.001Z
resamplestringOptional

Temporal interval to resample for, but it can also be a column. In this case all continuous values for that column are grouped togheter. When a resample is done , the resampled key is returned togheter with timeStart and timeEnd. They represen the start and end timestamp of the resampled interval.

Example: state or 1D
maxPointsToReturnintegerOptional

It indicates the number of max values that have to be returned when resample is null.

Example: 200
operationstringOptional

An operation that has to be applied to every requested column. The same behaviour can be obtained by specifying the operation for each column.

Example: sum
fillstringOptional

It can be 'None', which means that I do not want any fill operation done on data, or 'null', which means that I want the data to be filled with None values.

Example: None
subAssetIdstringOptional

It allows to specify the machine code of a principal machine's component (multi machine case) to retrieve only its data.

Example: Line2
timezonestringOptional

Timezone to use to apply resampling.

Example: Europe/Berlin
filtersobjectOptional

Contains the filters that have to be applied to the data to be returned.

Example: {"and":[{"or":[{"tableName.tableColumn":"something"},{"tableName.tableColumn":1},{"tableName.tableColumn":"somethingelse"}]},{"and":[{"tableName.tableColumn":{"<":27}},{"tableName.tableColumn":{"=":"xyz"}},{"tableName.tableColumn":{">=":"300"}}]}]}
childTablesobjectOptional

Dict which represent tables that can be computer by the DM using some conditions and can then be used to calculate expressions.

limitintegerOptional

How many values have to be taken from the returning table. Es. 1 means only the last value has to be taken.

Example: 3
orderBystringOptional

How returned data should be ordered.

Example: DESC or ASC
groupByobjectOptional

List of column names that the Data Manager should use to organize data. All the tables specified in the column parameter should contain the column names specified here. In output there is a dict where the keys represent the values assumed by the groupby field, the values are list_of_dicts or dict_of_lists representing the tables, as specified in orientation.

calendarbooleanOptional

Boolean to flag if it is required to apply calendar.

checkTimeIntervalExtremesstringOptional

Allows to indicate how to check for data at the extremes of the specified time interval (from - to). Accepted values = 'narrow' -> do not check extremes, 'wide' -> check both extremes 'left' -> check only left extreme (from) 'right' -> check only right extreme (to)

Responses
chevron-right
200

OK

Responseany

This is an example of a response from the data manager when requested to format its response using lists of dictionaries.

Example: [{"groupByValues":{"groupBy1":"value1","groupBy2":"value1"},"resampling":false,"noShiftPlanned":false,"timeserie":[{"_time":"time1","col1":"val11","col2":"val21","cal3":"val31"},{"_time":"time2","col1":"val12","col2":"val22","col3":"val32"},{"_time":"time3","col1":"val13","col2":"val23","col3":"val33"}],"scalars":{"col1":"val_scal1","col2":"val_scal2","col3":"val_scal3"}},{"groupByValues":{"groupBy1":"value2","groupBy2":"value2"},"noShiftPlanned":false,"resampling":true,"table":[{"_time":"time1","col1":"val11","col2":"val21","cal3":"val31"},{"_time":"time2","col1":"val12","col2":"val22","col3":"val32"},{"_time":"time3","col1":"val13","col2":"val23","col3":"val33"},{"_time":"time4","col1":"val14","col2":"val24","col3":"val34"}],"scalars":{"col1":"val_scal1","col2":"val_scal2","col3":"val_scal3"}}]
post
/computer/{assetId}
post

Sends a query to the computer, describing a complex table of data that has to be computed using data from different assets.

Authorizations
AuthorizationstringRequired

The identity provider authentication token.

Query parameters
orientationstringRequired

represents how the Back End wants the response back.

Example: list_of_dicts or dict_of_lists
Body
subAssetIdstringOptional

This is present when the machine/asset is composed of more lines.

fromstringOptional

Begin of the time range.

Example: 2023-01-01T00:00:00.000Z
tostringOptional

End of the time range.

Example: 2023-01-01T00:00:00.001Z
resamplestringOptional

Temporal interval to resample for, but it can also be a column. In this case all continuous values for that column are grouped togheter. When a resample is done , the resampled key is returned togheter with timeStart and timeEnd. They represen the start and end timestamp of the resampled interval.

Example: state or 1D
maxPointsToReturnintegerOptional

It indicates the number of max values that have to be returned when resample is null.

Example: 200
operationstringOptional

An operation that has to be applied to every requested column. The same behaviour can be obtained by specifying the operation for each column.

Example: sum
fillstringOptional

It can be 'None', which means that I do not want any fill operation done on data, or 'null', which means that I want the data to be filled with None values.

Example: None
timezonestringOptional

Timezone to use to apply resampling.

Example: Europe/Berlin
filtersobjectOptional

Contains the filters that have to be applied to the data to be returned.

Example: {"and":[{"or":[{"tableName.tableColumn":"something"},{"tableName.tableColumn":1},{"tableName.tableColumn":"somethingelse"}]},{"and":[{"tableName.tableColumn":{"<":27}},{"tableName.tableColumn":{"=":"xyz"}},{"tableName.tableColumn":{">=":"300"}}]}]}
childTablesobjectOptional

Dict which represent tables that can be computer by the DM using some conditions and can then be used to calculate expressions.

limitintegerOptional

How many values have to be taken from the returning table. Es. 1 means only the last value has to be taken.

Example: 3
orderBystringOptional

How returned data should be ordered.

Example: DESC or ASC
groupByobjectOptional

List of column names that the Data Manager should use to organize data. All the tables specified in the column parameter should contain the column names specified here. In output there is a dict where the keys represent the values assumed by the groupby field, the values are list_of_dicts or dict_of_lists representing the tables, as specified in orientation.

calendarbooleanOptional

Boolean to flag if it is required to apply calendar.

checkTimeIntervalExtremesstringOptional

Allows to indicate how to check for data at the extremes of the specified time interval (from - to). Accepted values = 'narrow' -> do not check extremes, 'wide' -> check both extremes 'left' -> check only left extreme (from) 'right' -> check only right extreme (to)

Responses
chevron-right
200

OK

Responseany

This is an example of a response from the data manager when requested to format its response using lists of dictionaries.

Example: [{"groupByValues":{"groupBy1":"value1","groupBy2":"value1"},"resampling":false,"noShiftPlanned":false,"timeserie":[{"_time":"time1","col1":"val11","col2":"val21","cal3":"val31"},{"_time":"time2","col1":"val12","col2":"val22","col3":"val32"},{"_time":"time3","col1":"val13","col2":"val23","col3":"val33"}],"scalars":{"col1":"val_scal1","col2":"val_scal2","col3":"val_scal3"}},{"groupByValues":{"groupBy1":"value2","groupBy2":"value2"},"noShiftPlanned":false,"resampling":true,"table":[{"_time":"time1","col1":"val11","col2":"val21","cal3":"val31"},{"_time":"time2","col1":"val12","col2":"val22","col3":"val32"},{"_time":"time3","col1":"val13","col2":"val23","col3":"val33"},{"_time":"time4","col1":"val14","col2":"val24","col3":"val34"}],"scalars":{"col1":"val_scal1","col2":"val_scal2","col3":"val_scal3"}}]
post
/computer

Last updated