Post an alert the ntfy way
POST
/api/alerts/{id}/{token}The body is the message; the rest goes in headers or the query. With the token message, it is Gotify's create-message, the secret as ?token= or X-Gotify-Key.
En esta página
Parámetros
| Campo | En | Tipo | Descripción |
|---|---|---|---|
idobligatorio | ruta | string | The alert address's id.
|
tokenobligatorio | ruta | string | The alert address's secret. |
Title | cabecera | string | The alert's title. |
Priority | cabecera | string | 1-5, or min, low, default, high, urgent. |
Tags | cabecera | string | Comma-separated tags. |
Click | cabecera | string | An http or https link the alert opens. |
Actions | cabecera | string | View actions: view, Label, https://link; separated by semicolons. |
Markdown | cabecera | string | yes to render the message as Markdown. |
X-Dedup-Key | cabecera | string | Repeats with the same key fold into one alert for an hour. |
Petición de ejemplo
curl -X POST "https://polaris.example.com/api/alerts/{id}/{token}" \
-H "Authorization: Bearer $POLARIS_API_KEY"Respuestas
| Estado | Qué es |
|---|---|
200 | OK |
También puede dar los errores comunes 400, 401, 403, 404, 429. Ver errores comunes