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
latticelattice 

Working with Batches through RESTful API : Removing a Batch from a Job

Hi,

I'm new.

After Adding a Batch to a Job, I want to remove the Batch from the Job.

this is my code for adding a Batch to a Job:

            string uri = "https://" + host + "/services/async/" + bulkAPIVersion + "/job/" + jobID + "/batch";
            HttpWebRequest request = HttpWebRequest.Create(uri) as HttpWebRequest;
            request.Method = "POST";
            request.Headers.Add("X-SFDC-Session", sessionID);
            request.ContentType = "text/csv;charset=UTF-8";
            request.Accept = "text/xml";
            SetBody(request, csvData);

            WebResponse response = request.GetResponse();

I've got the Job id and the Batch id. Is there any way to remove the Batch from the Job?

 

Begging for your help.

Thanks a lot.

Best Answer chosen by Admin (Salesforce Developers) 
Vinita_SFDCVinita_SFDC

Hello,

 

It is not possible to delete a batch from a job, only status of a baych can be retrieved. For details please refer the below link at page 67:

 

http://www.salesforce.com/us/developer/docs/api_asynch/api_bulk.pdf

All Answers

Vinita_SFDCVinita_SFDC

Hello,

 

It is not possible to delete a batch from a job, only status of a baych can be retrieved. For details please refer the below link at page 67:

 

http://www.salesforce.com/us/developer/docs/api_asynch/api_bulk.pdf

This was selected as the best answer
latticelattice
Thx for your help