Quantcast
Channel: SharePoint 2013 - Using SharePoint Designer, InfoPath and Other Customizations forum
Viewing all articles
Browse latest Browse all 9368

Cannot add web parts to web part zone via REST/SOAP - Api

$
0
0

Hello, I want to add several web parts (Content Editor and a couple List Web Parts) to a "project page" via REST-Api or SOAP.

My custom page layout has two web part zones.

I have already tried the two SOAP 1.2 Methods "AddWebPart" and "AddWebPartToZone" of the endpoint "/_vti_bin/webpartpages.asmx" without success as it always returns a HTTP 500 with the following non-descriptive Error: 

Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown. 

with errorstring: An error has occurred.


Some more details on my http requests:

Here are the headers I used in my requests:

POST  mySP.sharepoint.com/sites/somesite/_vti_bin/webpartpages.asmx
Content-Type: application/soap+xml; charset=utf-8
X-RequestDigest: <theFormDigest>

Variables in the xml-body of the request:

pageurl: /sites/somesite/Pages/thepage.aspx 
storage: Shared
zoneId: Zone 2 (only for the AddWebPartToZone method of course)
zoneIndex: 1 (only for the AddWebPartToZone method of course)

I completely ran out of ideas and can't find any help. I appreciate any help! If you need more details, please tell me.


Viewing all articles
Browse latest Browse all 9368


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>