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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Is it possible to create custom rest service (using GET) that passes a collection as an input parameter? Yes, this will be used to feed into a ThingWorx table (grid)

ptc-2870585
1-Visitor

Is it possible to create custom rest service (using GET) that passes a collection as an input parameter? Yes, this will be used to feed into a ThingWorx table (grid)

I need to create a custom rest web service (java) to retrieve information from windchill.

The web service will need to take in a collection as a parameter (list of document IDs), and then it will retrieve and return related change notices. The change notices will be displayed in a ThingWorx table (grid). This should be a GET call (as opposed to POST), based on the function of the service.

I'm trying to understand if this is possible, and how to handle the parameter passing on the calling side (ThingWorx Thing service in javascript), and in the rest service (java).

Any pointers, suggestions, links, and examples appreciated.

1 REPLY 1

Here is a discussion about the "right" way to send a list of values with a GET:

https://stackoverflow.com/questions/2602043/rest-api-best-practice-how-to-accept-list-of-parameter-values-as-input

I am assuming you have flexibility on the Java side and are looking for an industry standard way of implementing your service. If your service returned a ThingWorx Infotable that would make consuming the response easier in your ThingWorx service, but returning properly formatted JSON can also work.

Announcements


Top Tags