Deletes a database.
DELETE {{baseUrl}}/api/v2/databases/:name?ifExists=false&restrict=false
Deletes the specified database. If you enable the ifExists parameter, the operation succeeds even if the database does not exist. Otherwise, a 404 failure is returned if the database does not exist. if the drop is unsuccessful.
Request Params
| Key | Datatype | Required | Description |
|---|---|---|---|
ifExists | boolean | Query parameter that specifies how to handle the request for a resource that does not exist: |
true: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource.false: The endpoint throws an error if the resource doesn't exist. | |restrict| boolean | | Whether to drop the database if foreign keys exist that reference any tables in the database.true: Return a warning about existing foreign key references and don't drop the database.false: Drop the database and all objects in the database, including tables with primary or unique keys that are referenced by foreign keys in other tables. |
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"status":"\u003cstring\u003e"}