not much experience with REST APIs or writing a code for it. I am working with our IT team and the plan is for them to write REST APIs on their end so that Salesforce can come in and request data (not sure at what frequency yet. Maybe nightly job, or maybe on demand thing). But the idea is simple, Salesforce will make a call to our enterprise DB and will get a JSON back with the response. That JSON will be processed by APEX class to either insert or to update Accounts/Contact in Salesforce.

I am trying to figure out what limits are there either on the JSON files size or number of records that will came back. I have found this document and figured out that there is a limit on the number of API call that can be made, and I can calculate those. But having trouble figuring out size limits.

Please help.



The absolute limit is the Heap Limit (6MB for synchronous code, 12MB for asynchronous code: Execution Governors and Limits), but it takes special planning to deal with parsing the JSON without blowing up the heap limits. Most developers barely manage to parse something maybe half the size, but it's possible to do so if you immediately destroy the string when you're done with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.