deleteExternalDatabaseConnection( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Deletes an external database connection.

Note: Once an external database connection is deleted, it can't be restored. To reconnect the database you need to create a new external database connection.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage External Database Connections
Learn more about app permissions.
Method Declaration
Copy
function deleteExternalDatabaseConnection(name: string): Promise<void>;
Method Parameters
namestringRequired

Name of the external database connection to delete.

JavaScript
import { externalDatabaseConnections } from "wix-data.v2"; import { elevate } from "wix-auth"; const elevatedDeleteExternalDbConnection = elevate( externalDatabaseConnections.deleteExternalDatabaseConnection, ); /* * Sample name value: 'ConnectionOne' */ export async function myDeleteExternalDbConnection(name) { try { await elevatedDeleteExternalDbConnection(name); return; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to void */
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?