Упълномощаване
Изпратете API ключ като носител (bearer token). Тази точка за достъп не указва конкретно разрешение в спецификацията, затова дайте на ключа си най-малкото необходимо и проверете отговора, вместо да правите предположения.
Където отива идентификаторът на вашата организация
Този ендпойнт приема org_id като параметър на заявката. Оставете го празен и извикването ще обхване цялото ви поддървано дърво; изпратете го, за да ограничите извикването до една организация.
ИД на вашата организация се намира на екрана с API ключове във вашето табло за управление, до самия ключ. Това е същият ИД във всяко заявка, която правите.
Опитайте
Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.
curl -X POST https://api.zinndigital.com/v1/uptime/monitors \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "url": <string> }'Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата
Детайли
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.
Параметри
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
org_id (query) | string | Не | 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… |
Тяло на заявката
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
url | string | Да | 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 | Не | 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 | Не | 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… |
Отговор
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
id | string | Да | — |
url | string | Да | — |
name | string | Не | — |
state | string<unknown, up, down, paused> | Да | ⛔ `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 | Да | — |
expect_text | string | Не | — |
site_id | string | Не | 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 | Не | — |
last_up_at | string | Не | — |
last_down_at | string | Не | — |
created_at | string | Да | — |
summary | UptimeSummary | Не | — |
history | UptimeHistoryPoint[] | Не | — |
incidents | UptimeIncident[] | Не | — |
vitals | UptimeVitalsPoint[] | Не | — |
migration_offer | UptimeMigrationOffer | Не | — |
Грешки, които този крайpoint може да върне
401 · 403 · 422