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>"
}
}Required capabilities:
DataModelsAcl:READ
Filter the instances - nodes and edges - in a project.
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>"
}
}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.
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.
Should we return property type information as part of the result?
Retrieve properties from the listed - by reference - views. The node/edge must have data in all the sources defined in the list.
10Show child attributes
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"
}
}
}
}node, edge Return query debug notices.
Show child attributes
"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
Limits the number of results to return.
1 <= x <= 10005Show child attributes
Build a new query by combining other queries, using boolean operators. We support the and, or, and
not boolean operators.
Show child attributes
{
"and": [
{
"in": {
"property": ["tag"],
"values": [10011, 10011]
}
},
{
"range": { "property": ["weight"], "gte": 0 }
}
]
}List of matching nodes and edges
List of nodes and edges
Node
Show child attributes
Spaces for the requested view and containers
Show child attributes
The cursor value used to return (paginate to) the next page of results, when more data is available.
Contains debug notices if debug flag is set in the query.
Show child attributes
Was this page helpful?