+ Start a Discussion
Pratik ChauhanPratik Chauhan 

Erroring Bulk API Client method while updating/Inserting more records (like 1000+ campaign)

Below is code/method from sample project:

 private String invokeRestAPI(String endpointURL)
      WebClient wc = buildWebClient();
       return wc.DownloadString(endpointURL);

In above code "wc.DownloadString(endpointURL)" gives error "The remote server returned an error: (400) Bad Request." while returning result. This problem exist when i do bulk update of records(1000 +).

Can any buddy help me out to solve this out?? Is there any time out problem?? Or any other configurational change needed to sole it out???

Daniel BallingerDaniel Ballinger

Can you expand a bit on the API call you are making to the Bulk API?

Is the problem in creating the batch with the record data?

You mention that it fails with large number of records. There are limits on the batch size that might also be coming into play. See Bulk API Limits (https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_concepts_limits.htm)