Pengesahan
Hantar kunci API sebagai token pembawa. Titik akhir ini tidak menyatakan kebenaran tertentu dalam spesifikasi, jadi berikan kunci anda kebenaran minimum yang diperlukan dan semak respons tersebut daripada membuat andaian.
Tempat ID organisasi anda diletakkan
Titik akhir ini mengambil org_id sebagai parameter pertanyaan. Biarkan ia kosong dan panggilan tersebut meliputi keseluruhan subpohon penyewaan anda; hantarkannya untuk mengecilkan panggilan kepada satu organisasi.
ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
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> }'Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
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.
Parameter
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
org_id (query) | string | Tidak | 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… |
Badan permintaan
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
cidr | string | Ya | 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 | Ya | — |
expires_at | string | Tidak | — |
enabled | boolean | Tidak | — |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
id | string | Ya | — |
scope | string<staff_infra, staff_site, customer_site> | Ya | — |
cidr | string | Ya | 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 | Ya | Required. An unlabelled range is one nobody dares remove, which is how a list grows until it stops being a control. |
expires_at | string | Tidak | 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 | Ya | — |
expired | boolean | Ya | 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 | Ya | enabled AND not expired - the only field that decides anything. |
created_by | string | Ya | Audit ref of whoever added it (`user:<id>` / `apikey:<id>`). |
created_at | string | Ya | — |