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 the Community Ranking System, a fun gamification element of the PTC Community. X

How to format json input/output to ThingWorx REST API calls?

AdamM.Levine
12-Amethyst

How to format json input/output to ThingWorx REST API calls?

I am starting work with the REST API.  For now, I am just sending URLs to the platform using a chrome extension - not creating a real application yet.

Many of the services and other REST API calls require json input.  Much of this isn't simple name/value pairs, but may be complex data shapes, data tables, file, or image input.

How do I create the properly-formatted .json file for the service to work, especially when dealing with encoded images?

Once I get the result of the service, how do I parse out the encoded images, like the one from the the getAvatar service into something useful?

2 REPLIES 2

Any help on this one?  I have a similar requirement.

Nick

I posted too soon.  The answer is to add the accept type into the header of the request.

Accept: application/json

Nick

Announcements


Top Tags