
Hello, guys!
I'm trying to create multiple tasks using web API.
I make request and everything seems to be fine - response with status 200 received.
But the body contains a string like `--batchresponse_s0m3-1d3nt1f1er--` and nothing else, and tasks are not created
POST [Organization URI]/api/data/v8.2/$batch HTTP/1.1
Content-Type: multipart/mixed;boundary=batch_0404c3c5da1c57fe36a677db4ae11f36
Accept: application/json
OData-MaxVersion: 4.0
OData-Version: 4.0
--batch_0404c3c5da1c57fe36a677db4ae11f36
Content-Type: multipart/mixed;boundary=changeset_dc2cc6bdfa809960ae451941a744a247
--changeset_dc2cc6bdfa809960ae451941a744a247
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID: 1
POST [Organization URI]/api/data/v8.2/tasks HTTP/1.1
Content-Type:application/json;type=entry
{"subject":"Task 1 in batch","description":"Task 1 description"}
--changeset_dc2cc6bdfa809960ae451941a744a247
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID: 2 POST
[Organization URI]/api/data/v8.2/tasks HTTP/1.1
Content-Type:application/json;type=entry
{"subject":"Task 2 in batch","description":"Task 2 description"}
--changeset_dc2cc6bdfa809960ae451941a744a247--
--batch_0404c3c5da1c57fe36a677db4ae11f36--
*This post is locked for comments
I have the same question (0)The problem with Batch request is it may succeed in group or fail in group. So add an error handler to see if any errors.
Refer this: community.dynamics.com/.../web-api-bulk-operations