Delete relationships

async AsyncCogniteClient.relationships.delete(
external_id: str | SequenceNotStr[str],
ignore_unknown_ids: bool = False,
) → None

Delete one or more relationships.

Deprecated since version 8.23.0: The Relationships API is deprecated and is scheduled for removal on 2027-12-31. Model connections as edges or direct relations in the data modeling service. See https://docs.cognite.com/cdf/deprecated for details and migration guidance.

Parameters:
  • external_id (str | SequenceNotStr[str]) – External ID or list of external ids

  • ignore_unknown_ids (bool) – Ignore external IDs that are not found rather than throw an exception.

Examples

Delete relationships by external id:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> client.relationships.delete(external_id=["a", "b"])