Autentizace
Odešlete klíč API jako bearer token. Tento koncový bod ve specifikaci uvádí specifické oprávnění, takže svému klíči udělte to nejmenší možné a místo předpokladů zkontrolujte odpověď.
Sem patří ID vaší organizace
Tento koncový bod přijímá org_id jako parametr dotazu. Pokud ho vynecháte, volání pokryje celý podstrom vašeho nájemce; jeho odesláním volání zúžíte na jednu organizaci.
ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.
Vyzvednout
Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.
curl -X POST https://api.zinndigital.com/v1/uptime/monitors \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "url": <string> }'Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API
Podrobnosti
Gated on `uptime.manage`. The address may be **any public http(s) URL** — we do not need to host it, and it need not belong to the customer at all. Refused with 422 when the address is not a public web address (an internal or non-HTTP address is refused in wording that does not confirm our network shape), when this organisation already watches it, or when its allowance is used up. Every account includes three monitored URLs; further capacity is the `uptime_urls_10` extra.
Parametry
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
org_id (query) | string | Ne | Which organisation in the caller's subtree the monitor belongs to — what the dashboard's org switcher sends. ⛔ **Narrow only:** intersected with what the caller may already writ… |
Tělo požadavku
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
url | string | Ano | Any public http(s) address. Stored canonicalised — userinfo stripped, fragment dropped, default port removed — so what is measured, cached and shown are the same string. |
name | string | Ne | What to call it on screen. Blank falls back to the host. ⛔ `name`, not `label`: `label` is an attribute of DRF's `Field` and cannot be a serializer field name, and a read key th… |
expect_text | string | Ne | Text that must appear in the response for the check to pass. ⭐ This is what catches the failure a status code cannot — a site whose database has gone but whose index still answe… |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
id | string | Ano | — |
url | string | Ano | — |
name | string | Ne | — |
state | string<unknown, up, down, paused> | Ano | ⛔ `unknown` is a real state and is not a synonym for `up` — it means "not checked yet" and is excluded from every uptime percentage. |
enabled | boolean | Ano | — |
expect_text | string | Ne | — |
site_id | string | Ne | Set only when the address happens to be one of this organisation's own sites. Navigation only — the monitor works identically without it, and must, because the product exists to… |
last_result_at | string | Ne | — |
last_up_at | string | Ne | — |
last_down_at | string | Ne | — |
created_at | string | Ano | — |
summary | UptimeSummary | Ne | — |
history | UptimeHistoryPoint[] | Ne | — |
incidents | UptimeIncident[] | Ne | — |
vitals | UptimeVitalsPoint[] | Ne | — |
migration_offer | UptimeMigrationOffer | Ne | — |
Chyby, které může tento koncový bod vrátit
401 · 403 · 422