Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.83 KB

delete.md

File metadata and controls

58 lines (41 loc) · 1.83 KB

Delete an Item in OneDrive

Deletes a OneDrive item by using its ID or path. Note that deleting items using this method will move the items to the Recycle Bin, instead of permanently deleting them.

Prerequisites

To delete an item, the user must have granted the application write access to the item to be deleted.

HTTP request

DELETE /drive/items/{item-id}
DELETE /drive/root:/{item-path}

Optional request headers

Name Value Description
if-match etag If this request header is included and the eTag (or cTag) provided does not match the current tag on the item, a 412 Precondition Failed response is returned and the item will not be deleted.

Request body

Do not supply a request body with this method.

Example

DELETE /drive/items/{item-id}

Response

If successful, this call returns a 204 No Content response to indicate that resource was deleted and there was nothing to return.

HTTP/1.1 204 No Content

Error responses

See Error Responses for more info about how errors are returned.