Delete Entity operation deletes an existing entity in a table.
Delete Entity request may be constructed as follows. HTTPS is recommended. Replace myaccount with the name of your storage account,
mytable with the name of your table, and myPartitionKey and myRowKey with the name of the partition key and row key identifying the entity to be deleted:
|Method||Request URI||HTTP Version|
The address of the entity to be updated may take a number of forms on the request URI. See the OData Protocol for additional details.
Emulated Storage Service URI
When making a request against the emulated storage service, specify the emulator hostname and Table service port as
127.0.0.1:10002, followed by the emulated storage account name:
|Method||Request URI||HTTP Version|
The Table service in the storage emulator differs from the Windows® Azure™ Table service in several ways. For more information, see Differences Between the Storage Emulator and Azure Storage Services.
The following table describes required and optional request headers.
||Required. Specifies the authentication scheme, account name, and signature. For more information, see Authentication for the Azure Storage Services.|
||Required. Specifies the Coordinated Universal Time (UTC) for the request. For more information, see Authentication for the Azure Storage Services.|
||Optional. Specifies the version of the operation to use for this request. For more information, see Versioning for the Azure Storage Services.|
||Required. The client may specify the ETag for the entity on the request in order to compare to the ETag maintained by the service for the purpose of optimistic concurrency. The delete operation will be performed only if the ETag sent by the client matches the value maintained by the server, indicating that the entity has not been modified since it was retrieved by the client.
To force an unconditional delete, set
||Optional. Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. Using this header is highly recommended for correlating client-side activities with requests received by the server. For more information, see About Storage Analytics Logging and Azure Logging: Using Logs to Track Storage Requests.|
The response includes an HTTP status code and a set of response headers.
A successful operation returns status code 204 (No Content).
The response includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
||This header uniquely identifies the request that was made and can be used for troubleshooting the request. For more information, see Troubleshooting API Operations.|
||Indicates the version of the Table service used to execute the request. This header is returned for requests made against version 2009-09-19 and later.|
||A UTC date/time value generated by the service that indicates the time at which the response was initiated.|
This operation can be performed by the account owner and by anyone with a shared access signature that has permission to perform this operation.
When an entity is successfully deleted, the entity is immediately marked for deletion and is no longer accessible to clients. The entity is later removed from the Table service during garbage collection.
An entity's ETag provides default optimistic concurrency for delete operations. The ETag value is opaque and should not be read or relied upon. Before a delete operation occurs, the Table service verifies that the entity's current ETag value is identical to the ETag value included with the delete request in the
If-Match header. If the values are identical, the Table service determines that the entity has not been modified since it was retrieved, and the delete operation proceeds.
If the entity's ETag differs from that specified with the delete request, the delete operation fails with status code 412 (Precondition Failed). This error indicates that the entity has been changed on the server since it was retrieved. To resolve this error, retrieve the entity again and reissue the request.
To force an unconditional delete operation, set the value of the
If-Match header to the wildcard character (*) on the request. Passing this value to the operation will override the default optimistic concurrency and ignore any mismatch in ETag values.
If-Match header is missing from the request, the service returns status code 400 (Bad Request). A request malformed in other ways may also return 400; for more information, see Table Service Error Codes.
Any application that can authenticate and send an HTTP DELETE request can delete an entity. For more information about constructing a query by using HTTP DELETE, see How to: Add, Modify, and Delete Entities.
For information about performing batch delete operations, see Performing Entity Group Transactions.