Autenticação
Envie uma chave de API como um token bearer. Este endpoint não especifica uma permissão específica na documentação, portanto, conceda à sua chave o mínimo necessário e verifique a resposta em vez de assumir.
Onde vai o ID da sua organização
Este endpoint aceita org_id como parâmetro de consulta. Omita-o e a chamada abrangerá toda a sua subárvore de locatários; envie-o para restringir a chamada a uma única organização.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
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/ip-allow \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "cidr": <string>, "label": <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
Adds one entry. A bare address is normalised to a host network (`203.0.113.7` becomes `203.0.113.7/32`) so the list holds one shape and you cannot add the same fact twice in two spellings. `0.0.0.0/0` and `::/0` are refused, and so is any prefix broader than /8 (IPv4) or /32 (IPv6): an entry that admits the whole internet is the same as having no allow-list, while reading on screen as though something is protected.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id (query) | string | Não | The organization to act on. Omitted (or empty) means your own. A reseller managing a client org must name it - defaulting silently would edit the reseller's own list while the s… |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
cidr | string | Sim | An address or a CIDR range. `0.0.0.0/0` and `::/0` are refused, as is anything broader than /8 (IPv4) or /32 (IPv6). Both families are checked - rejecting only the IPv4 literal… |
label | string | Sim | — |
expires_at | string | Não | — |
enabled | boolean | Não | — |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | string | Sim | — |
scope | string<staff_infra, staff_site, customer_site> | Sim | — |
cidr | string | Sim | Canonical CIDR. A bare address is stored as a host network (`/32`, or `/128` for IPv6) so one column answers both "is this a range" and "does it contain X". |
label | string | Sim | Required. An unlabelled range is one nobody dares remove, which is how a list grows until it stops being a control. |
expires_at | string | Não | null = permanent. An expired entry is NOT deleted - it stays visible and greyed so an operator can see what lapsed and re-add it. |
enabled | boolean | Sim | — |
expired | boolean | Sim | Computed server-side. Two surfaces deriving "is this still in force?" from a raw timestamp is two implementations of one decision, and they disagree on the boundary second. |
in_force | boolean | Sim | enabled AND not expired - the only field that decides anything. |
created_by | string | Sim | Audit ref of whoever added it (`user:<id>` / `apikey:<id>`). |
created_at | string | Sim | — |