Retrieve multiple time series by id
- async AsyncCogniteClient.time_series.retrieve_multiple(
- ids: Sequence[int] | None = None,
- external_ids: SequenceNotStr[str] | None = None,
- instance_ids: Sequence[NodeId] | None = None,
- ignore_unknown_ids: bool = False,
Retrieve multiple time series by id.
Deprecated since version 8.23.0: The (asset-centric) Time Series API is deprecated and is scheduled for removal on 2027-12-31. Create and query time series as CogniteTimeSeries instances in the core data model (data point operations remain available via instance_id). See https://docs.cognite.com/cdf/deprecated for details and migration guidance.
- Parameters:
ids (Sequence[int] | None) – IDs
external_ids (SequenceNotStr[str] | None) – External IDs
instance_ids (Sequence[NodeId] | None) – Instance IDs
ignore_unknown_ids (bool) – Ignore IDs and external IDs that are not found rather than throw an exception.
- Returns:
The requested time series.
- Return type:
Examples
Get time series by id:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> res = client.time_series.retrieve_multiple(ids=[1, 2, 3])
Get time series by external id:
>>> res = client.time_series.retrieve_multiple(external_ids=["abc", "def"])