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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

What is the Thingworx service json result max size?

Janaki.Raman
7-Bedrock

What is the Thingworx service json result max size?

Hi,

 

I run an API in postman tool which returns 2 mb size of data (77000 lines) but the same API in Thingworx is not returning the entire data instead it returns only one record (176 lines). We have also verified at the backend logs for both API calls, backend returns entire data. what might be the issue here?

 

var head = {
"Content-Type": "application/json",
"client_id": me.ClientId,
"client_secret": me.ClientSecret
};
 

var params = {
proxyScheme: undefined /* STRING */ ,
headers: head /* JSON */ ,
ignoreSSLErrors: false /* BOOLEAN */ ,
useNTLM: undefined /* BOOLEAN */ ,
workstation: undefined /* STRING */ ,
useProxy: undefined /* BOOLEAN */ ,
withCookies: undefined /* BOOLEAN */ ,
proxyHost: undefined /* STRING */ ,
//url: "https://<<server>>/api/bomDetails/" + partNumber, 
timeout: undefined /* NUMBER */ ,
proxyPort: undefined /* INTEGER */ ,
password: undefined /* STRING */ ,
domain: undefined /* STRING */ ,
username: undefined /* STRING */
};

// result: JSON
var result = Resources["ContentLoaderFunctions"].GetJSON(params);

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:Janaki.Raman)

Hi @Janaki.Raman 

 

Per the case, the problem was related to the .json structure. 

 

Regards.

 

--Sharon

View solution in original post

5 REPLIES 5

Hello,

 

After a google search for the size limit of JSON, there doesn't seem to be a consensus on the limit.

But I also use quite large JSON files in some of my projects, not sure if they are as large as yours though.

As an example one is about 400KB and about 14000 rows. This works fine in both Postman and Thingworx.

Are you sure that the call doesn't fail on your Thingworx platform and what you are receiving is a failed JSON message?

 

Regards,

Jens

Hi @jensc ,

 

As I mentioned, API returns 2 mb size of data (77000 lines) in postman tool and there also a possibility that it may go around 5 mb depending on user query.

 

In Thingworx it did not fail to execute the service, it executes and returns only very few data 176 lines(one part detail).

 

 

 

Hello,

 

Alright. There shouldn't be a difference in the result if you are using the same endpoint for both Postman and Thingworx.

I noticed you had commented out the URL: "//url: "https://<<server>>/api/bomDetails/" + partNumber, "

But to me this endpoint would make sense if it returns the BOM for only one part number.

 

Is the large file the BOM for all of your part numbers?

 

Regards,

Jens

Hi @jensc ,

 

Endpoint and the parameters are same at both places. It supposed to return multi-level BOM detail.

slangley
23-Emerald II
(To:Janaki.Raman)

Hi @Janaki.Raman 

 

Per the case, the problem was related to the .json structure. 

 

Regards.

 

--Sharon

Top Tags