Аутентификация
Передайте 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, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в 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