How is the API Usage/API Request increased? i am updating 8000 records via a batch in which each record need a callout but my API usage shows only 400 API used after completion of batch
-
Hi user2077606, welcome to SFSE! Please take the time to visit the Help center and read How do I ask a good question. The more details you provide, particularly code you've written, the more likely it is that someone will respond to your question with an answer you'll find helpful.– crmprogdevCommented Jul 1, 2016 at 12:46
1 Answer
The limit on the total number of callouts (HTTP requests or Web services calls) in a transaction is 100. In an asynchronous operation (batchable class), those limits are reset with each new batch called within the batchable class' execution context. That means what you need to do is reduce your batch size to 100 (or less in case more than one attempt is required for the callout to complete). I'd expect that to solve your issue.
Since you don't say what Salesforce edition you're using, I can't advise you regarding your total API limits. See the Salesforce Limits Quick Reference Guide for more.