I'm trying to build a Power Automate flow that will restore the previous version of a site's web page. I've tried a host of various URIs in the Send an HTTP Request, but none seem to work.
What's the correct syntax I should be using here?
I tried: _api/web/lists/getByTitle('Site Pages')/items(11)/versions/restoreByLabel('75.0')
gave me the error Cannot find resource for the request restoreByLabel.
I've tried other methods based on searching the internet...
_api/web/lists/getByTitle('Site Pages')/items(11)/versions/restoreByLabel(75.0) _api/web/lists/getByTitle('Site Pages')/items/11/versions/75.0/restoreByLabel _api/web/lists/getByTitle('Site Pages')/items(11)/versions(75.0)/restoreByLabel etc.
But all of those give me the error that the expression is not valid.
So, at the previous suggestions, I've now tried getfilebyserverrelativeurl:
With the dynamic variables, the URI translates to: /getfilebyserverrelativeurl(‘https:/xxxxx.xxxxxxxx.com/sites/SuccessFactorsKB-DEV/SitePages/Test-Page.aspx’).
and the previous version label to:
If I open a browser and use that URL, I get the correct page.
But the HTTP Request, trying to restore a previous version gives me the error: