Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
I would like to retrieve Master Objects (WTPartMaster / EPMDocumentMaster / WTDocumentMaster) via WRS.
I tried using the MasterID but that leads to an error that the ID is invalid (for WTDocs/EPMDocs/WTParts with their respective MasterIDs).
Yet the documentation mentions that the Master of these entity types should be supported.
Alternatively I could parse the information from a regular WTPart / EPMDocument / WTDocument and create an artificial Master if I had the WTPartMasterID / EPMDocumentMasterID / WTDocumentMasterID. Is there a way to get this data via a call like .../Documents('id') by modifying the Request Body / adding parameters / ...?
After some research I have found out that apparently in some Windchill systems a field like "master" or "masterID" exists but the system I am working with doesn´t have these fields. Is there a documentation on how to add these fields apart from "trial & error with domain customization via json and JS"?
The system I´m working on:
WRS version: 13.0.2.4
Windchill version: 13.02.
Example payload with all fields I can currently get from a WTDocument via .../Documents('id'):
{
"CreatedOn": "---",
"ID": "OR:wt.doc.WTDocument:---7",
"LastModified": "---",
"CabinetName": "---",
"ChangeStatus": ---,
"CheckOutStatus": "---",
"CheckoutState": "---",
"Comments": ---,
"CreatedBy": "---",
"Description": ---,
"DocTypeName": "Document",
"FolderLocation": "/Site/---",
"FolderName": "---",
"GeneralStatus": ---,
"Identity": "---",
"Latest": true,
"LifeCycleTemplateName": "---",
"ModifiedBy": "---",
"Name": "---",
"Number": "---",
"ObjectType": "Document",
"OrganizationName": "---",
"Revision": "---",
"ShareStatus": ---,
"State": {
"Value": "---",
"Display": "---"
},
"Title": "---",
"TypeIcon": {
"Path": "---/doc_document.gif",
"Tooltip": "Document"
},
"Version": "---",
"VersionID": "VR:wt.doc.WTDocument:---6",
"WorkInProgressState": {
"Value": "---",
"Display": "---"
}
}
Solved! Go to Solution.
try to create an alias attribute on EPMdoc to get the info of master attribute and use it in rest select
mapping
masterReference^wt.epm.EPMDocumentMaster~<Msterattribute_internal_name>
try to create an alias attribute on EPMdoc to get the info of master attribute and use it in rest select
mapping
masterReference^wt.epm.EPMDocumentMaster~<Msterattribute_internal_name>
Thanks, I´ve considered that option although I had hoped that there is an alternative that doesn´t involve customizing the specific WIndchill instance, Maybe PTC is going to add that functionality in the future. I´ll use the Alias for now
As explained brfore to have iterations a filter (Navigation Criteria) is needed and the EndPoint is below :
Easiest way is to save a filter from the BOM structure
Use Nav criteria end point to get the filter Id , more info here PTC Navigation Criteria Domain
Use the Id in the request body :