DeleteItem¶
- POST v1/data/{project_id}/tables/{table_name}/delete_item¶
Request Syntax¶
{
"key": {
"string": {
"B": "blob",
"BS": [
"blob"
],
"N": "string",
"NS": [
"string"
],
"S": "string",
"SS": [
"string"
]
}
},
"expected": {
"string": {
"exists": "boolean",
"value": {
"B": "blob",
"BS": [
"blob"
],
"N": "string",
"NS": [
"string"
],
"S": "string",
"SS": [
"string"
]
}
}
},
"return_values": "string"
}
Request Parameters¶
- key
Primary key of the item to delete.Type: String to object mapRequired: Yes- expected
The conditional block for the DeleteItem operation. All the conditions must be met for the operation to succeed.Type: String to object mapRequired: No- return_values
Type: StringValid values: NONE | ALL_OLD | UPDATED_OLD | ALL_NEW | UPDATED_NEWRequired: No
Response Syntax¶
{
"attributes": {
"string": {
"B": "blob",
"BS": [
"blob"
],
"N": "string",
"NS": [
"string"
],
"S": "string",
"SS": [
"string"
]
}
}
}
Response Elements¶
- attributes
Item attributesType: String to Attributevalue object map
Errors¶
BackendInteractionExceptionClusterIsNotConnectedExceptionConditionalCheckFailedExceptionValidationError
Sample Request¶
{
"key": {
"ForumName": {
"S": "MagnetoDB"
},
"Subject": {
"S": "How do I delete an item?"
}
},
"expected": {
"Subject": {
"value": {
"S": "How do I delete an item?"
}
},
"Replies": {
"exists": false
}
},
"returnValues": "ALL_OLD"
}
Sample Response¶
{
"attributes": {
"LastPostDateTime": {
"S": "201303190422"
},
"ForumName": {
"S": "MagnetoDB"
},
"Message": {
"S": "I want to delete item."
},
"Subject": {
"S": "How do I delete an item?"
},
"LastPostedBy": {
"S": "fred@example.com"
}
}
}