Skip to main content
11-Garnet
February 8, 2023
Solved

API for Check Out and download action in windchill PDMLink 11.1 M020

  • February 8, 2023
  • 1 reply
  • 2511 views

Hi,

I design desktop application using java. Need to download  files from server using onclick button function 

I need java API  for checkout and download  action in windchill.

 

 

 

 

Best answer by HelesicPetr

Hi @MS_10194939 

I am not sure if the API can help you because you need to start communication with Windchill over HTTP Server with credentials. 

 

I usually write own java function in the Windchill that is called by HTTP Request and a result is returned by HTTP Response. It can be file 😄  

// for checkout object you can use follwoing API
Folder folder = WorkInProgressHelper.service.getCheckoutFolder();
CheckoutLink checkLink = WorkInProgressHelper.service.checkout(workableObject, folder, "checkout By Code");
Workable objectCheckOutCopy = checkLink.getWorkingCopy();

 

Or another option exists, use the Windchill REST API.

 

PetrH

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
February 8, 2023

Hi @MS_10194939 

I am not sure if the API can help you because you need to start communication with Windchill over HTTP Server with credentials. 

 

I usually write own java function in the Windchill that is called by HTTP Request and a result is returned by HTTP Response. It can be file 😄  

// for checkout object you can use follwoing API
Folder folder = WorkInProgressHelper.service.getCheckoutFolder();
CheckoutLink checkLink = WorkInProgressHelper.service.checkout(workableObject, folder, "checkout By Code");
Workable objectCheckOutCopy = checkLink.getWorkingCopy();

 

Or another option exists, use the Windchill REST API.

 

PetrH

11-Garnet
February 8, 2023

Thank you for the help. Can you please tell me another option using windchill REST API. I am at the beginning level in windchill . 

HelesicPetr
22-Sapphire II
22-Sapphire II
February 9, 2023

Hello @MS_10194939 

You can start with help documentation.

windchill_rest_services/r2.5.

 

Also each Windchill installation has documentation for OData REST API

https://serverAddress.company.com/Windchill/app/#ptc1/apiDocs/apiDocs

 

I have experience just with OData REST APIs because I use it in the ThingWorx .

HelesicPetr_0-1675925364850.png

HelesicPetr_1-1675925505859.png

 

I hope this can help.

 

PetrH