Skip to main content
18-Opal
July 11, 2018
Question

How do I export the output in JSON format?

  • July 11, 2018
  • 10 replies
  • 5482 views

How do I export the output in JSON format?

 

We are developing the app[ANDROID APP and IOS APP] with ThingWorx.
I want to export some data from ThingWorx to JSON format.
I do not have a basic knowledge of JSON format.
How do I create a service to get data through the REST API?


Please help me..

10 replies

17-Peridot
July 11, 2018

You can form a url format like,

<http/https:><host:port>/Thingworx/<entity collection>/<entity>/<characteristic collection>/<characteristic>?<query parameters>

 

Also refer: http://support.ptc.com/cs/help/thingworx_hc/thingworx_6.0_hc/index.jspx?id=thingworx10&action=show

 

Thanks.

 

CHASEONHO18-OpalAuthor
18-Opal
July 11, 2018

Thanks

If i simply specify the output format of a ThingWorx service, would you use the REST API to get the value elsewhere?
Using like following code
result =
"{" +

    "name:" + me.name + "," +

    "value:" + me.property +

"}";

CHASEONHO18-OpalAuthor
18-Opal
July 11, 2018

I make service

image 4.png

and execute service with api

image 5.png

but result is Invalid Request.. 

what's wrong?