Skip to main content
POST
/
models
/
instances
/
delete
Python SDK
client.data_modeling.instances.delete(nodes=("mySpace", "myNode"))

from cognite.client.data_classes.data_modeling import NodeId, EdgeId
client.data_modeling.instances.delete(NodeId('mySpace', 'myNode'), EdgeId('mySpace', 'myEdge'))

from cognite.client.data_classes.data_modeling import NodeId, EdgeId
my_view = client.data_modeling.views.retrieve(('mySpace', 'myView'))
my_nodes = client.data_modeling.instances.list(instance_type='node', sources=my_view, limit=None)
client.data_modeling.instances.delete(nodes=my_nodes.as_ids())
{
  "items": [
    {
      "instanceType": "node",
      "externalId": "<string>",
      "space": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Body

application/json

List of types, spaces, and external-ids for nodes and edges to delete.

items
object[]
required
Required array length: 1 - 1000 elements

Response

Nodes or edges that were deleted

items
object[]
required

List of deleted instances

Required array length: 1 - 1000 elements
Last modified on April 23, 2026