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,
) TimeSeries | None

Retrieve a single time series by id.

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")