CorefinityCorefinityDocs
Open the Control PanelControl Panel
Database · 10 of 11

Turn external database access on

Gives the environment a fixed public address and a host name that only the addresses you list can reach, as a paid add-on charged monthly from when access is on. It needs a person who can change the site's billing, and confirm_cost: true once the charge in external.price of the database details is agreed. The first turn-on is applied in the environment's nightly maintenance window and answers operation: null; later ones start at once.

POST/api/corestack/sites/{site}/external-db/enable

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Body

confirm_costbooleanRequired

True once you have agreed to the monthly charge.

sourcesarray of objectsRequired

Up to 10 items.

Fields of each item
cidrstringRequired

A public IPv4 address, or a block from /32 to /28 written from its first address. Private, shared, loopback, link-local, multicast, reserved and documentation ranges are refused.

labelstring or null

Up to 64 characters.

Returns

202 Access is being turned on (operation to follow), or, the first time, is queued for the maintenance window (operation: null, with external as it now reads). Poll the operation until it finishes.

Fields of the 202 answer

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403billing_forbiddenBilling is for the organisation's owner and billing contacts. Ask one of them to do this.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409busyAnother operation is running on the site. Wait for it to finish.
409change_pendingA change is already queued for tonight. Apply it now or cancel it first.
409demo_keep_requiredCreating CoreStack sites needs the demo to be kept first. Keep your demo, then try again.
409external_db_already_onExternal access is already on. Nothing to do.
409external_db_failedExternal access could not be turned on. Contact support so it can be finished or undone.
409restart_batches_offChanges cannot be queued for the maintenance window at the moment. Apply the change now instead.
422invalidFix the field named in field; errors says why.
422external_db_not_availableExternal access is not available on the environment yet. Ask support.
429rate_limitedWait for the seconds in Retry-After.
502upstream_unavailableA service the action depends on did not answer. Try again later.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/external-db/enable \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm_cost": true,
    "sources": [
      {
        "cidr": "198.51.100.64/29",
        "label": "Order system"
      }
    ]
  }'
{
  "external": {
    "address": null,
    "available": true,
    "database": "application",
    "enabled_at": null,
    "enabled_by": null,
    "host": null,
    "moved_at": null,
    "operation": null,
    "port": 3306,
    "price": {
      "amount": "15.00",
      "billed_on": "corestack",
      "currency": "GBP",
      "label": "Dedicated IP address",
      "period": "month"
    },
    "sanitised": false,
    "sources": [
      {
        "added_at": null,
        "added_by": null,
        "cidr": "198.51.100.64/29",
        "label": "Order system",
        "pending": true
      }
    ],
    "sources_cap": 10,
    "status": "tonight",
    "tls": "optional",
    "window_date": "2026-11-04"
  },
  "operation": null
}
Try it

Try it is off for this endpointIt can add to your bill. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT