Read an asset by ID, type, and site along with its dependent assets in an aggregated format
get
/resources/v1/aggregates/{siteName}/{assetType}/{assetId}
The resource endpoint returns information about any given asset, along with its dependent assets to any depth,
belonging to a given site name. It is a Singular Resource.
Important Note: The response is in an aggregated asset format. All the aggregated asset responses contain a 'start' field. The 'root asset' referred to below is the asset to which the value of 'start' key points in the response. This asset is the starting asset at level 0 (requested asset, here {assetId}). We have to navigate through all dependent assets at the next levels in the response through this root asset.
Special Case : If the root asset or any dependent asset at any depth is of the collection asset type, such as ContentQuery or Recommendation, then in addition to asset data, results are also evaluated for the collection asset and given in the items array. The default number of results is 10. Each item is again an aggregated asset, and the query parameters are also applicable to it. WebCenter Sites Aggregate REST API recommends that you access collection resources through collection-asset-resource and recommendation assets through recommendation-resource because you have the ability to control the number of results and pagination.
Important Note: The response is in an aggregated asset format. All the aggregated asset responses contain a 'start' field. The 'root asset' referred to below is the asset to which the value of 'start' key points in the response. This asset is the starting asset at level 0 (requested asset, here {assetId}). We have to navigate through all dependent assets at the next levels in the response through this root asset.
Special Case : If the root asset or any dependent asset at any depth is of the collection asset type, such as ContentQuery or Recommendation, then in addition to asset data, results are also evaluated for the collection asset and given in the items array. The default number of results is 10. Each item is again an aggregated asset, and the query parameters are also applicable to it. WebCenter Sites Aggregate REST API recommends that you access collection resources through collection-asset-resource and recommendation assets through recommendation-resource because you have the ability to control the number of results and pagination.
Request
Path Parameters
-
assetId: integer(int64)
ID of the asset
-
assetType: string
Name of the asset type
-
siteName: string
Name of the site
Query Parameters
-
assetDepth: string
Accepts any positive integer or the string "all". The asset depth as an integer defines the tree level to which to traverse dependent assets. The string "all" refers to the full depth. The default value is 2. In case of an invalid assetDepth value (negative number), the default assetDepth value is used.
-
expand: string
This is used to control what asset types to expand in the response. Accepts a semicolon-separated list of asset types. The assets of these asset types will be expanded. Other asset types will not be expanded. However, the root asset (ref: note in resoure description) is always expanded. The default is to expand all asset types. Placing the NOT operator (!) before an asset type in the list indicates to exclude that asset type from the expansion.
For example:- expand=assetType1,assetType2. means expand only assets of 'assetType1' and 'assetType2'.
- expand=!assetType1,!assetType2.means expand all assets except the assets of 'assetType1' and 'assetType2'.
-
fields: string
This is used to control what attributes to return for an AssetType in the response. This query param works only if any asset of this assetType occurs within the given depth and that assetType is allowed to expand. Accepts a list of attributes, separated by commas, for an asset type in the format assetType1(attr1,attr2). It means to give only attr1 and attr2 for assetType1. If no asset type is specified, the attributes in the fields parameter are applicable only to the root asset (ref: note in resoure description). If the fields query parameter is not specified, then by default all attributes are given. This parameter can include wildcards, as follows
- fields=*(attr1,attr2) gives only attr1 and attr2 for all asset types.
- fields=!*(attr1,attr2,attr3) gives all attributes excluding att1, attr2, and attr3 for all asset types.
- fields=!attr1,attr2 gives all attributes excluding attr1 and attr2 for the root asset.
-
links: string
Accepts a comma-separated list of link names. By default, this parameter gives all the links (schema, self, and canonical resources).
-
profileName: string
Accepts a Visitor Services profile name. This profileName will be applied to the recommendation assets encountered at any depth to evaluate the results.
-
segments: string
Accepts a list of segment names, separated by commas, that exist in the sites. These segments will be applied to the recommendation assets encountered at any depth to evaluate the results. If segments are not specified, then this parameter uses the Default segment.
Response
Supported Media Types
- application/json
200 Response
An asset's data in aggregated format