CorefinityCorefinityDocs
Open the Control PanelControl Panel
Database · 10 of 12

corestack_external_db_enable

Turn on external database access.

Scope writeRuns as a taskNo secrets returnedCoreCluster
On this page

When to use it

Turn on external database access for an environment, so an outside system (an order system, an ERP or a reporting tool) can connect to its database with its own external user. It gives the environment a fixed public address and a host name such as example-furniture-co-uk-db.cfstack.io, reachable only from the addresses you list; MariaDB itself stays private.

It costs £15.00 / month on the environment's contract (the Dedicated IP address add-on), from when access is on until it is turned off; a contract still in its trial is not charged until the trial ends. Tell the person the price, and send confirm_cost: true only after they agreed. Turning it on needs the site's billing rights: an agency that manages the site but does not pay for it asks the site's owner.

The first turn-on of an environment waits for its nightly maintenance window: the call answers at once with no task, {"operation": null, "external": {...}}, whose status is tonight and window_date the night it applies; the night bills the charge confirmed now. If that charge cannot be checked at night and the price has changed since, the turn-on is not applied: corestack_pending_changes_list shows the change failed with "The monthly charge for external access changed after it was confirmed…", and the person confirms the new charge by turning access on again. Later turn-ons answer a task and apply within minutes. Then add external users with corestack_external_db_user_add.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_external_db_enable with site_id 4211, sources [{"cidr":"203.0.113.10/32","label":"Order system"}]. (Turn on external database access.) Tell me what it returned.

Inputs

confirm_costbooleanRequired

true: the person agreed to the £15.00 / month charge.

site_idintegerRequired

At least 1.

sourcesarray of objectsRequired

The addresses that may connect: at least one. Each is {"cidr": "203.0.113.10/32", "label": "Order system"}: a public IPv4 address or block from /32 to /28, written from its first address. Private, shared, loopback, link-local, multicast and reserved ranges are refused, and so is the whole internet.

Fields of each item
cidrstringRequired

A public IPv4 address or block from /32 to /28, e.g. 203.0.113.10/32.

labelstring or null

What the address is, e.g. "Order system".

Example call

tools/call
{
  "name": "corestack_external_db_enable",
  "arguments": {
    "site_id": 4211,
    "sources": [
      {
        "cidr": "203.0.113.10/32",
        "label": "Order system"
      }
    ],
    "confirm_cost": true
  }
}

If it is refused

ReasonWhat to do
billing_forbiddenThe person cannot change this site's billing; the site's owner turns it on.
invalid_argumentsAn address breaks the rules above, a duplicate, more than 10, no address at all, or confirm_cost is not true; fields names each.
currency_unpublishedThe contract's currency has no published price for the add-on yet.
external_db_not_availableThis environment cannot take external access yet; Corefinity support can say when.
external_db_already_onExternal access is on already (or turning on); change its addresses with corestack_external_db_sources_set.
external_db_failedThe last change to external access failed; Corefinity support retries or releases it.
busyAnother change to this environment is applying.
deletedThe site is deleted (in its grace period).
provisioningThe site is still being created.
demo_keep_requiredThe site or cluster is a free demo that is not kept yet, and the dedicated database address costs money: it starts once the demo is kept. Ask the person to keep it (corestack_demo_keep, or open keep_url); change names this change and what it would cost a month once kept.
managed_elsewhereAnother control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT