Retrieves a paginated list of associated assets.
You can use this operation to do the following:
-
List child assets associated to a parent asset by a hierarchy that you specify.
-
List an asset's parent asset.
get/assets/{assetId}/hierarchies
Path parameters
assetIdstring required
The ID of the asset to query.
Query parameters
hierarchyIdstring
<p>The ID of the hierarchy by which child assets are associated to the asset. To find a hierarchy ID, use the <a href="https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeAsset.html">DescribeAsset</a> or <a href="https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeAssetModel.html">DescribeAssetModel</a> operations. This parameter is required if you choose <code>CHILD</code> for <code>traversalDirection</code>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-hierarchies.html">Asset hierarchies</a> in the <i>IoT SiteWise User Guide</i>.</p>
traversalDirection'PARENT' | 'CHILD'
<p>The direction to list associated assets. Choose one of the following options:</p> <ul> <li> <p> <code>CHILD</code> – The list includes all child assets associated to the asset. The <code>hierarchyId</code> parameter is required if you choose <code>CHILD</code>.</p> </li> <li> <p> <code>PARENT</code> – The list includes the asset's parent asset.</p> </li> </ul> <p>Default: <code>CHILD</code> </p>
nextTokenstring
The token to be used for the next set of paginated results.
maxResultsinteger
<p>The maximum number of results to return for each paginated request.</p> <p>Default: 50</p>
Response
Success