Skip to main content
1-Visitor
October 24, 2017
Question

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)

  • October 24, 2017
  • 1 reply
  • 1692 views

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

    5-Regular Member
    October 25, 2017

    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.