Delete ranges of datapoints

async AsyncCogniteClient.time_series.data.delete_ranges(
ranges: list[dict[str, Any]],
) None

Delete a range of datapoints from multiple time series.

Parameters:

ranges (list[dict[str, Any]]) – The list of datapoint ids along with time range to delete. See examples below.

Examples

Each element in the list ranges must be specify either id or external_id, and a range:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> ranges = [
...     {"id": 1, "start": "2d-ago", "end": "now"},
...     {"external_id": "abc", "start": "2d-ago", "end": "2d-ahead"},
... ]
>>> client.time_series.data.delete_ranges(ranges)