Retrieve multiple relationships by external id
- async AsyncCogniteClient.relationships.retrieve_multiple(
- external_ids: SequenceNotStr[str],
- fetch_resources: bool = False,
- ignore_unknown_ids: bool = False,
Retrieve multiple relationships by external id.
- Parameters:
external_ids (SequenceNotStr[str]) – External IDs
fetch_resources (bool) – If true, will try to return the full resources referenced by the relationship in the source and target fields.
ignore_unknown_ids (bool) – Ignore IDs and external IDs that are not found rather than throw an exception.
- Returns:
The requested relationships.
- Return type:
Examples
Get relationships by external id:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> res = client.relationships.retrieve_multiple(external_ids=["abc", "def"])