Truncated response body when large data return back to RestResponseV2 in RestMessageV2

sieusaopolo15
Tera Guru

Hi,
I'm trying to find posts or documentation related to maximum data response size that an instance can receive from the request. Currently I have an script include which will call an external server and that external server returns very big data. Here is the example codes, after receiving big data like in the code the body only receive half content of that full 30MB ~ 40MB which means my data get from the external server is truncated compare to postman response. Due to not completed JSON the error "Error executing script : SyntaxError: Unterminated string literal (sys_script_include.d2426c9ec0a8016501958bf2ac79c775.script; line 155)" occurs when I use JSON.parse().

 

I wonder if there is any system property reduce my large body RestMessageV2 API calling.

 

 

var request = new sn_ws.RESTMessageV2();
request.setEndpoint(externalURL);
request.setHttpMethod('GET');
var res = request.execute();
var body = res.getBody() // Receive an JSON string which has more than 30k records. Size of these requests are approximately 30MB ~ 40MB each call.
var parseBody = JSON.parse(body);

 

 

 

1 REPLY 1

Maik Skoddow
Tera Patron
Tera Patron