Related paths properties
Related paths make it possible to quickly access to related entities. You can only use the related paths property on relation entities with the Path relation parameter enabled.
Note
Related paths show you where you are in the relation path and return simple labels. For data aggregation, use aggregations.
Template
The query URL parameter is defined as follows:
relatedPathProperties=<RelationName>|<DefinitionNames...>|<PropertyNames...>
You can use one or several definition names and property names in the request.
You can use the relatedPathProperties
parameter multiple times for multiple relations.
http://localhost:8080/api/entities/1000?relatedPathProperties=AssetTypeToAsset|M.AssetType|Label,TriggersVision
Example
The following example shows you a single path entity returned, which means that the entity for which you made the request only has one related path. However, a payload can have several path entities if the entity has more than one related path.
{
"related_paths":{
"AssetTypeToAsset":[
[
{
"values":{
"en-US":"asset type name"
},
"properties":{
"Label":"asset type label",
"TriggersVision":true
},
"entity":"http://localhost:8080/api/entities/1005",
"definition":"http://localhost:8080/api/entitydefinitions/M.AssetType"
}
]
]
}
}
Performance impact
The performance impact of this feature is low because all requested properties are combined and fetched in one call from the database.
There is no significant performance difference between using the relatedPathProperties
one or several times on an entity.
However, when an entity has many related paths, it requires loading a lot of entities, which might slightly impact performance.
Can we improve this article ? Provide feedback