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=WebParthttps://[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?