Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hello, I was trying to find assosiated draiwn using REST API for a few days for now but didn§t succeed in it
trying every endpoint possible and trying all metadata pathes to get to it.
=== Part Number: 02430068 ===
OID: OR:wt.part.WTPart:1254073630
CADDocument OID: OR:wt.epm.build.EPMBuildRule:1229930576
Endpoint: Drawings($select=Identity,Name,FileName,Version)
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1229930576')?$select=Identity&$expand=Drawings($select=Identity,Name,FileName,Version)
Endpoint: EPMReferenceLinks
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1229930576')?$select=Identity&$expand=EPMReferenceLinks
Endpoint: Representations
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1229930576')?$select=Identity&$expand=Representations
Endpoint: Parts
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1229930576')?$select=Identity&$expand=Parts
Endpoint: Versions
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1229930576')?$select=Identity&$expand=Versions
=== Part Number: 02430071 ===
OID: OR:wt.part.WTPart:1244208165
CADDocument OID: OR:wt.epm.build.EPMBuildRule:1229929727
Endpoint: Drawings($select=Identity,Name,FileName,Version)
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1229929727')?$select=Identity&$expand=Drawings($select=Identity,Name,FileName,Version)
Endpoint: EPMReferenceLinks
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1229929727')?$select=Identity&$expand=EPMReferenceLinks
Endpoint: Representations
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1229929727')?$select=Identity&$expand=Representations
Endpoint: Parts
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1229929727')?$select=Identity&$expand=Parts
Endpoint: Versions
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1229929727')?$select=Identity&$expand=Versions
=== Part Number: 02454964 ===
OID: OR:wt.part.WTPart:1247394409
CADDocument OID: OR:wt.epm.build.EPMBuildRule:1234005375
Endpoint: Drawings($select=Identity,Name,FileName,Version)
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1234005375')?$select=Identity&$expand=Drawings($select=Identity,Name,FileName,Version)
Endpoint: EPMReferenceLinks
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1234005375')?$select=Identity&$expand=EPMReferenceLinks
Endpoint: Representations
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1234005375')?$select=Identity&$expand=Representations
Endpoint: Parts
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1234005375')?$select=Identity&$expand=Parts
Endpoint: Versions
Response: ❌ Failed: 400 Client Error: 400 for url: http://<my server>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.build.EPMBuildRule:1234005375')?$select=Identity&$expand=Versions
This article on help says what i have to do but it never worked fo me.
https://support.ptc.com/help/windchill_rest_services/r2.7/en/#page/windchill_rest_services/example_CADDocumentMgmt_navigate_CADdocument_to_Drawings.html#
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:191730')?$select=Identity&$expand=Drawings($select=Identity,Name,FileName,Version)
simply doesn't work
Help me please😢
After using the REST API for several days, I discovered an interesting structure in the database.
A drawing has a "References" endpoint, which allows me to find the assemblies or parts it references—this works without any issues. The link is even marked as a "Drawing reference."
However, even though the Windchill web interface has a "Referenced by" category, this category does not exist in the actual REST API.
<a:feed xmlns:a="http://www.w3.org/2005/Atom" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:d="http://docs.oasis-open.org/odata/ns/data" m:context="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/$metadata#CADDocuments(ID,Number)">
<a:id>http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments</a:id>
<a:entry>
<a:id>http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')</a:id>
<a:title/>
<a:summary/>
<a:updated>2025-06-30T07:21:54Z</a:updated>
<a:author>
<a:name/>
</a:author>
<a:link rel="edit" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Uses" type="application/atom+xml;type=feed" title="Uses" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Uses"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/References" type="application/atom+xml;type=feed" title="References" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/References"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/DerivedSources" type="application/atom+xml;type=feed" title="DerivedSources" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/DerivedSources"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/AllPrimaryContents" type="application/atom+xml;type=feed" title="AllPrimaryContents" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/AllPrimaryContents"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/PartDocAssociations" type="application/atom+xml;type=feed" title="PartDocAssociations" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/PartDocAssociations"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Creator" type="application/atom+xml;type=feed" title="Creator" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Creator"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Context" type="application/atom+xml;type=feed" title="Context" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Context"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Revisions" type="application/atom+xml;type=feed" title="Revisions" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Revisions"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/SmallThumbnails" type="application/atom+xml;type=feed" title="SmallThumbnails" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/SmallThumbnails"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Versions" type="application/atom+xml;type=feed" title="Versions" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Versions"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Thumbnails" type="application/atom+xml;type=feed" title="Thumbnails" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Thumbnails"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Representations" type="application/atom+xml;type=feed" title="Representations" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Representations"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Folder" type="application/atom+xml;type=feed" title="Folder" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Folder"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Attachments" type="application/atom+xml;type=feed" title="Attachments" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Attachments"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Organization" type="application/atom+xml;type=feed" title="Organization" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Organization"/>
<a:link rel="http://docs.oasis-open.org/odata/ns/related/Modifier" type="application/atom+xml;type=feed" title="Modifier" href="http://<my server>/Windchill/servlet/odata/v3/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:1078003916')/Modifier"/>
<a:category scheme="http://docs.oasis-open.org/odata/ns/scheme" term="#PTC.CADDocumentMgmt.CADDocument"/>
<a:content type="application/xml">
<m:properties>
<d:ID>OR:wt.epm.EPMDocument:1078003916</d:ID>
<d:Number>02430074.ASM</d:Number>
</m:properties>
</a:content>
</a:entry>
</a:feed>
Hi @ilyachaban
Thank you for your question.
Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.
Also, feel free to add any additional information you think might be relevant.
Best regards,