security

POST /v1/ip-allow

Allow an address or range.

همه نقاط پایانی security

احراز هویت

یک کلید API را به عنوان یک توکن برbearer ارسال کنید. این نقطه پایانی مجوز خاصی را در مشخصات خود ذکر نمی‌کند، بنابراین به جای فرض کردن، حداقل نیازهای کلید خود را بدهید و پاسخ را بررسی کنید.

جایی که شناسه سازمان شما قرار می‌گیرد

این نقطه پایانی 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 در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر می‌کند و درخواست را روی 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 s…

بدنه درخواست

نامنوعالزامیچیست
cidrstringبله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…
labelstringبله
expires_atstringخیر
enabledbooleanخیر

پاسخ

نامنوعالزامیچیست
idstringبله
scopestring<staff_infra, staff_site, customer_site>بله
cidrstringبله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".
labelstringبلهRequired. An unlabelled range is one nobody dares remove, which is how a list grows until it stops being a control.
expires_atstringخیرnull = permanent. An expired entry is NOT deleted - it stays visible and greyed so an operator can see what lapsed and re-add it.
enabledbooleanبله
expiredbooleanبله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_forcebooleanبلهenabled AND not expired - the only field that decides anything.
created_bystringبلهAudit ref of whoever added it (`user:<id>` / `apikey:<id>`).
created_atstringبله