databases
POST /v1/databases/{databaseId}/allowed-ips
Permit a source address or range to connect.
Authenticatie
Stuur een API-sleutel mee als bearer token. Dit eindpunt vermeldt geen specifieke toestemming in de specificatie, dus geef uw sleutel de minimale rechten die nodig zijn en controleer het antwoord in plaats van zomaar wat aan te nemen.
Dit eindpunt vereist geen organisatie-id. Uw sleutel identificeert al de organisatie waartoe deze behoort, en het antwoord is hierop afgestemd.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw 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> }'Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
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.
Parameters
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
databaseId (path) | string | Ja | — |
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
cidr | string | Ja | An address or CIDR range. A bare address is normalised to `/32` or `/128`. |
description | string | Ja | Required. An allow-list nobody can explain is one nobody dares prune later. |
acknowledge_public | boolean | Nee | 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. |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
id | string | Ja | — |
cidr | string | Ja | — |
description | string | Ja | — |
created_at | string | Nee | — |
Fouten die dit eindpunt kan retourneren
401 · 403 · 404 · 422