hosting
POST /v1/uptime/monitors
Start watching a web address.
Аутентификација
Пошаљите API кључ као bearer токен. Ова крајња тачка не наводи конкретну дозволу у спецификацији, па свом кључу доделите најмања неопходна овлашћења и проверите одговор уместо да претпостављате.
Где се уноси ID ваше организације
Ова крајња тачка прихвата 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 конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у 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 write… |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
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 that… |
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 answers… |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
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 | Не | — |
Грешке које ова крајња тачка може вратити
401 · 403 · 422