Time Series Examples
This page shows a sequence of example PowerTSM HTTP API requests: creating a time series, assigning an attribute, creating a formula time series, and writing and reading time series data, including quotation data.
Save Time Series
Section titled “Save Time Series”Request
POST /repositories/TSM_SQLSERVER/timeSeriesRequest Body
{ "Name": "test", "Unit": { "identifier": "°C", "storageInformation": { "repositoryName": "TSM_SQLSERVER" } }, "Interval": { "Type": 3, "Multiplier": 1 }, "Cyclic": true, "FunctionType": 1}Assign Attribute
Section titled “Assign Attribute”Request
POST /repositories/TSM_SQLSERVER/timeSeries/test/assignments/attributesRequest Body
{ "identifier": 1, "storageInformation": { "repositoryName": "TSM_SQLSERVER" }}Save Unit to List Attribute Assignment
Section titled “Save Unit to List Attribute Assignment”Request
PUT /repositories/TSM_SQLSERVER/timeSeries/test/assignments/attributes/id:1/unitRequest Body
{ "identifier": 1, "storageInformation": { "repositoryName": "TSM_SQLSERVER" }}Send the same request with GET, to get the assigned list attribute unit.
Create Formula Time Series
Section titled “Create Formula Time Series”Request
POST /repositories/TSM_ORACLE/timeSeriesRequest Body
{ "Name": "formula_test1", "Unit": { "identifier": "°C", "storageInformation": { "repositoryName": "TSM_ORACLE" } }, "Interval": { "Type": 3, "Multiplier": 1 }, "Cyclic": true, "FunctionType": 1, "Formula": { "1971-12-31T23:00:00Z": " [id : 100006].Value * 2 " }}Save Data to Time Series
Section titled “Save Data to Time Series”Request
POST /repositories/TSM_SQLSERVER/timeSeries/test/dataRequest Body
{ "unit": { "identifier": "°C", "storageInformation": { "repositoryName": "TSM_SQLSERVER" } }, "interval": { "type": 4, "multiplier": 1 }, "cyclic": true, "function": 1, "timeZone": "W. Europe Standard Time", "data": [ { "time": "2024-12-19", "value": 100, "flag": 9 }, { "time": "2024-12-20", "value": 200, "flag": 9 }, { "time": "2024-12-21", "value": 300, "flag": 9 }, { "time": "2024-12-22", "value": 400, "flag": 9 } ]}Read Data of Time Series
Section titled “Read Data of Time Series”Request
GET /repositories/TSM_SQLSERVER/timeSeries/test/data?from=2024-12-19&to=2024-12-22Save Quotation Time Series Data Time Span
Section titled “Save Quotation Time Series Data Time Span”Request
POST /repositories/TSM_SQLSERVER/timeSeries/test/datatimespanRequest Body
[ { "value": 1.0, "flag": 9, "period": { "From": "2025-10-29T12:00:00Z", "To": "2025-10-29T13:00:00Z" } }, { "value": 0.1, "flag": 9, "period": { "From": "2025-10-29T13:00:00Z", "To": "2025-10-29T14:00:00Z" } }, { "value": 4.4, "flag": 9, "period": { "From": "2025-10-29T14:00:00Z", "To": "2025-10-29T15:00:00Z" } }]Was this page helpful?Thanks for your feedback!