databases
POST /v1/databases/{databaseId}/allowed-ips
Permit a source address or range to connect.
Autenticazione
Invia una chiave API come bearer token. Questo endpoint non specifica un permesso specifico nella specifica, quindi assegna alla tua chiave i permessi minimi necessari e verifica la risposta invece di fare supposizioni.
Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X POST https://api.zinndigital.com/v1/databases/{databaseId}/allowed-ips \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "cidr": <string>, "description": <string> }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
Gated on `databases.manage`. A bare address is normalised to a `/32` or `/128`. Refused with 422 for an address inside our own cluster network (which would let any pod — including another tenant's database — reach this one), for an unparseable value, for a missing description, and for `0.0.0.0/0` unless `acknowledge_public` is true.
Parametri
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
databaseId (path) | string | Sì | — |
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
cidr | string | Sì | An address or CIDR range. A bare address is normalised to `/32` or `/128`. |
description | string | Sì | Required. An allow-list nobody can explain is one nobody dares prune later. |
acknowledge_public | boolean | No | Required to add `0.0.0.0/0`. Opening a database to the whole internet is allowed but must never happen by pasting a value somebody half understood. |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
id | string | Sì | — |
cidr | string | Sì | — |
description | string | Sì | — |
created_at | string | No | — |
Errori che questo endpoint può restituire
401 · 403 · 404 · 422