PUT

Update External Database Connection


Developer Preview

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

Updates an external database connection.

An external database collection name must be submitted as a path parameter. 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.
Endpoint
PUT
https://www.wixapis.com/wix-data/v1/external-database-connections/{externalDatabaseConnection.name}

Path Params
externalDatabaseConnection.namestringRequired

Name of the external database connection. An external database connection may connect to one or more external data collections or tables. These are represented as connectionName/dataCollectionId.

Body Params
externalDatabaseConnectionExternalDatabaseConnectionRequired

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

Response Object
externalDatabaseConnectionExternalDatabaseConnection

Updated external database connection details.

Update an external database connection
Request
cURL
curl -X PUT \ 'https://www.wixapis.com/wix-data/v1/external-database-connections/MyExternalDatabase' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ -d '{ "externalDatabaseConnection": { "endpoint":"https://example.com/my-external-database", "configuration":{ "secretKey":"2b723306-4d74-42a2-8438-2ff40da3e6b6", "tenantId":"my-wix-site-updated", "environment":"PRODUCTION", "collections":[ "products", "categories" ] } } }'
Response
JSON
{ "externalDatabaseConnection": { "name":"MyExternalDatabase", "endpoint":"https://example.com/my-external-database", "configuration":{ "secretKey":"2b723306-4d74-42a2-8438-2ff40da3e6b6", "tenantId":"my-wix-site-updated", "environment":"PRODUCTION", "collections":[ "products", "categories" ] }, "connectionStatus": {
Errors

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

Event TriggersThis method triggers the following events:
Did this help?