hosting

POST /v1/sites/{siteId}/mysql-access

Allow one IP address to reach MySQL as one database user.

Alle hosting Endpunkte

Authentifizierung

Senden Sie einen API-Schlüssel als Bearer-Token. Der Schlüssel muss über die Berechtigung sites.panel_access verfügen; ein Schlüssel ohne diese wird mit 403 statt 404 abgelehnt.

Dieser Endpunkt erfordert keine Organisations-ID. Ihr Schlüssel identifiziert bereits die zugehörige Organisation, und die Antwort ist entsprechend eingeschränkt.

Ausprobieren

Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem Dashboard.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/mysql-access \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "user_id": <integer>, "address": <string> }'

Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole

Details

Opens a database port to an address on the public internet, so this requires `sites.panel_access` — the same trust level as the file manager and the database credentials. Only a single IPv4 or IPv6 address is accepted: a hostname or a CIDR range is refused here rather than accepted by the vendor and silently matching nothing. The vendor takes up to 30 minutes to apply the rule.

Parameter

NameTypErforderlichWas es ist
siteId (path)UuidJaSite ID (UUIDv7).

Anfragekörper

NameTypErforderlichWas es ist
user_idintegerJa⛔ The vendor's numeric user id, not the username. A request keyed by username is accepted and stores nothing.
addressstringJaA single IPv4 or IPv6 address. Ranges and hostnames are refused.

Antwort

NameTypErforderlichWas es ist
dataSiteMysqlAccessUser[]Ja

Fehler, die dieser Endpunkt zurückgeben kann

401 · 403 · 404 · 422 · 429 · 503