function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AK-2AK-2 

API usage in batch job

1. I am working on a batch interface using dataloader and have a simple quesiton. If I combine multiple files into a single file and load it through dataloader, will my API usage go down - so if I had 100 records, one in each file and I combine those into a single file, will it only increment the API request count by 1 instead of 100?

2. I tried doing a quick test - loaded 3 records through Lexiloader in a single csv file. When I noted the API usage count before and after the record load, the count didn't go up by 1 or 3 but instead it went up by 5! That completely confused me.

I am doing this exercise to make sure the API limits aren't reached with a large volume batch interface.

Thank you.
KevinPKevinP
So you have a few options here:
  1. Lexiloader's use of the Soap sObject data api
  2. Bulk Api - https://www.salesforce.com/us/developer/docs/api_asynch/
  3. Use Jitterbit / Dataloader.io etc. (a data loader other than lexiloader) Jitterbit is capable of being sripted as well, and has a free version.
As for why lexiloader takes more api calls than you'd expect... If I remember correctly (it's been a few years since I used the Soap API in detail) but I believe the soap api requires at least one non-data transfer call to authenticate. If you had 3 records I can see 5 being a legit # of api calls for the soap api.


KevinPKevinP
well, it seems I can't edit that. 

I wanted to point out, that if you're dealing with large batches of records, you should seriously investigate the batch api.
AK-2AK-2
Kevin,

Thanks for your response. May be it was my wrong assumption - I was thinking since I had selected "Use Bulk API" in LexiLoader settings, it would use fewer than 3 API calls to process the 3 records. Similary, if I had 100 records, it would use fewer than 100 calls even after adding for the authentication and possibly status call after the insert.