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
Jason GeigerJason Geiger 

Do Bulk API calls count against standard API limit? - Docs seem to disagree

These two documents tell me opposite things, so I was curious if I could have them cleared up.

When I execute a Bulk API call, does it count against my API Limit?

My reading of this link says no:
http://help.salesforce.com/HTViewHelpDoc?id=integrate_api_rate_limiting.htm
"These limits do not apply to functional limits of Salesforce APIs that are not tied to API calls. An example would be the Batch Limit for Bulk API, which is governed by its own limit, and not monitored as an API usage limit."

Buy this link specifically says yes:
https://www.salesforce.com/us/developer/docs/api_asynch/Content/asynch_api_concepts_limits.htm
"Bulk API use is subject to the standard API usage limits. Each HTTP request counts as one call for the purposes of calculating usage limits."

So which is it?

And then as a followup, in my situation, why would I ever use the Bulk API over just writing my own APEX REST service?

My situation: I am updating records on 3 SObjects every 5 minutes or so from an external system. I'm updaing only a few fields, and only updating changes since the last update, which will be fairly minimal in most cases. Anyway, the Bulk API costs me 4 calls per object (Start job, batch, end job, query batch results), so 12 API calls, plus login.

But I can include all of that data in a single rest call to a custom APEX service, which could return results, and that would cost me one API call, plus login.

There are certainly cases where Bulk API would be better but I am thinking for my case, I should just roll my own. Even once i get very large datasets, I can split them up into 12 chunks before Bulk is less costly.

Thanks
 

Best Answer chosen by Jason Geiger
ShashForceShashForce
Hi Jason,

The first statement means that the API "Functional" Limits are not tied to API "Usage" limits.

For e.g., "batch size of Bulk API", is not a "usage" limit, but a "functional" limit. "Number of bulk API calls" is a "Usage" limit.

Regarding the use case of Bulk API vs an HTTP request, Bulk API should only be used when you are processing thousands of records at once.

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank

All Answers

ShashForceShashForce
Hi Jason,

The first statement means that the API "Functional" Limits are not tied to API "Usage" limits.

For e.g., "batch size of Bulk API", is not a "usage" limit, but a "functional" limit. "Number of bulk API calls" is a "Usage" limit.

Regarding the use case of Bulk API vs an HTTP request, Bulk API should only be used when you are processing thousands of records at once.

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
This was selected as the best answer
Jason GeigerJason Geiger
As someone new to SFDC, seeing the difference in functional vs usage language slipped right past me, especially since I'v never seenthe term 'functional limit' anywhere in documentation. I can't even find anything when searching for "salesforce functional api limits".