Members
When you run a query, make sure you include all the entity members that you want to retrieve. If you omit the members
parameter, the response will return all the existing entity members (all properties, all relations, and so on). To ensure optimal performance, only request the members you actually need.
The API is configured to only load the related paths that are specified in a query. If you don't specify related path relations in your query, the response won't return any.
Example query
The following query specifies the AssetTypeToAsset
relation member, which is a related path relation.
https://master.sitecorecontenthub-staging.cloud/api/entities/query?query=Definition.Name=='M.Asset'&members=Title,Filename,AssetMediaToAsset,AssetTypeToAsset
Response
The response returns all the queried members, including AssetTypeToAsset
under related_paths
.
{
"items":[
{
"id":33012,
"identifier":"asset.fruitful-product-line",
"cultures":[
"nl-BE",
"en-US"
],
"properties":{
"FileName":"fruitful-product-line.pdf",
"Title":"Fruitful product line"
},
"relations":{
"AssetTypeToAsset":{
"parent":{
"properties":{
"Label":{
"en-US":"Product Line Sheet"
}
},
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/32916"
},
"inherits_security":true,
"self":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/33012/relations/AssetTypeToAsset"
}
},
"AssetMediaToAsset":{
"parent":{
"properties":{
"ClassificationName":"pdf",
"TaxonomyLabel":{
"en-US":"pdf"
}
},
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/1057"
},
"inherits_security":true,
"self":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/33012/relations/AssetMediaToAsset"
}
}
},
"created_by":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/6",
"title":"The user who created the entity"
},
"created_on":"2024-08-05T07:44:51.5493966Z",
"modified_by":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/6",
"title":"The user who last modified the entity"
},
"modified_on":"2024-08-05T07:48:54.1794057Z",
"entitydefinition":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entitydefinitions/M.Asset",
"title":"The entity definition for this entity"
},
"copy":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/33012/copy",
"title":"Copy this entity"
},
"permissions":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/33012/permissions",
"title":"The permissions on this entity"
},
"lifecycle":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/33012/lifecycle",
"title":"The lifecycle action for this entity."
},
"saved_selections":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/33012/savedselections",
"title":"The saved selections this entity belongs to"
},
"roles":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/33012/roles",
"title":"Roles for this entity"
},
"annotations":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/33012/annotations",
"title":"Annotations for this entity"
},
"is_root_taxonomy_item":false,
"is_path_root":false,
"inherits_security":true,
"is_system_owned":false,
"version":9,
"full":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/33012"
},
"self":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/33012?members=Title,Filename,AssetMediaToAsset,%20AssetTypeToAsset"
},
"related_paths":{
"AssetTypeToAsset":[
[
{
"values":{
"en-US":"Product Line Sheet"
},
"entity":"https://master.sitecorecontenthub-staging.cloud/api/entities/32916",
"definition":"https://master.sitecorecontenthub-staging.cloud/api/entitydefinitions/M.AssetType"
}
]
]
},
"renditions":{...}
}
],
"total_items":3509,
"returned_items":1,
"offset":25,
"next":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/query?skip=26&take=1&members=Title,Filename,AssetMediaToAsset,%20AssetTypeToAsset&query=Definition.Name%3D%3D%27M.Asset%27",
"title":"The next page in this collection"
},
"previous":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/query?skip=24&take=1&members=Title,Filename,AssetMediaToAsset,%20AssetTypeToAsset&query=Definition.Name%3D%3D%27M.Asset%27",
"title":"The previous page in this collection"
},
"self":{
"href":"https://master.sitecorecontenthub-staging.cloud/api/entities/query?skip=25&take=1&members=Title,Filename,AssetMediaToAsset,%20AssetTypeToAsset&query=Definition.Name%3D%3D%27M.Asset%27",
"title":"This collection"
}
}