Skip to content

Remove a database access host

DELETE /api/v2/shared-hosting/{accountId}/database-access-hosts/{host}

Stop allowing TCP connections to the account’s MySQL databases from one host. Use the exact host from GET /api/v2/shared-hosting/{accountId}/database-access-hosts. URL-encode it in the path. % is %25. The any-host wildcard is /database-access-hosts/%25. The call answers 204 whether or not the host was listed. localhost cannot be removed because the local socket is always allowed. The account must be active and on cPanel.

Authentication: An API key with the scopes write:hosting and console:services. About keys and scopes

Request

Path parameters

accountIdstringrequired
The web hosting account ID (acct_…).
hoststringrequired
The host from databaseAccessHosts[].host, URL-encoded (% is %25).

Example

DELETE /api/v2/shared-hosting/{accountId}/database-access-hosts/{host}
curl -X DELETE "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/database-access-hosts/acct_01hxa3b4c5d6e7f8g9h0j1k2m3" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

204 Host removed. Also returned when the host was not listed.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400The host is malformed or localhost.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller.
409Conflict. code is account_suspended, account_not_eligible_cpanel, or a route-specific blocker with its own recovery fields.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists.