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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

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

AdamM.Levine
7-Bedrock

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

Top Tags