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 PTC Community Badges. Engage with PTC and see how many you can earn! X

Getting results of a Service (infotable) using REST API

sgobi
7-Bedrock

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
ttielebein
14-Alexandrite
(To:sgobi)

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

sgobi
7-Bedrock
(To:sgobi)

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

ttielebein
14-Alexandrite
(To:sgobi)

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?&art_lang=en&posno=1…

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


Top Tags