0

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: HTTP Request

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:

Previous version label

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: enter image description here

3
  • Please share the other details that you are using in the power automate flow - http action to understand your issue better.CommentedNov 13, 2024 at 12:09
  • I think for pages you should use the getFileByServerRelativeUrl and get the versions and restore by label. Can you show your Flow HTTP action?
    – Danny
    CommentedNov 13, 2024 at 18:16
  • Updated question after trying getfilebyserverrelativeurl...
    – JeffW
    CommentedNov 18, 2024 at 15:36

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.