Retrieve a time series by id
- async AsyncCogniteClient.time_series.retrieve(
- id: int | None = None,
- external_id: str | None = None,
- instance_id: NodeId | None = None,
Retrieve a single 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:
id (int | None) – ID
external_id (str | None) – External ID
instance_id (NodeId | None) – Instance ID
- Returns:
Requested time series or None if it does not exist.
- Return type:
TimeSeries | None
Examples
Get time series by id:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> res = client.time_series.retrieve(id=1)
Get time series by external id:
>>> res = client.time_series.retrieve(external_id="1")