hosting

POST /v1/uptime/monitors

Start watching a web address.

Semua titik akhir hosting

Pengesahan

Hantar kunci API sebagai token pembawa. Titik akhir ini tidak menyatakan kebenaran tertentu dalam spesifikasi, jadi berikan kunci anda kebenaran minimum yang diperlukan dan semak respons tersebut daripada membuat andaian.

Tempat ID organisasi anda diletakkan

Titik akhir ini mengambil org_id sebagai parameter pertanyaan. Biarkan ia kosong dan panggilan tersebut meliputi keseluruhan subpohon penyewaan anda; hantarkannya untuk mengecilkan panggilan kepada satu organisasi.

ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.

Cuba

Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.

curl -X POST https://api.zinndigital.com/v1/uptime/monitors \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "url": <string> }'

Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API

Butiran

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.

Parameter

NamaJenisDiperlukanApakah ia
org_id (query)stringTidakWhich 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…

Badan permintaan

NamaJenisDiperlukanApakah ia
urlstringYaAny public http(s) address. Stored canonicalised — userinfo stripped, fragment dropped, default port removed — so what is measured, cached and shown are the same string.
namestringTidakWhat 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_textstringTidakText 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…

Respons

NamaJenisDiperlukanApakah ia
idstringYa
urlstringYa
namestringTidak
statestring<unknown, up, down, paused>Ya⛔ `unknown` is a real state and is not a synonym for `up` — it means "not checked yet" and is excluded from every uptime percentage.
enabledbooleanYa
expect_textstringTidak
site_idstringTidakSet 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_atstringTidak
last_up_atstringTidak
last_down_atstringTidak
created_atstringYa
summaryUptimeSummaryTidak
historyUptimeHistoryPoint[]Tidak
incidentsUptimeIncident[]Tidak
vitalsUptimeVitalsPoint[]Tidak
migration_offerUptimeMigrationOfferTidak

Ralat yang boleh dikembalikan oleh titik akhir ini

401 · 403 · 422