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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

How do I create and call GET services in Thingworx?

esirohi
1-Newbie

How do I create and call GET services in Thingworx?

I have created one service which post/create resource data (JSON) in a thingworx data table. That means, POST request taking JSON data input.

My question is that, how can I create another GET service which just verifies this input on the client (POSTMAN)?

I need to test complete flow where posting data from client into a thingworx data table and using GET service to fetch same stored data on the client from the thingworx data table.

Any sample code for GET service would be helpful.

3 REPLIES 3
paic
1-Newbie
(To:esirohi)

Thingworx doesn't expose a GET for DataTables, they will all be Services (like GetDataTableEntry or GetDataTableEntries) which must be executed with a POST.

esirohi
1-Newbie
(To:paic)

Thanks Pai, I am able to execute custom service via POST method successfully.

I assume due to security reasons, GET is not supported for thingworx services (custom services as well).

paic
1-Newbie
(To:esirohi)

Thingworx does have a switch to support that, however that is unsecure and puts you at risk of CRSF attacks, so best practice is to keep that disabled.

Top Tags