Skip to main content
10-Marble
June 20, 2023
Question

How to fetch wt.doc from wt.epm ?

  • June 20, 2023
  • 3 replies
  • 1196 views

Hi

We want to update secondary attachments using REST, we have EPM document number, how should we do it?

And how should we fetch the wt doc data from epm?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3 replies

HelesicPetr
22-Sapphire II
June 20, 2023

Hello @swapnali 

You would like to modify attachments but you mentioned wt.document and wtdocument is normally linked to a WTPart. as described or referenced document.

 

PetrH

swapnali10-MarbleAuthor
10-Marble
June 22, 2023

Hello @HelesicPetr 

 

According to this link, Uploading Content for a Document (ptc.com),

 

they have mentioned that during stage 1 POST url call, we need to provide wt document number, (POST /Windchill/servlet/odata/DocMgmt/Documents('OR:wt.doc.WTDocument:48796581')/PTC.DocMgmt.uploadStage1Action), but we have EPM document number, so how should we extract the WTDocument Number from EPM document number?

HelesicPetr
22-Sapphire II
June 22, 2023

Hi @swapnali 

The point is that restApi DocMgmt works with WTDocument type not with EPMDocument type. 

 

You can try to find EPMDocument restApi CADDocumentMgmt 

HelesicPetr_0-1687416857778.png

and use OID from EPM in DocMgmt upload stage, but I don't believe that it would work. 

example EPMOID > OR:wt.epm.EPMDocument:7187581

 

PetrH