Sharepoint REST API GetLimitedWebPartManager method returns empty result

18 views Asked by At

I would like to edit WebParts of a Sharepoint site with Sharepoint REST API. The best option I found so far is to use the GetLimitedWebPartManager method at first to request all WebParts of a site. At the moment Im working with MS PowerAutomate to design this workflow and therefore I request all results of my API-calls as JSON format.

I found this command which should do it:

https://[domain].sharepoint.com/sites/[dev]/_api/web/getFileByServerRelativeUrl('/sites/Example.aspx')/getLimitedWebPartManager(scope=1)/WebParts?$expand=WebPart/Properties

Unfortunately, the response was as following (even tho the site is not empty and has 3 WebParts):

{
  "d": {
    "results": []
  }
}

Also tried something like the following commands, but I think Im still missging something here.

https://[domain].sharepoint.com/sites/[dev]/_api/web/getFileByServerRelativeUrl('/sites/Example.aspx')/getLimitedWebPartManager()/WebParts?$expand=WebPart

https://[domain].sharepoint.com/sites/[dev]/_api/web/getFileByServerRelativeUrl('/sites/Example.aspx')/getLimitedWebPartManager()/WebParts?$select=*&$expand=WebPart

Has anyone an idea what could be causing the empty result?

0

There are 0 answers