cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Frequent Visitor

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

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"
]
}
Highlighted
Community Support
Community Support

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

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.

Highlighted
Frequent Visitor

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

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?

 

 

 

 

 

 

Highlighted
Community Support
Community Support

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

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.

Highlighted
Frequent Visitor

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

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Kudoed Authors
Users online (7,148)