Skip to content

DELETE Handler


By default, it is enabled.

DELETE handlers let the clients delete the selected record by primary key.

import { Model } from "axe-api";

class User extends Model {}

export default User;

Clients can use the following query to fetch data;

$ curl \
  -H "Content-Type: application/json" \
  -X DELETE http://localhost:3000/api/v1/users/1


If the selected record could be deleted properly, Axe API will return HTTP 200.


The record will be marked as deleted but NOT deleted completely from the database table if the Soft Delete feature is enabled. You can use FORCE_DELETE handler when the soft-delete feature is enabled.

Released under the MIT License.