0

We're currently exploring SharePoint Embedded for the first time and are building our integration using the Visual Studio Code extension.

One challenge we've run into is restoring deleted files. We delete files using this endpoint:

DELETE /drives/{driveId}/items/{itemId}

However, we can't use the me/drive/items/{item-id}/restore endpoint, as it's not applicable in the SharePoint Embedded context.

Question: How can we restore deleted files (from the recycle bin) when working with SharePoint Embedded via the Graph API? Is there an alternative endpoint or process for this?

Thanks in advance!

1 Answer 1

0

The Microsoft Graph API has a resource called fileStorageContainer which an alias for SharePoint Embedded. The fileStorageContainer expose the endpoints to list items in a recycle bin and to restore the item from the recycle bin

List items in the recycle bin

GET /v1.0/storage/fileStorage/containers/{container_id}/recycleBin/items

Restore item

POST /v1.0/storage/fileStorage/containers/{container_id}/recycleBin/items/restore
{
  "ids": ["item_id"]
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.