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
anam79anam79 

How to reliably detect whether BULK API is enabled for an org

Hi all,

We have a managed package which loads data into customer Salesforce orgs. We attempt to use the BULK API first and fall back to the REST API if necessary. So we need to be able to detect if the BULK API is enabled.

In our test orgs, if the BULK API is disabled (e.g. Professional Edition), when we try to submit a job, we get FeatureNotEnabled exceptions. This also worked for all our customer orgs pre Spring 2014.

However since Spring 2014, for customer orgs where BULK API is disabled, we are actually able to submit a BULK job. It is only when we go to retrieve the job results, we get Batch errors saying "API_DISABLED_FOR_ORG".

Is there any way to check if the BULK API is enabled, without submitting a job and polling the results? Does anyone know why we are not seeing a FeatureNotEnabled exception on our customer orgs?
Aakaash NairAakaash Nair
Hi Anam,

Please check if “API Enabled” is enabled in the Profile if yes then you should be able to use BULK API.

Please mark this as a best answer if your query  is resolved so others also get help from this thread in future.

Thanks,
Aakaash