security

POST /v1/ip-allow

Allow an address or range.

Toate punctele finale security

Autentificare

Trimiteți o cheie API ca token de tip bearer. Acest punct final nu specifică o permisiune anume în specificație, așa că acordați cheii cele mai puține drepturi necesare și verificați răspunsul în loc să faceți presupuneri.

Unde merge ID-ul organizației tale

Acest punct final acceptă org_id ca parametru de interogare. Omiteți-l și apelul va acoperi întregul subarbore al chiriașului dvs.; trimiteți-l pentru a restrânge apelul la o singură organizație.

ID-ul organizației tale se află pe ecranul cheilor API din panoul de control, lângă cheia însăși. Este același ID în fiecare apel pe care îl faci.

Încearcă

Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.

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

Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API

Detalii

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.

Parametri

NumeTipObligatoriuCe este
org_id (query)stringNuThe 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…

Corp cerere

NumeTipObligatoriuCe este
cidrstringDaAn 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…
labelstringDa
expires_atstringNu
enabledbooleanNu

Răspuns

NumeTipObligatoriuCe este
idstringDa
scopestring<staff_infra, staff_site, customer_site>Da
cidrstringDaCanonical 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".
labelstringDaRequired. An unlabelled range is one nobody dares remove, which is how a list grows until it stops being a control.
expires_atstringNunull = permanent. An expired entry is NOT deleted - it stays visible and greyed so an operator can see what lapsed and re-add it.
enabledbooleanDa
expiredbooleanDaComputed 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_forcebooleanDaenabled AND not expired - the only field that decides anything.
created_bystringDaAudit ref of whoever added it (`user:<id>` / `apikey:<id>`).
created_atstringDa