PostTimeSeries#
- class fews_py_wrapper._api.endpoints.PostTimeSeries[source]#
- static endpoint_function(*, client, body=<fews_openapi_py_client.types.Unset object>, filter_id=<fews_openapi_py_client.types.Unset object>, convert_datum=<fews_openapi_py_client.types.Unset object>)#
Timeseries will be written that are part of the timeseries sets defined by the filters
Timeseries will be written that are part of the timeseries sets defined by the filters. The
application/x-www-form-urlencoded encoding has to be used. Readonly mode has to be disable in the FewsPiService.properties to allow this functionality.<p>The timeseries you post to the rest service should match one of the time series sets in the default filter or one of its sub filters. To make sure you only write time series for a specific filter, you can pass a filterId with the POST request. Only timeseries that have timeseries sets that are configured in that filter (or one of its sub filters) will be accepted. If no filterId is used, all time series will be accepted that are configured in the default filter. Writing the time series works similar to importing time series using the pi.xml format using the "PI" import type. See also: <a target=’_new’ href=’https://publicwiki.deltares.nl/x/uIGE’>Delft-Fews Published Interface timeseries Format (PI) Import</a>
The ‘convertDatum’ argument is to allow timeseries that support a datum to have their values converted to a value relative to the location height. If values are already relative to location then enter FALSE or omit.
In case a time series already exists in the database, the time series will be overwritten by the ones that are posted. For forecast time series with different forecastDates a new time series will be added. The latter can be achieved by providing a forecastDate element in the POST request, e.g. <forecastDate date="2013-01-01" time="00:00:00"/>.
- Parameters:
filter_id (str | Unset)
convert_datum (PosttimeseriesConvertDatum | Unset)
body (PosttimeseriesBody | 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 response content based on the returned content type.
- Return type:
dict[str, Any] | bytes | str