TimeSeries#
- class fews_py_wrapper._api.endpoints.TimeSeries[source]#
- static endpoint_function(*, client, filter_id=<fews_openapi_py_client.types.Unset object>, location_ids=<fews_openapi_py_client.types.Unset object>, parameter_ids=<fews_openapi_py_client.types.Unset object>, module_instance_ids=<fews_openapi_py_client.types.Unset object>, qualifier_ids=<fews_openapi_py_client.types.Unset object>, task_run_ids=<fews_openapi_py_client.types.Unset object>, statistical_function=<fews_openapi_py_client.types.Unset object>, percentile_exceedance=<fews_openapi_py_client.types.Unset object>, percentil_non_exceedance=<fews_openapi_py_client.types.Unset object>, start_time=<fews_openapi_py_client.types.Unset object>, end_time=<fews_openapi_py_client.types.Unset object>, before_start_time_count=<fews_openapi_py_client.types.Unset object>, after_end_time_count=<fews_openapi_py_client.types.Unset object>, start_creation_time=<fews_openapi_py_client.types.Unset object>, end_creation_time=<fews_openapi_py_client.types.Unset object>, forecast_count=<fews_openapi_py_client.types.Unset object>, start_forecast_time=<fews_openapi_py_client.types.Unset object>, end_forecast_time=<fews_openapi_py_client.types.Unset object>, lead_time=<fews_openapi_py_client.types.Unset object>, external_forecast_times=<fews_openapi_py_client.types.Unset object>, ensemble_id=<fews_openapi_py_client.types.Unset object>, ensemble_member_id=<fews_openapi_py_client.types.Unset object>, time_step_id=<fews_openapi_py_client.types.Unset object>, thinning=<fews_openapi_py_client.types.Unset object>, export_id_map=<fews_openapi_py_client.types.Unset object>, export_unit_conversion_id=<fews_openapi_py_client.types.Unset object>, time_zone_name=<fews_openapi_py_client.types.Unset object>, time_series_ids=<fews_openapi_py_client.types.Unset object>, default_request_parameters_id=<fews_openapi_py_client.types.Unset object>, resampling_method=<fews_openapi_py_client.types.Unset object>, resampling_time_step_id=<fews_openapi_py_client.types.Unset object>, resampling_omit_missing=<fews_openapi_py_client.types.Unset object>, download_as_file=<fews_openapi_py_client.types.Unset object>, match_as_qualifier_set=<fews_openapi_py_client.types.Unset object>, import_from_external_data_source=<fews_openapi_py_client.types.Unset object>, convert_datum=<fews_openapi_py_client.types.Unset object>, convert_values_to_enumeration_labels=<fews_openapi_py_client.types.Unset object>, show_ensemble_member_ids=<fews_openapi_py_client.types.Unset object>, use_display_units=<fews_openapi_py_client.types.Unset object>, show_thresholds=<fews_openapi_py_client.types.Unset object>, omit_missing=<fews_openapi_py_client.types.Unset object>, omit_empty_time_series=<fews_openapi_py_client.types.Unset object>, omit_original_reliable=<fews_openapi_py_client.types.Unset object>, omit_original_doubtful=<fews_openapi_py_client.types.Unset object>, omit_original_unreliable=<fews_openapi_py_client.types.Unset object>, omit_completed_reliable=<fews_openapi_py_client.types.Unset object>, omit_completed_doubtful=<fews_openapi_py_client.types.Unset object>, omit_completed_unreliable=<fews_openapi_py_client.types.Unset object>, omit_corrected_reliable=<fews_openapi_py_client.types.Unset object>, omit_corrected_doubtful=<fews_openapi_py_client.types.Unset object>, omit_corrected_unreliable=<fews_openapi_py_client.types.Unset object>, only_manual_edits=<fews_openapi_py_client.types.Unset object>, only_headers=<fews_openapi_py_client.types.Unset object>, only_forecasts=<fews_openapi_py_client.types.Unset object>, show_statistics=<fews_openapi_py_client.types.Unset object>, use_milliseconds=<fews_openapi_py_client.types.Unset object>, show_products=<fews_openapi_py_client.types.Unset object>, time_series_type=<fews_openapi_py_client.types.Unset object>, document_format=<fews_openapi_py_client.types.Unset object>, document_version=<fews_openapi_py_client.types.Unset object>)#
Get timeseries that are part of the default filter
Get timeseries that are part of the default filter. The HEAD request is also supported. It is
recommended to use the HEAD request when using the taskRunIds parameter to check if the timeseries are available before using the GET request<p><h2>parameters</h2> Not all parameters can be combined. The following combinations are commonly used valid combinations of parameters. The main way to filter timeseries is by using filter ids or taskrun ids.<p> <table border=’1’>
- <tr>
<th>Use cases</th> <th>filterId</th> <th>taskRunIds</th> <th>startTime, endTime</th> <th>startCreationTime, endCreationTime</th> <th>startForecastTime, endForecastTime</th>
</tr> <tr>
<td>Apply a filter to the time series. The requested period will be set to the current time
- minus one day and one hour ago until the current time plus one day and one hour</td>
<td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td></td> <td></td> <td></td>
</tr> <tr>
<td>Get all time series created by one or more taskRuns. All time steps of the matching time
- series are returned.</td>
<td></td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td></td> <td></td>
</tr> <tr>
<td>Get the time series created by a taskrun and apply a filter from the Filters
configuration. startTime and endTime cannot be specified. The complete time series will be returned. Since
2020.01.
</td> <td style="background-color: LightGray; text-align: center;"> X</td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td></td> <td></td>
</tr> <tr>
<td>Apply a filter to the time series and return time steps that are in the startTime and
endTime range. If the startTime or endTime doesn’t match a timestamp of the time series, the closest time step before startTime and/or after endTime is returned as well.</td>
<td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td></td>
</tr> <tr>
<td>Apply a filter to the time series. Only time series created during the startCreationTime
- and endCreationTime period will be returned. All time steps of the matching time series are
returned.
</td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td></td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td>
</tr> <tr>
<td>Apply a filter to the time series. Return only time series created during the creation
- time period. Only return timesteps in the startTime and endTime range.</td>
<td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td style="background-color: LightGray; text-align: center;"> X</td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td>
</tr> <tr>
<td>Apply a filter to the time series. Return only time series with external forecast times
- in the startForecastTime and endForecastTime period. Only return timesteps in the startTime and
endTime range.
</td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td style="background-color: LightGray; text-align: center;"> X</td>
</tr> <tr>
<td>Apply a filter to the time series. Return only time series with external forecast times
- in the startForecastTime and endForecastTime period that were created in the creation time period.
Only return time steps in the startTime and endTime range.
</td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td style="background-color: LightGray; text-align: center;"> X</td> <td style="background-color: LightGray; text-align: center;"> X</td> <td style="background-color: LightGray; text-align: center;"> X</td>
</tr> <tr>
<td>Apply a filter to the time series. Return only time series created during the creation
- time period. All time steps of the matching time series are returned. (before 2020.01 startTime and
endTime had to be specified).
</td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td></td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td>
</tr> <tr>
<td>Apply a filter to the time series. Return only time series with external forecast times
- in the startForecastTime and endForecastTime period. All time steps of the matching time series are
returned.
</td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td></td> <td></td> <td style="background-color: LightGray; text-align: center;"> X</td>
</tr> <tr>
<td>Apply a filter to the time series. Return only time series created during the creation
time period and with external forecast times in the startForecastTime and endForecastTime period. All
time steps of the matching time series are returned..
</td> <td style="background-color: LightGray; text-align: center;"> X</td> <td></td> <td></td> <td style="background-color: LightGray; text-align: center;"> X</td> <td style="background-color: LightGray; text-align: center;"> X</td>
</tr>
</table>
<h2>no data vs no time series</h2> If a timeseries query has matching timeseries sets a http 200 code will be returned and the headers of all matching time series sets will be returned. If there is any data for the requested period, the headers will be followed by the actual events that contain the data. So even if no data is available at all the headers are always returned.
It is also possible that a timeseries query doesn’t match any time series sets at all. This is seen as in invalid request and will result in a HTTP 400 response code. The following are examples of use cases where this might occur: <ul>
<li>query parameters don’t occur in filter. For example: the default filter has subfilters:
filterA and filterB. filterA contains timeseries sets with module instance id moduleInstanceA and filterB contains timeseries sets with module instance id moduleInstanceB.
If a timeseries query is done with parameters: filterId=filterA and
- moduleInstanceId=moduleInstanceB, this will return in a HTTP 400 response</li>
<li>no timeseries for creation period. For example: if a query is using startCreationTime and
endCreationTime and no time series have been produced during that period, this is seen as an invalid request and a HTTP 400 response is returned.</li> </ul>
<h2>availability of new timeseries</h2> When new timeseries have been created, it can take some time before they can be found by the WebServices. The web services updates its indexes every second (every five seconds before 2023.01). Once the indexes have been updated, newly created time series can be found. So it typically can take a few seconds before newly created time series can be found. <h3>array of string</h3> For an array of strings the query parameter can be repeated, or added once with values in a comma separated fashion
- Parameters:
filter_id (str | Unset)
location_ids (list[str] | Unset) – The parameter can be repeated
parameter_ids (list[str] | Unset) – The parameter can be repeated
module_instance_ids (list[str] | Unset) – The parameter can be repeated
qualifier_ids (list[str] | Unset) – The parameter can be repeated
task_run_ids (list[str] | Unset) – The parameter can be repeated
statistical_function (str | Unset)
percentile_exceedance (str | Unset)
percentil_non_exceedance (str | Unset)
start_time (str | Unset) – Date-time string that adheres to RFC 3339. Example: 2020-03-18T15:00:00Z.
end_time (str | Unset) – Date-time string that adheres to RFC 3339. Example: 2020-03-18T15:00:00Z.
before_start_time_count (str | Unset) – Example: 5.
after_end_time_count (str | Unset) – Example: 5.
start_creation_time (str | Unset) – Date-time string that adheres to RFC 3339. Example: 2020-03-18T15:00:00Z.
end_creation_time (str | Unset) – Date-time string that adheres to RFC 3339. Example: 2020-03-18T15:00:00Z.
forecast_count (str | Unset) – Example: 1.
start_forecast_time (str | Unset) – Date-time string that adheres to RFC 3339. Example: 2020-03-18T15:00:00Z.
end_forecast_time (str | Unset) – Date-time string that adheres to RFC 3339. Example: 2020-03-18T15:00:00Z.
lead_time (str | Unset) – Example: 3600000.
external_forecast_times (list[str] | Unset) – The parameter can be repeated Example: 2020-03-18T15:00:00Z.
ensemble_id (str | Unset)
ensemble_member_id (str | Unset)
time_step_id (str | Unset)
thinning (str | Unset) – Example: 15408668.
export_id_map (str | Unset)
export_unit_conversion_id (str | Unset)
time_zone_name (str | Unset)
time_series_ids (list[str] | Unset) – The parameter can be repeated
default_request_parameters_id (str | Unset)
resampling_method (TimeseriesResamplingMethod | Unset)
resampling_time_step_id (str | Unset)
resampling_omit_missing (TimeseriesResamplingOmitMissing | Unset)
download_as_file (str | Unset)
match_as_qualifier_set (TimeseriesMatchAsQualifierSet | Unset)
import_from_external_data_source (TimeseriesImportFromExternalDataSource | Unset)
convert_datum (TimeseriesConvertDatum | Unset)
convert_values_to_enumeration_labels (TimeseriesConvertValuesToEnumerationLabels | Unset)
show_ensemble_member_ids (TimeseriesShowEnsembleMemberIds | Unset)
use_display_units (TimeseriesUseDisplayUnits | Unset)
show_thresholds (TimeseriesShowThresholds | Unset)
omit_missing (TimeseriesOmitMissing | Unset)
omit_empty_time_series (TimeseriesOmitEmptyTimeSeries | Unset)
omit_original_reliable (TimeseriesOmitOriginalReliable | Unset)
omit_original_doubtful (TimeseriesOmitOriginalDoubtful | Unset)
omit_original_unreliable (TimeseriesOmitOriginalUnreliable | Unset)
omit_completed_reliable (TimeseriesOmitCompletedReliable | Unset)
omit_completed_doubtful (TimeseriesOmitCompletedDoubtful | Unset)
omit_completed_unreliable (TimeseriesOmitCompletedUnreliable | Unset)
omit_corrected_reliable (TimeseriesOmitCorrectedReliable | Unset)
omit_corrected_doubtful (TimeseriesOmitCorrectedDoubtful | Unset)
omit_corrected_unreliable (TimeseriesOmitCorrectedUnreliable | Unset)
only_manual_edits (TimeseriesOnlyManualEdits | Unset)
only_headers (TimeseriesOnlyHeaders | Unset)
only_forecasts (TimeseriesOnlyForecasts | Unset)
show_statistics (TimeseriesShowStatistics | Unset)
use_milliseconds (TimeseriesUseMilliseconds | Unset)
show_products (TimeseriesShowProducts | Unset)
time_series_type (TimeseriesTimeSeriesType | Unset)
document_format (TimeseriesDocumentFormat | Unset)
document_version (str | Unset)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus – If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException – If the request takes longer than Client.timeout.
- Returns:
Response[Any]
- Return type:
Response[Any]
- execute(*, client, **kwargs)[source]#
Execute the API endpoint call.
- Parameters:
client (AuthenticatedClient | Client) – AuthenticatedClient or Client instance for API calls.
document_format – Format of the returned document.
**kwargs (Any) – Keyword arguments for the API call.
- Returns:
Parsed JSON response from the API.
- Return type:
dict