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
rsoese@systecsrsoese@systecs 

Using the Bulk API directly from an APEX REST callout. Is that possible?

I am currently thinking of ways to connect to arbitrary Force.com orgs and let them share and receive data bigger than 10mb.

I read the SOAP Webservices have many restrictions regarding size of the transmitted data and other limits.

I have used the Bulk API from Java to upload big amount of data and would like to do the same directly from within the plattform.

 

Has anyone done this already and can share experiences?

Is this possible at all?

Or is this a bad idea and better ways to do this exist?

 

I would love to hear from you.

 

Best regards,

 

Robert

Navatar_DbSupNavatar_DbSup

Hi,

 

The Bulk API provides programmatic access to allow you to quickly load your organization's data into Sales force. Bulk API feature is enabled by default for Unlimited, Enterprise, and Developer Editions.

Bulk API is based on REST principles, and is optimized for loading or deleting large sets of data. It allows you to query, insert, update, upsert, or delete a large number of records asynchronously by submitting a number of batches which are processed in the background by Sales force.

 

For more details follow the below links

http://www.salesforce.com/us/developer/docs/api_asynch/index.htm

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

SForceBeWithYouSForceBeWithYou

You can call out from Apex to the Bulk API v2.0 pretty easily.  Here is code to poll a Bulk API job's status:

https://salesforce.stackexchange.com/questions/92008/query-bulk-data-load-jobs-once-completed/369810#369810

Also, here's the Upload Job Data documentation:

https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/upload_job_data.htm

You can send a CSV file in base64 format, no bigger than 150MB.