createExternalDatabaseConnection( )


Creates a new external database connection.

The externalDatabaseConnection parameter must include a name, endpoint, and configuration details for the external database. If any of these are missing, the external database connection isn't created.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage External Database Connections
Manage All Data Resources
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
externalDatabaseConnectionExternalDatabaseConnectionRequired

External database connection details.


connectionTypeConnectionTypeRequired

Connection type.

Learn more about connection types.

Returns
Return Type:Promise<ExternalDatabaseConnection>
Errors

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

Did this help?

deleteExternalDatabaseConnection( )


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

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage External Database Connections
Manage All Data Resources
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
namestringRequired

Name of the external database connection to delete.

Errors

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

Did this help?

getExternalDatabaseConnection( )


Retrieves the specified external database connection.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage External Database Connections
Manage All Data Resources
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
namestringRequired

Name of the external database connection to retrieve.

Returns
Return Type:Promise<ExternalDatabaseConnection>
Errors

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

Did this help?

listExternalDatabaseConnections( )


Lists the site's external database connections.

Note: The method lists both connection types.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage External Database Connections
Manage All Data Resources
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsListExternalDatabaseConnectionsOptions
Returns
Return Type:Promise<ListExternalDatabaseConnectionsResponse>
Errors

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

Did this help?

updateExternalDatabaseConnection( )


Updates an external database connection.

An external database collection name must be provided in name. If an existing external database connection is found with the same name, that connection's details are updated. If no external database connection has that name, the request fails.

Note: After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage External Database Connections
Manage All Data Resources
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
namestringRequired

Name of the external database connection.

An external database connection can connect to one or more external data collections or tables. These appear as connectionName/dataCollectionId.


externalDatabaseConnectionUpdateExternalDatabaseConnectionRequired

Updated external database connection details. The existing connection is replaced with this version.

Returns
Return Type:Promise<ExternalDatabaseConnection>
Errors

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

Did this help?

onExternalDatabaseConnectionCreated( )


Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when an external database connection is created.

Permissions
Manage External Database Connections
Manage All Data Resources
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: ExternalDatabaseConnectionCreatedEnvelope): void | Promise<void>

Did this help?

onExternalDatabaseConnectionDeleted( )


Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when an external database connection is deleted.

Permissions
Manage External Database Connections
Manage All Data Resources
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: ExternalDatabaseConnectionDeletedEnvelope): void | Promise<void>

Did this help?

onExternalDatabaseConnectionUpdated( )


Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when an external database connection is updated.

Permissions
Manage External Database Connections
Manage All Data Resources
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: ExternalDatabaseConnectionUpdatedEnvelope): void | Promise<void>

Did this help?