hosting
POST /v1/sites/{siteId}/mysql-access
Allow one IP address to reach MySQL as one database user.
Autentifikacija
Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu sites.panel_access; ključ bez nje se odbija sa 403, a ne sa 404.
Ovaj krajnji tačka ne prihvata ID organizacije. Vaš ključ već identifikuje organizaciju kojoj pripada, a odgovor je ograničen na nju.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
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> }'Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
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
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
siteId (path) | Uuid | Da | Site ID (UUIDv7). |
Telo zahteva
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
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. |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
data | SiteMysqlAccessUser[] | Da | — |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 404 · 422 · 429 · 503