Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Problem with WEB API bulk operation

(0) ShareShare
ReportReport
Posted on by 205

Hi EveryOne

I'm using VBA to transfer(get&update) data from DCRM in Excel.

I used WEB API to implement the operation and want to use batch in update operation.

I refered some links about batch request(need boundary...etc)

After finish my code,it doesn't work.

I use fiddler to check the response,some error message like below

HTTP/1.1 400 Bad Request

"Message":"The request line 'POST serviceUri/api/data/v8.1/tasks HTTP/1.1 ' is invalid. The request line at the start of each operation must be of the format 'HttpMethod RequestUrl HttpVersion'. 

But I think i have set the request as the format request.

By the way,my envirment is Windows10 64bit,Office 365 64bit(I know a lot of 64bit problem about the vba)

Request COntent

--batch_AAA123
Content-Type: multipart/mixed;boundary=changeset_BBB456

--changeset_BBB456
Content-Type: application/http
Content-Transfer-Encoding:binary
Content-ID: 1

POST serviceUri/tasks HTTP/1.1
Content-Type: application/json;type=entry
{"subject":"Task 2 in batch"}
--changeset_BBB456
Content-Type: application/http
Content-Transfer-Encoding:binary
Content-ID: 2

POST serviceUri/tasks HTTP/1.1
Content-Type: application/json;type=entry
{"subject":"Task 2 in batch"}
--changeset_BBB456--
--batch_AAA123--

*This post is locked for comments

  • Verified answer
    renton Profile Picture
    renton 205 on at
    RE: Problem with WEB API bulk operation

    Hi

    I've solved my problem.

    I checked my request and found one space behind "HTTP/1.1"

    After delete space,it works well

    Refer Link

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans