Relations

Parents

You can query for named parent relationships by using a specific ID.

For instance, to query for all assets linked to a certain brand ID:

RequestResponse
GET http://<hostname>/api/entities/query?query=Definition.Name=='M.Asset' AND Parent('BrandToAsset').id==331
Note

This property only supports the == operator, but can be negated.

Children

You can query for named child relationships by using a specific ID.

For instance, to query for all assets that have another specific asset as child:

RequestResponse
GET http://<hostname>/api/entities/query?query=Definition.Name=='M.Asset' AND Child('RelatedAssetsToAsset').id==407
Note

This property only supports the == operator, but can be negated.

Ancestors

You can query for named ancestors (secured and unsecured) by using a specific ID.

For instance, to query for all assets that belong to M.AssetMedia:

RequestResponse
GET http://<hostname>/api/entities/query?query=Definition.Name=='M.Asset' AND Ancestor('AssetMediaToAsset').id==317
Note

This property only supports the == operator, but can be negated.

Exists

You can query for named relationships which have a parent entity.

For instance, to query for all assets which have a brand:

RequestResponse
GET http://<hostname>/api/entities/query?query=Definition.Name=='M.Asset' AND Exists('BrandToAsset')

Missing

You can query for named relationships which do not have a parent entity.

For instance, to query for all assets which do not have a brand:

RequestResponse
GET http://<hostname>/api/entities/query?query=Definition.Name=='M.Asset' AND Missing('BrandToAsset')

Do you have some feedback for us?

If you have suggestions for improving this article,