hosting
POST /v1/sites/{siteId}/mysql-access
Allow one IP address to reach MySQL as one database user.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea sites.panel_access; o cheie care nu o are va fi respinsă cu 403, nu 404.
Acest endpoint nu necesită un ID de organizație. Cheia ta identifică deja organizația căreia îi aparține, iar răspunsul este limitat la aceasta.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
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> }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
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.
Parametri
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
siteId (path) | Uuid | Da | Site ID (UUIDv7). |
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
user_id | integer | Da | ⛔ The vendor's numeric user id, not the username. A request keyed by username is accepted and stores nothing. |
address | string | Da | A single IPv4 or IPv6 address. Ranges and hostnames are refused. |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
data | SiteMysqlAccessUser[] | Da | — |
Erori pe care le poate returna acest punct final
401 · 403 · 404 · 422 · 429 · 503