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

Getting results of a Service (infotable) using REST API

Highlighted
Regular Member

Getting results of a Service (infotable) using REST API

Hi,

I have a requirement to get the output of a query result (infotable) in JSON or text format.

I have a parameter to pass to execute this Service.

How can I achieve this using REST APIs?

Appreciate your help with this.

TIA

Saby

3 REPLIES 3
Highlighted

Re: Getting results of a Service (infotable) using REST API

Sorry, are you trying to create services via the REST API? That would be complicated. Any custom services can be accessed via REST API as a POST request. You just need to write a custom service for this. There are snippets in the service editor that help you convert from JSON to infotable and vice versa.

Here is some documentation on it: https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS179012

Hope this helps!

Tori

Highlighted

Re: Getting results of a Service (infotable) using REST API

Hi Tori,

I think you got it wrong,

I have a Service in a Database Thing. The Service requires an input parameter.

I want to get the results of the Service (which is in infotable format) using GET method.

Thanks

Highlighted

Re: Getting results of a Service (infotable) using REST API

All of our services use the POST method in ThingWorx, with very few exceptions. There is an overview on using the ThingWorx REST API here: https://community.thingworx.com/community/developers/blog/2016/06/15/rest-api-overview-and-examples?...

I am not sure why it should matter where this service is located. What is the service doing? Where are you calling it from?

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!