cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EthanSSEH
Frequent Visitor

Http Request Error Help - Sharepoint Calendar - Restore previous version of an event

Hi all,

 

I can not seem to usethis request to restore my SP calendar event back to a previous version.

https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/listitemversion_restore?view=odsp-g...

 

I have tried various versions but have been unable to make the event go back to a previous version without getting errors 401 and 400.

 

Can anybody advise on what I am doing wrong?

 

Thanks

Ethan

 

Please see requests screenshot below.

q2.PNG

5 REPLIES 5
EthanSSEH
Frequent Visitor

This is the current error.
 
{
"status": 400,
"message": "The expression \"web/sites/('XX')/lists/('XX XX')/items/('91')/versions/('3.0')/restoreVersion\" is not valid.\r\nclientRequestId: b02e661c-a3d6-4005-b70d-3ea53dbf4d57\r\nserviceRequestId: 63cbfb9e-401e-1000-c738-adc65d354b59",
"source": "https://XX.sharepoint.com/sites/XX/_api/web/sites/('XX')/lists/('XX%20XX')/items/('91')/versions/('3.0')/restoreVersion",
"errors": [
"-1",
"Microsoft.SharePoint.Client.InvalidClientQueryException"
]
}

Hi @EthanSSEH,

 

Please have a try with the following operation:

_api/web/GetFolderByServerRelativeUrl('library')/Files('document')/Versions/restoreByLabel('VersionLabel')

Annotation 2019-08-20 134401.png

I hope it helps.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

REFERENCING: ..com/sites/ABC/Lists/XYZ/calendar.aspx

 

I tried this solution taking ABC as the Library and XYZ as the file. I think this reverts the whole calendar to a previous version which is not what I want to do.

 

I have a calendar stored in site contents and I am looking to use the patch request to restore a previous version of any item that is modified if the modification is rejected. The idea is that if somebody modifies an event in the calendar and that identification is rejected it is automatically reverted to its previous version.

 

How would I use the above to tackle this?

 

 

 

 

 

 

Hi @EthanSSEH,

 

The events of the calendar are stored as list items in SharePoint. Currently, the SharePoint connector gets the latest information of the list items and has no way to get the previous value of the item. As a workaround, I recommend saving the information elsewhere to display that you want to achieve.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

You can restore a file in a documnet library fine with /restoreLabel('2.0') - but cannot seem to do it on a list item... has anyone found a way to restore a list item ? 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,981)