Skip to main content
POST
/
models
/
instances
/
list
Python SDK
instance_list = client.data_modeling.instances.list(limit=5)

instance_list = client.data_modeling.instances.list(space="my-space")

from cognite.client.data_classes.data_modeling import InstanceSort
property_sort = InstanceSort(
    property=('space', 'view_xid/view_version', 'some_property'),
    direction="descending",
    nulls_first=True)
instance_list = client.data_modeling.instances.list(sort=property_sort)

for instance in client.data_modeling.instances:
    instance # do something with the instance

for instance_list in client.data_modeling.instances(chunk_size=100):
    instance_list # do something with the instances
{
  "items": [
    {
      "instanceType": "node",
      "version": 123,
      "space": "<string>",
      "externalId": "<string>",
      "createdTime": 1730204346000,
      "lastUpdatedTime": 1730204346000,
      "type": {
        "space": "<string>",
        "externalId": "<string>"
      },
      "deletedTime": 1730204346000,
      "properties": {}
    }
  ],
  "typing": {},
  "nextCursor": "<string>",
  "debug": {
    "notices": [
      {
        "code": "excessiveTimeout",
        "category": "invalidDebugOptions",
        "level": "warning",
        "hint": "<string>",
        "timeout": 123
      }
    ],
    "translatedQuery": {
      "query": {},
      "parameters": {}
    },
    "plan": {
      "fullPlan": {},
      "profiled": true,
      "byIdentifier": {}
    },
    "llmPrompt": "<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

Filter based on the instance type, the name, the external-ids, and on properties. The filter supports sorting and pagination. The instances must have data in all the views referenced by the sources field. Properties for up to 10 views can be retrieved in one query.

Cursor for paging through results. In general, if a response contains a nextCursor property, it means that there may be more results, and you should pass that value as the cursor parameter in the next request.

Note that the cursor may or may not be encrypted, but either way, it is not intended to be decoded. Its internal structure is not a part of the public API, and may change without notice. You should treat it as an opaque string and not attempt to craft your own cursors.

includeTyping
boolean
default:false

Should we return property type information as part of the result?

sources
object[]

Retrieve properties from the listed - by reference - views. The node/edge must have data in all the sources defined in the list.

Maximum array length: 10
instanceType
enum<string>
default:node

The type of instance you are querying for; an edge or a node. If the instance type isn't specified, we list nodes. When instanceType is edge, property can refer to any container and is defined as ["edge", "type"], and value contains the value of the property.

Example:

{
“includeTyping”: true,
“instanceType”: "edge",
“filter”: {
“equals”: {
"property": [
"edge",
"type" // VALID VALUES:[space, externalId, createdTime, lastUpdatedTime, startNode, endNode, type ]
],
"value": {
"space": "apm_simple",
"externalId": "WMT:23-FO-96187"
}
}
}
}
Available options:
node,
edge
debug
object

Return query debug notices.

cursor
string
Example:

"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"

limit
integer
default:1000

Limits the number of results to return.

Required range: 1 <= x <= 1000
sort
object[]
Maximum array length: 5
filter
and · object

Build a new query by combining other queries, using boolean operators. We support the and, or, and not boolean operators.

Example:
{
"and": [
{
"in": {
"property": ["tag"],
"values": [10011, 10011]
}
},
{
"range": { "property": ["weight"], "gte": 0 }
}
]
}

Response

List of matching nodes and edges

items
object[]
required

List of nodes and edges

Node

typing
object

Spaces for the requested view and containers

nextCursor
string

The cursor value used to return (paginate to) the next page of results, when more data is available.

debug
object

Contains debug notices if debug flag is set in the query.

Last modified on April 23, 2026