Sitecore Item Web API Client: Delete

Shared Source

This is a quick update to announce that the client library now supports delete operations. There are a couple of considerations that need to be taken into account with regards to Security

  1. You must update the itemwebapi.access attribute for the target site in Sitecore.ItemWebApi.config to ReadWrite
  2. You must use an AuthenticatedSitecoreDataContext
  3. The user must have delete permissions in order to delete items. The easiest way to check if this is the case is to use Sitecore's Security Access Viewer

Warning!

Deleting items is permanent. Deleted items do not go into the recycle bin so please use with caution. Also, the Sitecore Item Web API returns a count of the number of items that were deleted as a result of the query, this count shows you the total number of items that were matched by the query and successfully deleted, it does not also include a count of the descendant items that may have gone with them.

Example

Download the code here