security
POST /v1/ip-allow
Allow an address or range.
Аутентификација
Пошаљите API кључ као bearer токен. Ова крајња тачка не наводи конкретну дозволу у спецификацији, па свом кључу доделите најмања неопходна овлашћења и проверите одговор уместо да претпостављате.
Где се уноси ID ваше организације
Ова крајња тачка прихвата org_id као параметар упита. Изоставите га и позив ће обухватити цело подстабло вашег закупа; пошаљите га да бисте сузили позив на једну организацију.
Идентификатор ваше организације се налази на екрану са API кључевима на вашој контролној табли, поред самог кључа. То је исти идентификатор у сваком позиву који упутите.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
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> }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
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.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
org_id (query) | string | Не | 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… |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
cidr | string | Да | 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 is… |
label | string | Да | — |
expires_at | string | Не | — |
enabled | boolean | Не | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
id | string | Да | — |
scope | string<staff_infra, staff_site, customer_site> | Да | — |
cidr | string | Да | 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 | Да | Required. An unlabelled range is one nobody dares remove, which is how a list grows until it stops being a control. |
expires_at | string | Не | 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 | Да | — |
expired | boolean | Да | 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 | Да | enabled AND not expired - the only field that decides anything. |
created_by | string | Да | Audit ref of whoever added it (user:<id> / apikey:<id>). |
created_at | string | Да | — |