PredictionsApi
- class optimeering_beta.PredictionsApi(api_client=None)
Collection of methods to interact with PredictionsApi
- list_parameters(param, _request_timeout=None)
Parameter Route
Allowed values for each parameter used in filters on the predictions routes
- Parameters:
param (str) – (required)
- Returns:
Returns the result object.
- Return type:
object
- Example:
>>> from optimeering_beta import Configuration, OptimeeringClient >>> configuration = Configuration(host="https://beta.optimeering.com") >>> client = OptimeeringClient(configuration=configuration) >>> # Post data point - replace ... with correct dataformat documented above >>> response = client.predictions_api.list_parameters(...)
- list_series(id=None, product=None, unit_type=None, statistic=None, area=None, resolution=None, _request_timeout=None)
List Series
Returns prediction series.
To list versions of a series, use the
list_versionmethod.- Parameters:
id (List[StrictInt]) – ID of the series to retrieve. If not specified, will return all series.
product (List[StrictStr]) – The product for which series should be retrieved. If not specified, will return series for all products.
unit_type (List[StrictStr]) – Unit type. If not specified, will return series for all unit types.
statistic (List[StrictStr]) – Statistic type. If not specified, will return series for all statistic types.
area (List[StrictStr]) – The name of the area. If not specified, will return all areas.
resolution (List[StrictStr]) – Resolution of the series. If not specified, will return series for all resolutions.
- Returns:
Returns the result object.
- Return type:
- Example:
>>> from optimeering_beta import Configuration, OptimeeringClient >>> configuration = Configuration(host="https://beta.optimeering.com") >>> client = OptimeeringClient(configuration=configuration) >>> # Get filtered data point - replace ... with appropriate filters documented above >>> response = client.predictions_api.list_series(...)
- list_version(id=None, product=None, unit_type=None, statistic=None, area=None, resolution=None, limit=None, offset=None, _request_timeout=None)
List Series Version
Returns prediction series and their versions.
- Parameters:
id (str) – ID of the series to retrieve. If not specified, will return all series.
product (str) – The product for which series should be retrieved. If not specified, will return series for all products.
unit_type (str) – Unit type. If not specified, will return series for all unit types.
statistic (str) – Statistic type. If not specified, will return series for all statistic types.
area (str) – The name of the area. If not specified, will return all areas.
resolution (str) – Resolution of the series. If not specified, will return series for all resolutions.
limit (int) – Number of items per page
offset (int) – Page offset
- Returns:
Returns the result object.
- Return type:
- Example:
>>> from optimeering_beta import Configuration, OptimeeringClient >>> configuration = Configuration(host="https://beta.optimeering.com") >>> client = OptimeeringClient(configuration=configuration) >>> # Post data point - replace ... with correct dataformat documented above >>> response = client.predictions_api.list_version(...)
- retrieve(series_id=None, start=None, end=None, _request_timeout=None)
Retrieve
Returns predictions.
If multiple versions of a prediction exist for a given series, the highest version is returned.
To get predictions for a particular version, use the
retrieve_versionedmethod.- Parameters:
series_id (List[StrictInt]) – Series ID to filter. If not specified, will return all series.
start (Start) – The first datetime to fetch (inclusive). Defaults to 1970-01-01 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
end (End) – The last datetime to fetch (exclusive). Defaults to 2999-12-30 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
- Returns:
Returns the result object.
- Return type:
- Example:
>>> from optimeering_beta import Configuration, OptimeeringClient >>> configuration = Configuration(host="https://beta.optimeering.com") >>> client = OptimeeringClient(configuration=configuration) >>> # Get filtered data point - replace ... with appropriate filters documented above >>> response = client.predictions_api.retrieve(...)
- retrieve_latest(max_event_time=None, series_id=None, _request_timeout=None)
Retrieve Latest
Returns predictions with the most recent
event_time.If multiple versions of a prediction exist for a given series, the highest version is returned.
To get predictions for a particular version, use the
retrieve_versionedmethod.- Parameters:
max_event_time (MaxEventTime) – If specified, will only return the latest prediction available at the specified time. If not specified, no filters are applied. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
series_id (List[StrictInt]) – Series ID to filter. If not specified, will return all series.
- Returns:
Returns the result object.
- Return type:
- Example:
>>> from optimeering_beta import Configuration, OptimeeringClient >>> configuration = Configuration(host="https://beta.optimeering.com") >>> client = OptimeeringClient(configuration=configuration) >>> # Get filtered data point - replace ... with appropriate filters documented above >>> response = client.predictions_api.retrieve_latest(...)
- retrieve_versioned(include_simulated=None, start=None, end=None, versioned_series=None, _request_timeout=None)
Retrive Versioned
Returns versioned predictions.
Use the
list_versionmethod to get the available versions for each prediction series.Can be used to retrieve both versioned and simulated data. For an explanation on versioned and simulated data see Prediction Versioning
- Parameters:
include_simulated (bool) – If false, filters out simulated prediction from response.
start (Start) – The first datetime to fetch (inclusive). Defaults to 1970-01-01 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
end (End) – The last datetime to fetch (exclusive). Defaults to 2999-12-30 00:00:00+0000. Should be specified in ISO 8601 datetime or duration format (eg - 2024-05-15T06:00:00+00:00, PT1H, -P1W1D)
versioned_series (Optional[List[VersionedSeries] | PredictionsVersionList])
- Returns:
Returns the result object.
- Return type:
- Example:
>>> from optimeering_beta import Configuration, OptimeeringClient >>> configuration = Configuration(host="https://beta.optimeering.com") >>> client = OptimeeringClient(configuration=configuration) >>> # Get filtered data point - replace ... with appropriate filters documented above >>> response = client.predictions_api.retrieve_versioned(...)