API functions: Data Series
API function for data series operations
You can create and store a custom data series which consists of a list of dates and their associated values. You can then use these series in your rules as explained here . There are 3 operations to create or update, delete or upload data to a custom data series.
Data Series Functions | |
---|---|
data_series_create_update | Create or update a data series. |
data_series_delete | Deletes a data series and the data associated with it. |
data_series_upload | Upload the series data. |
data_series_create_update()
Wrapper for POST /dataSeries
Create or update a data series. To create a new series omit the id parameter. The id of the newly created series is returned.
p123api.Client().data_series_create_update({
name : 'Name of Series',
# ID of the data series to update, omit to create new one
id : N,
# optional parameters
description : 'Series description optional'
})
data_series_delete()
Wrapper for DELETE /dataSeries/{id}
Deletes a data series and the data associated with it.
p123api.Client().data_series_delete(
series_id = N
)
data_series_upload()
Wrapper for POST /dataSeries/upload/{id}
Upload the series data. Data must be tabular with date and value in each row.
p123api.Client().data_series_upload(
file = 'C:/MyPath/SeriesData.csv',
series_id = id of series,
#
# Optional parameters
existing_data = 'overwrite' | 'skip' | 'delete',
date_format = 'yyyy-mm-dd' | 'yyyy/mm/dd' | 'mm/dd/yyyy' |
'mm-dd-yyyy' | 'dd/mm/yyyy' | 'dd-mm-yyyy' | 'dd.mm.yyyy',
decimal_separator = '.' | ',',
ignore_errors = False | True,
ignore_duplicates = False | True,
contains_header_row = False | True,
)
Go to:
All p123api functions
Technical API reference
Did this answer your question?