Նույնականացում
Ուղարկեք API բանալին որպես bearer թոքեն։ Այս վերջնակետը բնութագրում չի նշում որոշակի թույլտվության մասին, ուստի տվեք ձեր բանալուն նվազագույն անհրաժեշտը և ենթադրություններ անելու փոխարեն ստուգեք պատասխանը:
Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն
Այs վերջնակետը ընդունում է org_id-ը որպես հարցման պարամետր: Բաց թողեք այն, և կանչը կընդգրկի ձեր ամբողջ վարձակալության ենթածառը. ուղարկեք այն՝ կանչը մեկ կազմակերպության վրա սահմանափակելու համար:
Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:
Փորձել
Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:
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 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 | Ոչ | — |
Այս վերջնակետի կողմից վերադարձվող սխալները
401 · 403 · 422