cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
EthanSSEH
Level: Powered On

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
Level: Powered On

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

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.

EthanSSEH
Level: Powered On

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?

 

 

 

 

 

 

Community Support Team
Community Support Team

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.

Jason_David
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,866)