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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How to get response in json

VS_10112707
12-Amethyst

How to get response in json

Thingworx/Groups/ getting html response 

 

how can i get json response by using this api in thingworx

ACCEPTED SOLUTION

Accepted Solutions

You need to add header

Acceptapplication/json

Then the response will be in json format. Not sure if this was the question.

What also works (but is not so nice) is to add "<host>/Thingworx/Groups?Accept=application/json" to the url. You can also add maxItems=<number> as by default only 500 items will be returned.

View solution in original post

6 REPLIES 6

 Hi,

 

See page 54 in the attached manual - "Configuration API Service — Content Retrieval (JSON Response Structure)".

How to get Json result from Infotable in thingworx while using any rest api of thingworx

You need to add header

Acceptapplication/json

Then the response will be in json format. Not sure if this was the question.

What also works (but is not so nice) is to add "<host>/Thingworx/Groups?Accept=application/json" to the url. You can also add maxItems=<number> as by default only 500 items will be returned.

Thanks working 

 

 

KP_9595031
4-Participant
(To:nmutter)

Where exactly "maxItems=<number>" has to be added ? Is ii in header or in url, please give some example ..

Hey @KP_9595031,

I just know of the URL parameter maxItems. Example:

- "<host>/Thingworx/Things?Accept=application/json&maxItems=99999" 

If you use more than one parameter in the url you need to add the additionals ones with '&'. If you only want to use maxItems in url and Accept as a header it would be like this

- "<host>/Thingworx/Things?maxItems=99999" (+Accept header)

 

Hope that helps!

Announcements


Top Tags