How to invoke Windchill Rest APIs inside Windchill Server side utilities
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to invoke Windchill Rest APIs inside Windchill Server side utilities
Version: Windchill 12.1
Description:
I need to retrieve 3D thumbnail image for given Part. Looks like it is possible using Windchill OData Rest APIs.
can someone please let me know how to retrieve it in Windchill server side utility? Is it possible to bypass the Authentication as we are invoking from Windchill server side.
- Labels:
-
REST Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Generally speaking, you should search for Java API if you would like to retrieve it on server-side.
+ Starting from Windchill 13.0.2, it's possible to call REST APIs server-side via WRSCaller wrapper, see https://support.ptc.com/help/windchill/r13.0.2.0/en/Windchill_Help_Center/customization/WindchillCustomizationUsingWRS.html#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Tarik,
Thanks for the response. But currently we are using 12.1 version of windchill.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AP_10304246
If you need it inside a Windchill so use standard java API to get the thumbnail.
PetrH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi PetrH,
Thanks for the response. I got Windchill API to retrieve the thumbnail. But I am curious to know if I need to call Windchill
Rest APIs inside windchill how to achieve that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AP_10467775
I just use standard HTTPRequest to call the rest api. So you need to define authentication that is not possible to retrieve from active session so you have to open new session with static user and password just for the rest api.
PetrH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi PetrH,
Do I need to use /protocolAuth in the Endpoint of RestAPI and then use this static user and password ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Petr,
if u can u send me the sample code that u have tried now, it would be of great help for me.
![](/skins/images/695EE5AD3E567050FEDD72575855ED93/ptc_skin/images/icon_anonymous_message.png)