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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How do I create and call GET services in Thingworx?

esirohi
1-Visitor

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
12-Amethyst
(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-Visitor
(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
12-Amethyst
(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.

Announcements


Top Tags