Sample Flows

These sample flows illustrate how to establish an external database connection in different ways. They can be helpful jumping-off points as you plan your implementation.

Deploy an out-of-the-box adaptor

Wix offers several out-of-the-box external database adaptors for common platforms. Deploying an out-of-the-box adaptor is a quick way to integrate an external database with a site. To do this:

  1. Set up the external database adaptor for the platform hosting the external database.

  2. Call the Create External Database Connection method and specify the connection's name, the endpoint by which it can be accessed, and any additional configuration details. For connectionType, specify STANDALONE. For example:

    Copy

    The method returns the following response:

    Copy

    You can now access the external database in the CMS and using Wix Data APIs.

Build your own adaptor

You can also build and deploy your own adaptor to integrate an external database directly with a site:

  1. Implement the endpoints for the External Database REST Service Plugin and expose them on a public, https base URL. For example:

    Copy

Note: You can make your adaptor available for integration with one or more sites by creating a Wix app. If you create an app, you can skip the remaining steps.

  1. Call the Create External Database Connection method and specify the connection's name. For the connectionType property, specify WIX_SERVICE_PLUGIN. For example:

    Copy

    The connection is set up with a connectionStatus.successful status of false. For example:

    Copy
  2. Use the publicKey in the response to configure your service to verify that the requests it receives are coming from Wix.

  3. To finish setting up the connection, call the Update External Database Connection method with the same name used when creating the connection. In the externalDatabaseConnection parameter, specify the endpoint by which the service can be accessed. For example:

    Copy

    The method returns the following response:

    Copy

    You can now now access the external database in the CMS and using Wix Data APIs.

Did this help?