Retrieve function

async AsyncCogniteClient.functions.retrieve(
id: int | None = None,
external_id: str | None = None,
) Function | None

Retrieve a single function by id.

Parameters:
  • id (int | None) – ID

  • external_id (str | None) – External ID

Returns:

Requested function or None if it does not exist.

Return type:

Function | None

Examples

Get function by id:

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

Get function by external id:

>>> res = client.functions.retrieve(external_id="abc")