Retrieve a sequence by id

async AsyncCogniteClient.sequences.retrieve(
id: int | None = None,
external_id: str | None = None,
) Sequence | None

Retrieve a single sequence by id.

Parameters:
  • id (int | None) – ID

  • external_id (str | None) – External ID

Returns:

Requested sequence or None if it does not exist.

Return type:

Sequence | None

Examples

Get sequence by id:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> res = client.sequences.retrieve(id=1)

Get sequence by external id:

>>> res = client.sequences.retrieve()