hosting

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

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

Wszystkie punkty końcowe hosting

Uwierzytelnianie

Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie sites.panel_access; klucz bez niego jest odrzucany z kodem 403, a nie 404.

Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

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> }'

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

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.

Parametry

NazwaTypWymaganeCo to jest
siteId (path)UuidTakSite ID (UUIDv7).

Treść żądania

NazwaTypWymaganeCo to jest
user_idintegerTak⛔ The vendor's numeric user id, not the username. A request keyed by username is accepted and stores nothing.
addressstringTakA single IPv4 or IPv6 address. Ranges and hostnames are refused.

Odpowiedź

NazwaTypWymaganeCo to jest
dataSiteMysqlAccessUser[]Tak

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 404 · 422 · 429 · 503