> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # DeleteExternalDatabaseConnection # Package: externalDatabases # Namespace: ExternalDatabaseConnectionService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/cms/external-databases/external-database-connection/delete-external-database-connection.md ## Permission Scopes: Manage External Database Connections: SCOPE.DC-DATA.EXTERNAL-DATABASE-CONNECTIONS-MANAGE ## Introduction Deletes an external database connection. > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database, create a new external database connection. --- ## REST API ### Schema ``` Method: deleteExternalDatabaseConnection Description: Deletes an external database connection. > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database, create a new external database connection. URL: https://www.wixapis.com/wix-data/v1/external-database-connections/{name=**} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: name Method parameters: query param name: name | type: name | description: Name of the external database connection to delete. | required: true Return type: DeleteExternalDatabaseConnectionResponse EMPTY-OBJECT {} ``` ### Examples ### Delete an external database connection ```curl curl -X DELETE \ 'https://www.wixapis.com/wix-data/v1/external-database-connections/MyExternalDatabase' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.externalDatabases.ExternalDatabaseConnectionService.deleteExternalDatabaseConnection(name) Description: Deletes an external database connection. > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database, create a new external database connection. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: name Method parameters: param name: name | type: string | description: Name of the external database connection to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteExternalDatabaseConnection ```javascript import { externalDatabaseConnections } from '@wix/data'; async function deleteExternalDatabaseConnection(name) { const response = await externalDatabaseConnections.deleteExternalDatabaseConnection(name); }; ``` ### deleteExternalDatabaseConnection (with elevated permissions) ```javascript import { externalDatabaseConnections } from '@wix/data'; import { auth } from '@wix/essentials'; async function myDeleteExternalDatabaseConnectionMethod(name) { const elevatedDeleteExternalDatabaseConnection = auth.elevate(externalDatabaseConnections.deleteExternalDatabaseConnection); const response = await elevatedDeleteExternalDatabaseConnection(name); } ``` ### deleteExternalDatabaseConnection (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { externalDatabaseConnections } from '@wix/data'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { externalDatabaseConnections }, // Include the auth strategy and host as relevant }); async function deleteExternalDatabaseConnection(name) { const response = await myWixClient.externalDatabaseConnections.deleteExternalDatabaseConnection(name); }; ``` ---