Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Thingworx/Groups/ getting html response
how can i get json response by using this api in thingworx
Solved! Go to Solution.
You need to add header
Accept | application/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.
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
Accept | application/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
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!