Delete the record specified by id
from the database forever and notify subscribed sockets.
DELETE /:model/:id
This destroys the record which matches the id parameter and responds with a JSON dictionary representing the destroyed instance. If no model instance exists matching the specified id, a 404
is returned.
Additionally, a destroy
event will be published to all sockets subscribed to the record room. And all sockets currently subscribed to the record will be unsubscribed from it.
Parameter | Type | Details |
---|---|---|
model | The identity of the containing model. e.g. 'purchase' (in /purchase/7 ) |
|
id | The desired target record's primary key value e.g. '7' (in /purchase/7 ). |
|
id (required) |
The primary key value of the record to destroy, specified in the path. e.g. '7' (in /purchase/7 ) . |
|
callback | If specified, a JSONP response will be sent (instead of JSON). This is the name of the client-side javascript function to call, passing results as the first (and only) argument e.g. ?callback=myJSONPHandlerFn |
Delete Pinkie Pie:
DELETE /pony/4
{
"name": "Pinkie Pie",
"hobby": "kickin",
"id": 4,
"createdAt": "2013-10-18T01:23:56.000Z",
"updatedAt": "2013-11-26T22:55:19.951Z"
}