I'm Using this documentation https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/create_job.htm
With this URI https://cs30.salesforce.com/services/async/44.0/jobs/ingest
And this payload {"operation":"insert","object":"Account","contentType":"CSV"}
I am using C# to connect and get a job, from everything I've read so far this should be working.
request.Method = method;
request.ContentType = "application/json";
request.Accept = "application/json";
request.Headers.Add("Authorization", "Bearer " + this.AccessToken);
if (!string.IsNullOrWhiteSpace(body))
{
UTF8Encoding encoding = new UTF8Encoding();
byte[] data = encoding.GetBytes(body);
request.ContentLength = data.Length;
using (var newStream = request.GetRequestStream())
{
newStream.Write(data, 0, data.Length);
}
}
.. Continues to make the request
So my question is I keep getting a 400 Bad Request with this, What am I missing? Thank you!
/services/data/vXX.X/jobs/ingest
?/services/async
in your URL, whereas the documentation mentions it should be/services/data
, have you tried changing that?