Retrieve parts related to a Document ID in WRS
Version: Windchill 12.1
Use Case: We associate Documents to our Parts using ReferencedBy links.
Description:
If a document changes, it will show up in the ESI output under Changed Documents. The Document IDs are present here, but the DocumentLinks are not. This is because ReferencedBy links don't change even if the Document or Parts do.
How do I retrieve the Parts associated with a document using WRS?
Example output:
{
"AddedECN": [
{
"Description": "",
"Number": "00011",
"ObjectID": "OR:wt.change2.WTChangeOrder2:1709165",
"@elementName": "ECNHeader",
"Class": "com.ptc.windchill.esi.ChangeHeader",
"LastChangedBy": "",
"TargetID": "1000-1",
"Name": "MyECN"
}
],
"Release": [
{
"Locale": "en_US",
"Destination": "1000-1",
"TransactionNumber": "11",
"PrimaryObjectID": "OR:wt.change2.WTChangeOrder2",
"@elementName": "Transaction",
"CreatedDate": "2025-06-04 16:51:18 UTC",
"ReleaseNumber": "10"
}
],
"ChangedDocuments": [
{
"Description": "",
"ObjectID": "OR:wt.doc.WTDocument:1709259",
"PreviousVersion": "A",
"DocumentType": "WCTYPE|wt.doc.WTDocument|com.ptcmscloud.MY_TYPE$$Document",
"Title": "",
"Iteration": "2",
"TargetID": "1000-1",
"Name": "MyFile1",
"Number": "0040",
"Version": "B",
"@elementName": "Document",
"State": "RELEASED",
"IsAssembly": "false",
"Class": "com.ptc.windchill.esi.Document"
}
]
}



