Required capabilities:
threedAcl:READ
Lists 3D assets mappings that match the ID for the specified filter query parameter type. Only one type of filter can be specified for each request, either assetId, nodeId or intersectsBoundingBox.
In Hybrid CDF projects: The nodeId and assetId mappings are returned by default.
To instead see any assetInstanceId mappings (for CoreDM based contextualization),
set the getDmsInstances query parameter to true.
In DataModelingOnly CDF projects: This endpoint is not available. Use DMS queries to list CogniteCADNodes.
Note: When filtering for a specific nodeId, only nodeIds that actually exists will be returned. When filtering for a specific assetId, all mappings will be returned, even if the assetId does not exist.
A list of mappings between assets and 3D nodes
The response for a failed request.
const mappings3D = await client.assetMappings3D.list(3244265346345, 32423454353545);
{- "items": [
- {
- "nodeId": 1003,
- "assetId": 3001,
- "assetInstanceId": {
- "space": "string",
- "externalId": "string"
}, - "treeIndex": 3,
- "subtreeSize": 4
}
], - "nextCursor": "string"
}Required capabilities:
threedAcl:UPDATE
Create asset mappings
Asset mappings allows connections to be made between assets and 3D nodes. This can be used to contextualize 3D models.
In Hybrid CDF projects: Asset IDs obtained from a mapping may be invalid, and not point to real asset IDs.
The assetId existence is not checked by any means by the 3D API.
The mappings will be stored until an assetId and nodeId pair is removed through the mappings delete endpoint.
In DataModelingOnly CDF projects: When creating asset mappings, the data model based assetInstanceId (with space and externalId), and the 3d model revision nodeId, must be accessible, existing and valid.
A list of created asset mappings.
The response for a failed request.
{- "items": [
- {
- "nodeId": 1003,
- "assetId": 3001,
- "assetInstanceId": {
- "space": "string",
- "externalId": "string"
}
}
]
}{- "items": [
- {
- "nodeId": 1003,
- "assetId": 3001,
- "assetInstanceId": {
- "space": "string",
- "externalId": "string"
}, - "treeIndex": 3,
- "subtreeSize": 4
}
]
}Required capabilities:
threedAcl:DELETE
Delete a list of asset mappings.
In Hybrid CDF projects: The delete request items requires a nodeId, and either an assetId or an assetInstanceId.
In DataModelingOnly CDF projects: The delete request items requires a nodeId and an assetInstanceId (with space and externalId).
Empty response.
The response for a failed request.
{- "items": [
- {
- "nodeId": 1003,
- "assetId": 3001,
- "assetInstanceId": {
- "space": "string",
- "externalId": "string"
}
}
]
}{ }Required capabilities:
threedAcl:READ
Lists 3D assets mappings that match the specified filter parameter.
Only one type of filter can be specified for each request, either assetIds, nodeIds or treeIndexes.
In Hybrid CDF projects: The nodeId and assetId mappings are returned by default.
To instead see only any assetInstanceId mappings (for CoreDM based contextualization),
set the getDmsInstances property to true, in the request body.
In DataModelingOnly CDF projects: This endpoint is not available. Use DMS queries to list CogniteCADNodes.
The filter for asset mappings to get.
A list of matching asset mappings.
The response for a failed request.
{- "getDmsInstances": false,
- "filter": {
- "assetIds": [
- 0
]
}, - "limit": 100,
- "cursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}{- "items": [
- {
- "nodeId": 1003,
- "assetId": 3001,
- "assetInstanceId": {
- "space": "string",
- "externalId": "string"
}, - "treeIndex": 3,
- "subtreeSize": 4
}
], - "nextCursor": "string"
}Required capabilities:
threedAcl:READ
Retrieves a list of node IDs from the hierarchy of all available 3D models which are mapped to the supplied asset ID.
If a nodeId is mapped to an assetId but is invalid or does not exist anymore, it will be omitted from the results.
An asset referenced in an asset mapping is not guaranteed to exist.
A list of mappings between assets and 3D valid nodes and revisions in which exist
The response for a failed request.
{- "items": [
- {
- "modelId": 3001,
- "revisionId": 3001,
- "nodeId": 1003
}
], - "nextCursor": "string"
}This endpoint is only supported in dm-only projects.
The nodeIds can be found as part of a CogniteCadNode in the field cadNodeReference.
Similar functionality is supported in classic through:
The Model, Revision, a list of nodes and an area definition
required | object (InstanceReference) |
required | object (InstanceReference) |
required | object (FilterNodesByBoundingBox) |
A list containing the nodes that are within the area definition for the given Model Revision
The response for a failed request.
{- "model": {
- "instanceId": {
- "space": "string",
- "externalId": "string"
}
}, - "revision": {
- "instanceId": {
- "space": "string",
- "externalId": "string"
}
}, - "filterNodesByBoundingBox": {
- "boundingBox": {
- "xMin": 0,
- "xMax": 0,
- "yMin": 0,
- "yMax": 0,
- "zMin": 0,
- "zMax": 0
}, - "nodeIds": [
- 0
]
}
}{- "items": [
- {
- "id": 1000,
- "treeIndex": 3,
- "depth": 2,
- "name": "Node name",
- "subtreeSize": 4,
- "boundingBox": {
- "max": [
- 0,
- 0,
- 0
], - "min": [
- 0,
- 0,
- 0
]
}
}
], - "nextCursor": "string"
}