hosting

POST /v1/uptime/monitors

Start watching a web address.

Tous les points de terminaison hosting

Authentification

Envoyez une clé d'API en tant que jeton du porteur (bearer token). Cet endpoint n'indique pas de permission spécifique dans la spécification, attribuez donc à votre clé le minimum requis et vérifiez la réponse plutôt que de faire des suppositions.

Où insérer l'ID de votre organisation

Cet point de terminaison prend org_id comme paramètre de requête. Omettez-le et l'appel couvrira l'ensemble de votre sous-arbre de location ; envoyez-le pour restreindre l'appel à une seule organisation.

L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

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

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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.

Paramètres

NomTypeObligatoireQu'est-ce que c'est
org_id (query)stringNonWhich 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…

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
urlstringOuiAny public http(s) address. Stored canonicalised — userinfo stripped, fragment dropped, default port removed — so what is measured, cached and shown are the same string.
namestringNonWhat 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_textstringNonText 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…

Réponse

NomTypeObligatoireQu'est-ce que c'est
idstringOui
urlstringOui
namestringNon
statestring<unknown, up, down, paused>Oui⛔ `unknown` is a real state and is not a synonym for `up` — it means "not checked yet" and is excluded from every uptime percentage.
enabledbooleanOui
expect_textstringNon
site_idstringNonSet 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_atstringNon
last_up_atstringNon
last_down_atstringNon
created_atstringOui
summaryUptimeSummaryNon
historyUptimeHistoryPoint[]Non
incidentsUptimeIncident[]Non
vitalsUptimeVitalsPoint[]Non
migration_offerUptimeMigrationOfferNon

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 422