Managing Units
Listing All Units
Section titled “Listing All Units”GET /repositories/{repository}/unitsReturns an array of all units stored in the repository.
Creating a Unit
Section titled “Creating a Unit”The intervalTransformationMethod value determines how data in this unit is aggregated when reading at a different interval (e.g., averaging power values vs. summing energy values).
Request
POST /repositories/{repository}/unitsRequest Body
{ "symbol": "A", "intervalTransformationMethod": 2}Loading a Specific Unit
Section titled “Loading a Specific Unit”GET /repositories/{repository}/units/{unit}The {unit} path segment is the unit symbol (e.g., W, kWh, A).
Updating a Unit
Section titled “Updating a Unit”Request
PUT /repositories/{repository}/units/{unit}Request Body
{ "symbol": "A", "intervalTransformationMethod": 1}Deleting a Unit
Section titled “Deleting a Unit”DELETE /repositories/{repository}/units/{unit}Time-Dependent Unit Conversions
Section titled “Time-Dependent Unit Conversions”Time-dependent unit conversions use a dedicated time series to store conversion factors that change over time (e.g., exchange rates). To retrieve all configured time-dependent unit conversions:
GET /repositories/{repository}/units/timedependentSince time-dependent unit conversions are nothing more than time series themselves, the assignment is of the type “assigning one time series to another”.
Listing Assigned Time Series
Section titled “Listing Assigned Time Series”GET /repositories/{repository}/timeSeries/{timeSeries}/assignments/timeSeriesCreating an Assignment
Section titled “Creating an Assignment”Request
POST /repositories/{repository}/timeSeries/{timeSeries}/assignments/timeSeriesRequest Body
{ "storageInformation": { "repositoryName": "string" }, "identifier": 2}Where the time series with the id == 2 is the conversion time series.
Updating Assignments
Section titled “Updating Assignments”The body must consist of a list of new assignments.
Request
PUT /repositories/{repository}/timeSeries/{timeSeries}/assignments/timeSeriesRequest Body
[ { "storageInformation": { "repositoryName": "TSM_SQLSERVER" }, "identifier": 3 }, { "storageInformation": { "repositoryName": "TSM_SQLSERVER" }, "identifier": 4 }]Removing All Assignments
Section titled “Removing All Assignments”DELETE /repositories/{repository}/timeSeries/{timeSeries}/assignments/timeSeriesRemoving a Specific Assignment
Section titled “Removing a Specific Assignment”DELETE /repositories/{repository}/timeSeries/{timeSeries}/assignments/timeSeries/{assignedTimeSeries}The last path segment accepts the name of the assigned time series or its ID prefixed with id:.
Time Series Without a Unit
Section titled “Time Series Without a Unit”A time series can be defined without a unit by omitting the unit property in the time series definition or setting it to null.