cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

accessing Windchill subtypes from Thingworx via REST services (WRS) . . .

dgg
6-Contributor
6-Contributor

accessing Windchill subtypes from Thingworx via REST services (WRS) . . .

We are using Thingworx 8.5.8 and Windchill 11.1 M020-CPS22 with Windchill 2.2.2 REST Services. Our goal is to use Windchill REST Services from within Thingworx to read from and write to Windchill.

 

In Windchill . . .

We have one subtype (eg, com.mycompany.GenericDocument) that extends Document. We have several additional subtypes that extend com.mycompany.GenericDocument. When I look at the "OData REST APIs" documentation in Windchill, I can browse to the PTC Document Management domain (v5). Under this domain, I see a GET button for (presumably) each subtype of com.mycompany.GenericDocument. If I click the blue button for /Documents/PTC.DocMgmt.MyGenericDocumentSubtype, I can specifiy criteria $filter to perform a successful search that returns only Documents of type "MyGenericDocumentSubtype".

 

In Thingworx . . .

I've created an Http Thing for which the Base Thing Template is "ODataConnector" and added the following to its configuration:

  • v5/ProdMgmt
  • v4/SavedSearch
  • v5/DocMgmt

 

The process was tedious and slow but I was able to map two services for the sake of testing / learning:

  1. ProdMgmt > getPartList
  2. SavedSearch > getAllSavedQueries


Now we need to map a service from the DocMgmt domain that returns only "MyGenericDocumentSubtype".  I've defined a DataShape that matches the attributes of GenericDocumentSubtype to hold search results. When I go to API Maps on my ODataConnector Thing and try to add a new service, I select my DataShape and after a long wait, a list of services that includes those from DocMgmt and the other configured domains is eventually presented (although it typically takes a few tries to get the list populated).  However, the list does not include the particular service that returns only Documents of type "MyGenericDocumentSubtype".

 

What does one have to do to get these types of Windchill REST services (ie, those that return a subtype of Document or Part, etc) to be read from within Thingworx so that they can be mapped?

 

thanks in advance,

dgg

1 ACCEPTED SOLUTION

Accepted Solutions
dgg
6-Contributor
6-Contributor
(To:dgg)

I opened a case with PTC Support about this.  They were initially as puzzled as I was and opened a ticket in Jira.  While waiting for their response, I came across article CS284781 (again).  While re-reading this article, I noticed that it had a file attached to it (wrsspec.json) that I had missed before.  When I heard back from PTC Support, they provided another JSON file similar to the file attached to CS284781.  Using the KB article and the two example files, I was able to get the service mapped in Thingworx.

View solution in original post

2 REPLIES 2
dgg
6-Contributor
6-Contributor
(To:dgg)

I opened a case with PTC Support about this.  They were initially as puzzled as I was and opened a ticket in Jira.  While waiting for their response, I came across article CS284781 (again).  While re-reading this article, I noticed that it had a file attached to it (wrsspec.json) that I had missed before.  When I heard back from PTC Support, they provided another JSON file similar to the file attached to CS284781.  Using the KB article and the two example files, I was able to get the service mapped in Thingworx.

MarekP.Nowaczyk
13-Aquamarine
(To:dgg)

This was already answered on in case C16397075 and article CS284781.

Announcements