MultiConnectMultiConnectDocs Website home
MultiConnectCloud › Database Deployments

7. Connect from an API deployment

An API deployment on MultiConnectCloud can be linked to a database in the same project. Linking lets the API's servers through the database's allowed list, including when the API moves to new machines.

Linking does not add any connection details to your API. Set the connection string yourself as a secret environment variable on the API deployment. See the API Guide.

To link a database:

Linking or unlinking redeploys the API. The database's Allow linked API deployments toggle (Section 5) must be on for the link to let the API in.

The Linked Database section then shows the database's name and writer Host. Unlink removes the link and stops the API's servers being let in.

If your API migrates the database when it starts, let it retry the connection for a minute or two. The database's allowed list is updated moments after the API's servers are placed, and a first attempt can arrive just before that.