Uwierzytelnianie
Wyślij klucz API jako token bearer. Ten punkt końcowy nie określa konkretnego uprawnienia w specyfikacji, więc nadaj swojemu kluczowi minimum potrzebnych uprawnień i sprawdź odpowiedź zamiast zakładać.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako parametr zapytania. Pomiń go, a wywołanie obejmie całe drzewo dzierżawy; prześlij go, aby ograniczyć wywołanie do jednej organizacji.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X PATCH https://api.zinndigital.com/v1/ip-allow/{entry_id} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "cidr": <string>, "label": <string> }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
Partial update. Disabling an entry (`enabled: false`) is the reversible way to narrow access during an incident - it keeps the range visible so you can see what you turned off, which a deletion does not.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
entry_id (path) | string | Tak | — |
org_id (query) | string | Nie | — |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
cidr | string | Tak | 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 | Tak | — |
expires_at | string | Nie | — |
enabled | boolean | Nie | — |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
id | string | Tak | — |
scope | string<staff_infra, staff_site, customer_site> | Tak | — |
cidr | string | Tak | 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 | Tak | Required. An unlabelled range is one nobody dares remove, which is how a list grows until it stops being a control. |
expires_at | string | Nie | 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 | Tak | — |
expired | boolean | Tak | 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 | Tak | enabled AND not expired - the only field that decides anything. |
created_by | string | Tak | Audit ref of whoever added it (`user:<id>` / `apikey:<id>`). |
created_at | string | Tak | — |