hosting
POST /v1/sites/{siteId}/mysql-access
Allow one IP address to reach MySQL as one database user.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão sites.panel_access; uma chave sem ela é recusada com 403, e não 404.
Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
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> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
siteId (path) | Uuid | Sim | Site ID (UUIDv7). |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
user_id | integer | Sim | ⛔ The vendor's numeric user id, not the username. A request keyed by username is accepted and stores nothing. |
address | string | Sim | A single IPv4 or IPv6 address. Ranges and hostnames are refused. |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
data | SiteMysqlAccessUser[] | Sim | — |
Erros que este endpoint pode retornar
401 · 403 · 404 · 422 · 429 · 503