Retrieve multiple events by id
- async AsyncCogniteClient.events.retrieve_multiple(
- ids: Sequence[int] | None = None,
- external_ids: SequenceNotStr[str] | None = None,
- ignore_unknown_ids: bool = False,
Retrieve multiple events by id.
- Parameters:
ids (Sequence[int] | None) – IDs
external_ids (SequenceNotStr[str] | None) – External IDs
ignore_unknown_ids (bool) – Ignore IDs and external IDs that are not found rather than throw an exception.
- Returns:
The requested events.
- Return type:
Examples
Get events by id:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> res = client.events.retrieve_multiple(ids=[1, 2, 3])
Get events by external id:
>>> res = client.events.retrieve_multiple(external_ids=["abc", "def"])