This resource is part of the asset-centric data model (legacy).
- New projects: Model assets using the data modeling service—with the CogniteAsset concept, asset hierarchies, and greater flexibility.
Pump asset can be part of a System asset, which is part of a Plant asset. An asset can have a parent asset and multiple child assets, but an asset can only have one parent. At the top of each hierarchy is a root asset. Each project can have several root assets, and all assets under the root asset must have a parent asset.
Structure an asset hierarchy
This example shows you how to structure the asset hierarchy for the fictional SYSTEM 11:
You can post all assets in one request when you structure an asset hierarchy.
Example: create an asset hierarchy
Example: create an asset hierarchy
externalId, you get a unique id field and value. References within CDF use that id, so parentExternalId is translated into that new unique identifier. The rootId field gives you the id of the root asset.Advanced filtering
advancedFilter combines leaf operations such as equals, prefix, and exists with and, or, and not. It applies to built-in fields and to metadata. The filter language is documented in Filter language.
List, search, and aggregate endpoints that use this filter are for exploration. See Request throttling.
Filter limits
An assetadvancedFilter query has these limits:
- Maximum depth is 10, and the maximum number of clauses is 100.
andandorneed at least one element.- Each
propertyarray has 1 or 2 elements. Each element is at most 128 characters and must name an existing property or metadata key. containsAll,containsAny, andinaccept 1 to 100 primitive values.- A
rangefilter needs at least one bound.gtandgtecannot be used together, and neither canltandlte. - A query can contain at most 2
searchleaf filters. Each search value is 1 to 128 characters. - Maximum string lengths:
externalId255,name128 forsearchand 255 otherwise,description128 forsearchand 255 otherwise, a label 255,source128, and a metadata key 128.
Sorting
Whennulls is auto or omitted, missing values sort after every other value in ascending order and before every other value in descending order. Set nulls to first or last to place missing values independently of the sort direction. Empty strings are not nulls.
Sort on _score_ to rank assets by how many filter clauses they match. An asset that matches both an equals filter and a prefix filter ranks above an asset that matches only the prefix.
Aggregates
Aggregate computes counts and grouped values over assets.filter and advancedFilter select the assets to aggregate, using the same rules as list. Text values are grouped without regard to case.
aggregateFilter filters the aggregate buckets, not the assets. For an aggregation on source, it can only filter the source values.
Delete assets
By default,recursive is false and the delete fails when another asset uses the target as its parent. Set recursive to true to delete the asset and its descendants. Descendants do not count toward the request limit.