security

POST /v1/ip-allow

Allow an address or range.

Všechny koncové body security

Autentizace

Odešlete klíč API jako bearer token. Tento koncový bod ve specifikaci uvádí specifické oprávnění, takže svému klíči udělte to nejmenší možné a místo předpokladů zkontrolujte odpověď.

Sem patří ID vaší organizace

Tento koncový bod přijímá org_id jako parametr dotazu. Pokud ho vynecháte, volání pokryje celý podstrom vašeho nájemce; jeho odesláním volání zúžíte na jednu organizaci.

ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.

Vyzvednout

Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.

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

Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API

Podrobnosti

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.

Parametry

NázevTypPožadovánoCo to je
org_id (query)stringNeThe 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…

Tělo požadavku

NázevTypPožadovánoCo to je
cidrstringAnoAn 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…
labelstringAno
expires_atstringNe
enabledbooleanNe

Odpověď

NázevTypPožadovánoCo to je
idstringAno
scopestring<staff_infra, staff_site, customer_site>Ano
cidrstringAnoCanonical 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".
labelstringAnoRequired. An unlabelled range is one nobody dares remove, which is how a list grows until it stops being a control.
expires_atstringNenull = permanent. An expired entry is NOT deleted - it stays visible and greyed so an operator can see what lapsed and re-add it.
enabledbooleanAno
expiredbooleanAnoComputed 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_forcebooleanAnoenabled AND not expired - the only field that decides anything.
created_bystringAnoAudit ref of whoever added it (`user:<id>` / `apikey:<id>`).
created_atstringAno