Windchill REST Services > Windchill REST Services Domain Capabilities > Examples for Basic REST Operations > Examples for the PTC BOM Transformation Domain > Retrieving Components in Manufacturing BOM
  
Retrieving Components in Manufacturing BOM
You can retrieve manufacturing Bill of Material (BOM) for a given root part using an inline or a specific navigation criteria passed in the NavigationCriteria parameter. If NavigationCriteria is not passed as a parameter, then the default navigation criteria is applied.
Example: Retrieving All Components in Manufacturing BOM
This example shows you how to retrieve all components in a manufacturing BOM for a root part specified in the request URI. Use the following POST URI with the request body:
URI
POST /Windchill/servlet/odata/BomTransformation/XBOMParts('OR:wt.part.WTPart:199727')/PTC.BomTransformation.GetManufacturingBOM?$expand=Components($levels=max)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"RelatedItems": []
}
Example: Retrieving Multiple Standard Control Characteristics in Manufacturing BOM
This example shows you how to retrieve multiple standard control characteristic objects in a manufacturing BOM for a root part specified in the request URI. Use the following POST URI with the request body:
URI
POST /Windchill/servlet/odata/BomTransformation/XBOMParts('OR:wt.part.WTPart:199727')/PTC.BomTransformation.GetManufacturingBOM?$expand=Components($expand=Object;$levels=max)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"RelatedItems": [
"MadeFrom",
"SCC"
]
}
The request also returns the Made From (Raw Material), Co-produce, and Made From Set objects in the manufacturing BOM.
Example: Retrieving Multiple Standard Control Characteristics in Manufacturing BOM with Inline Navigation Criteria
This example shows you how to retrieve multiple standard control characteristic objects in a manufacturing BOM with inline navigation criteria for a root part specified in the request URI. Use the following POST URI with the request body:
URI
POST /Windchill/servlet/odata/BomTransformation/XBOMParts('OR:wt.part.WTPart:199727')/PTC.BomTransformation.GetManufacturingBOM?$expand=Components($expand=Object;$levels=max)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"RelatedItems": [
"MadeFrom",
"SCC"
],
"NavigationCriteria": {
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplicationName": null,
"ApplyToTopLevelObject": false,
"Centricity": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"WorkingIncluded": true,
"View": "Plant1",
"LifeCycleState": null,
"Variation1": null,
"Variation2": null
}
],
"Filters": [],
"HideUnresolvedDependents": false,
"Name": "Plant1",
"SharedToAll": false,
"UseDefaultForUnresolved": false
}
}
The request also returns the Made From (Raw Material), Co-produce, and Made From Set objects in the manufacturing BOM.
Example: Retrieving Multiple Standard Control Characteristics in Manufacturing BOM for a Specific Navigation Criteria
This example shows you how to retrieve multiple standard control characteristic objects in a manufacturing BOM with a specific navigation criteria for a root part specified in the request URI. Use the following POST URI with the request body:
URI
POST /Windchill/servlet/odata/BomTransformation/XBOMParts('OR:wt.part.WTPart:199727')/PTC.BomTransformation.GetManufacturingBOM?$expand=Components($expand=Object;$levels=max)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"RelatedItems": [
"MadeFrom",
"SCC"
],
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:200177"
}
}
The request also returns the Made From (Raw Material), Co-produce, and Made From Set objects in the manufacturing BOM.
You can retrieve extended data (plant data and enterprise data) and department data information in manufacturing BOM for a specified part, Made From Set, or Co-produce object with either an inline navigation criteria or a for a specific navigation criteria.
Example: Retrieving All Extended Data in Manufacturing BOM Using Expand on the Object Navigation Property
This example shows you how to retrieve all extended data objects in a manufacturing BOM for a root part specified in the request URI. Use the following POST URI with the request body:
URI
POST /Windchill/servlet/odata/BomTransformation/XBOMParts('OR:wt.part.WTPart:199727')/PTC.BomTransformation.GetManufacturingBOM?$expand=Components($expand=Object/PTC.ProdMgmt.Part($expand=ExtendedData);$levels=max)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"RelatedItems": [
"MadeFrom",
"SCC"
]
}
Similarly, you can retrieve all extended data objects in a manufacturing BOM for a Co-produce object or a Made From Set object specified in the request URI.
Example: Retrieving All Extended Data and Department Data in Manufacturing BOM Using Expand on the Object Navigation Property
This example shows you how to retrieve all extended data objects in a manufacturing BOM for a root part specified in the request URI. Use the following POST URI with the request body:
URI
POST /Windchill/servlet/odata/BomTransformation/XBOMParts('OR:wt.part.WTPart:199727')/PTC.BomTransformation.GetManufacturingBOM?$expand=Components($expand=Object/PTC.ProdMgmt.Part($expand=ExtendedData($expand=DepartmentData));$levels=max)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"RelatedItems": [
"MadeFrom",
"SCC"
]
}
Similarly, you can retrieve all extended data and department data objects in a manufacturing BOM for a Co-produce object or a Made From Set object specified in the request URI.