Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
I have a WTPart ID "OR:wt.part.WTPart:4911695"
I have DescribedBy and Reference Documents associated with it. How to retrieve the documents information using the part id or WTPartDescribeLink or WTPartReferenceLink? What does the EndPoint URL look like?
Solved! Go to Solution.
This REST call will give what you are looking for
GET <windchill_server>:<port>/Windchill/servlet/odata/ProdMgmt/Parts('part_id')?$expand=DescribedBy($expand=DescribedBy),References($expand=References)
Hello,
I'm not sure if I understood well your question. To retrieve the described by/reference documents you can access the 'Related Objects' tab, tables: Described By/Reference Documents of the Part you want.
No URL will give you that type of information. On the other hand, you could create a SQL statement to pass your WTPart ID and join the describe by and reference tables to retrieve such information.
Best regards,
Diogo Martins
Hi
The Windchill REST API can be used to retrieve all drawings of a particular part.
Example
https://windchill.acme.com/Windchill/servlet/rest/structure/drawings/OR%3Awt.part.WTPart%3A102799?useParts=true
Result
{
"items": [{
"id": "OR:wt.epm.EPMDocument:102871",
"typeId": "WCTYPE|wt.epm.EPMDocument"
}]
}
Currently, I do not know if there is a way to get other documents than drawings with REST.
Kurt
This REST call will give what you are looking for
GET <windchill_server>:<port>/Windchill/servlet/odata/ProdMgmt/Parts('part_id')?$expand=DescribedBy($expand=DescribedBy),References($expand=References)
Amar, it has been a long time and I am on WC 12.0.2 but maybe this can still work. However, I am getting an error:
Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:4299999929')?$expand=DescribedBy($expand=DescribedBy),References($expand=References) <Response [500]>
Warn: {"error":{"code":null,"message":"JS Error ReferenceError -- \"SessionHelper\" is not defined"}}
What is going wrong? How can I define SessionHelper for this?
thanks
Rick