Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Unanswered

How to execute batch webapi requests on power pages?

(0) ShareShare
ReportReport
Posted on by 18
Hello everyone,
according to information on this page Execute batch operations using the Web API (Microsoft Dataverse) - Power Apps | Microsoft Learn I tried to execute a batch request on power pages but I only get "406 (Not Acceptable)" error message. Could you please check if there is anything wrong with my code? Or how else can I execute batch requests?

The code to execute the api request:
 
fetch(`/api/data/v9.2/$batch`, {
        method: 'POST',
        headers: {
          'OData-MaxVersion': '4.0',
          'OData-Version': '4.0',
          'Content-Type': `multipart/mixed; boundary="batch_8a23z8"`,
          'Accept': 'application/json',
          'If-None-Match': 'null',
        },
        body: batchdata,
      })
        .then(response => response.json())
        .then(data => {
          console.log('Batch request success:', data);
        })
        .catch(error => {
          console.error('Batch request error:', error);
          // Log the detailed error response if available
            if (error.responseText) {
                console.error("Server response:", error.responseText);
            }
        });
 
The test value in "batchdata" variable (I tried to type it in as text but it causes error when I update post):
 
 
Thank you for your help in advance!
Categories:

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35