Skip to main content
14-Alexandrite
December 12, 2023
Question

Integrating PDF Upload Functionality with PTC.CADDocumentMgmt API

  • December 12, 2023
  • 1 reply
  • 591 views

When examining the PTC.CADDocumentMgmt API, I can use the endpoint http://serverName/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:24416953')/Attachments('OR:wt.content.ApplicationData:24416979') or simply http://serverName/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('OR:wt.epm.EPMDocument:24416953')/Attachments to view data within Attachments using the GET method. However, my objective is to add a PDF to Attachments, in other words, I want to use the POST method. I can see the GET Attachments, but I couldn't find a way to perform a POST on Attachments. How can I achieve this? There is a GET method for Attachments, but a corresponding POST method is not apparent.

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
December 12, 2023

Hi @ozclkonur 

It is hard to explain why but because it does not exist. 

If you need to save a attachment to CAD Document you need to develop own rest api function.

Here is example, how you can simply create own REST function>

REST API Uto pdate primary content missing

PetrH