Retrieving Extended Data Objects for Parts
This example shows you how to retrieve extended data objects for multiple parts. The navigation criteria ID can be specified in the request body to filter the parts obtained in the response. Use the following URI with the POST method.
URI
POST Windchill/servlet/odata/BomTransformation/GetExtendedDatasForParts?$expand=ExtendedData
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"parts": [
"OR:wt.part.WTPart:1494064",
"OR:wt.part.WTPart:1497359",
"OR:wt.part.WTPart:1494018"
],
"navigationCriteriaId": "OR:wt.filter.NavigationCriteria:1507050"
}
Example: Retrieving Extended Data Objects for Parts with Inline Navigation Criteria for Plant Filters and Config. Specs
The following example shows you how to retrieve a collection of parts while specifying inline navigation criteria for Plant Filters and Plant Config Specs in the request body. Use the following POST request with the request body.
Use the filter expression ?$expand=ExtendedData in the URI in order to get the extended data objects in the response. If not included the response will be only the Part OIDs.
URI
POST Windchill/servlet/odata/BomTransformation/GetExtendedDatasForPartsWithInlineNavCriteria?$expand=ExtendedData
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"parts": [
"OR:wt.part.WTPart:218684",
"OR:wt.part.WTPart:218285",
"OR:wt.part.WTPart:218212",
"OR:wt.part.WTPart:218312"
],
"NavigationCriteria": {
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplicationName": null,
"ApplyToTopLevelObject": true,
"Centricity": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"WorkingIncluded": true,
"View": "Design",
"LifeCycleState": null,
"Variation1": null,
"Variation2": null
}
],
"CreatedOn": "2021-07-21T09:44:14+02:00",
"Filters": [
{
"@odata.type": "#PTC.NavCriteria.PlantFilter",
"IsIncludeNonVSEDObjs": false,
"Rules": [
{
"RuleOrder": 0,
"ObjectTypeIdentifier": "PTC.MfgProcMgmt.PlantSpecificEnterpriseData",
"LinkTypeIdentifier": "PTC.ProdMgmt.PartUse",
"Expressions": [
{
"Attribute": "WCTYPE|com.ptc.windchill.enterprise.data.EnterpriseData|com.ptc.windchill.enterprise.data.enterpriseData.PlantSpecificEnterpriseData~MBA|view^WCTYPE|wt.vc.views.View",
"Value": "Manufacturing",
"ExpressionOrder": 0,
"Comparison": {
"Value": "EQUAL",
"Display": "="
}
}
]
}
]
}
],
"HideUnresolvedDependents": false,
"SharedToAll": false,
"UseDefaultForUnresolved": false
}
}
* 
You can also specify the navigation criteria ID in the request body to filter a collection of parts using this end point. Use the following format in the request body in that case:
{
"parts": [
"OR:wt.part.WTPart:218684",
"OR:wt.part.WTPart:218285",
"OR:wt.part.WTPart:218212",
"OR:wt.part.WTPart:218312"
],
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:1507050"
}
}
You can also retrieve extended data objects for a part using the function GetExtendedDatasWithInlineNavCriteria and filter the data on either Plant Filters or Config specs or both, from the Product Management domain.
Use the following URI with the POST method and the request body:
URI
POST Windchill/servlet/odata/ProdMgmt/Parts('<PartId>')/PTC.ProdMgmt.GetExtendedDatasWithInlineNavCriteria?$expand=ExtendedData
Request Body
{
"parts": [
"OR:wt.part.WTPart:218684",
"OR:wt.part.WTPart:218285",
"OR:wt.part.WTPart:218212",
"OR:wt.part.WTPart:218312"
],
"NavigationCriteria": {
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplicationName": null,
"ApplyToTopLevelObject": true,
"Centricity": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"WorkingIncluded": true,
"View": "Design",
"LifeCycleState": null,
"Variation1": null,
"Variation2": null
}
],
"CreatedOn": "2021-07-21T09:44:14+02:00",
"Filters": [
{
"@odata.type": "#PTC.NavCriteria.PlantFilter",
"IsIncludeNonVSEDObjs": false,
"Rules": [
{
"RuleOrder": 0,
"ObjectTypeIdentifier": "PTC.MfgProcMgmt.PlantSpecificEnterpriseData",
"LinkTypeIdentifier": "PTC.ProdMgmt.PartUse",
"Expressions": [
{
"Attribute": "WCTYPE|com.ptc.windchill.enterprise.data.EnterpriseData|com.ptc.windchill.enterprise.data.enterpriseData.PlantSpecificEnterpriseData~MBA|view^WCTYPE|wt.vc.views.View",
"Value": "Manufacturing",
"ExpressionOrder": 0,
"Comparison": {
"Value": "EQUAL",
"Display": "="
}
}
]
}
]
}
],
"HideUnresolvedDependents": false,
"SharedToAll": false,
"UseDefaultForUnresolved": false
}
}
Was this helpful?