Monitors
Riferimento API per Monitors: ogni handler con i suoi campi e un esempio.
Ultimo aggiornamento:
monitor: detail
Ottenere monitor
Restituisce un monitor tramite il suo ID, con URL di destinazione, componente collegato e intervallo di controllo.
- Scope richiesto:
monitors:read - Endpoint:
POST /api/query
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
id |
string (uuid) | sì |
Richiesta di esempio
curl -X POST https://status.example.com/api/query \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:query:monitor:detail",
"payload": {
"id": "00000000-0000-4000-8000-000000000001"
}
}'
monitor: list
Elencare monitor
Restituisce un elenco filtrato e paginato di monitor, con URL di destinazione, intervallo di controllo e stato attivo.
- Scope richiesto:
monitors:read - Endpoint:
POST /api/query
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
cursor |
string | no | Posizione da nextCursor della pagina precedente. |
limit |
integer | no | Righe per pagina, 50 per impostazione predefinita, al massimo 200. |
search |
string | no | Ricerca full-text nei campi ricercabili. |
sort |
string | no | Campo per cui ordinare. |
sortDirection |
“asc” | “desc” | no | asc o desc. |
offset |
integer | no | Numero di righe da saltare. Per sfogliare è meglio cursor. |
totalCount |
boolean | no | Con true ricevi anche total, il numero di righe corrispondenti. |
includeDeleted |
boolean | no | Con true sono incluse le righe eliminate. Solo per entità con eliminazione logica. |
onlyDeleted |
boolean | no | Con true vengono restituite solo le righe eliminate. Solo per entità con eliminazione logica, non insieme a includeDeleted. |
filter |
object | no | Un filtro di campo con field, op e value. op è uno tra eq, ne, lt, gt, lte, gte, in. |
filter.field |
string | sì | |
filter.op |
“eq” | “ne” | “lt” | “gt” | “lte” | “gte” | “in” | sì | |
filter.value |
any | sì | |
filters |
array of object | no | Più filtri di campo, ciascuno con field, op e value. op è uno tra eq, ne, lt, gt, lte, gte, in. |
namedFilter |
string | no | Nome di un filtro predefinito dell’entità, per esempio una coda di lavoro. |
aggregate |
object | no | Restituisce valori aggregati invece di righe. |
aggregate.groupBy |
string | no | |
aggregate.measures |
array of object | no |
Richiesta di esempio
curl -X POST https://status.example.com/api/query \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:query:monitor:list",
"payload": {}
}'
Risposta di esempio
Stato: 200
{
"data": {
"rows": [
{
"id": "00000000-0000-4000-8000-000000000001",
"tenantId": "00000000-0000-4000-8000-000000000002",
"version": 1,
"insertedAt": "2026-01-15T09:30:00.000Z",
"modifiedAt": null,
"insertedById": "00000000-0000-4000-8000-000000000003",
"modifiedById": null,
"name": "API health",
"kind": "http",
"url": "http://93.184.216.34/",
"keyword": null,
"keywordMode": "contains",
"host": null,
"port": null,
"sslWarnDays": 14,
"componentId": "00000000-0000-4000-8000-000000000004",
"intervalSeconds": "300",
"graceSeconds": 59,
"enabled": true,
"_refs": {
"componentId": {
"id": "00000000-0000-4000-8000-000000000004",
"tenantId": "00000000-0000-4000-8000-000000000002",
"version": 1,
"insertedAt": "2026-01-15T09:30:00.000Z",
"modifiedAt": null,
"insertedById": "00000000-0000-4000-8000-000000000003",
"modifiedById": null,
"name": "API",
"description": null,
"status": "operational",
"parentComponentId": null,
"displayOrder": 0,
"showOnPage": true,
"customFields": {}
}
}
}
],
"nextCursor": null
}
}
monitor: uptime-public
Ottenere disponibilità di un monitor
Restituisce lo storico pubblico di disponibilità e tempo di risposta di un monitor, limitato ai monitor collegati a un componente mostrato pubblicamente.
- Scope richiesto:
monitors:read - Endpoint:
POST /api/query
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
monitorId |
string (uuid) | sì | |
range |
“24h” | “30d” | no |
Richiesta di esempio
curl -X POST https://status.example.com/api/query \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:query:monitor:uptime-public",
"payload": {
"monitorId": "00000000-0000-4000-8000-000000000001",
"range": "24h"
}
}'
monitor: check-now
Eseguire subito il controllo di un monitor
Controlla subito la destinazione di un monitor e registra lo stato raggiungibile o non raggiungibile e il tempo di risposta.
- Scope richiesto:
monitors:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
monitorId |
string (uuid) | sì |
Richiesta di esempio
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:monitor:check-now",
"payload": {
"monitorId": "00000000-0000-4000-8000-000000000001"
}
}'
monitor: create
Creare monitor
Crea un nuovo monitor (HTTP, parola chiave, scadenza SSL, porta TCP o heartbeat) che controlla periodicamente la destinazione e registra la disponibilità.
- Scope richiesto:
monitors:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
name |
string | sì | Nome |
kind |
“http” | “keyword” | “ssl-expiry” | “heartbeat” | “tcp-port” | no | Tipo di controllo |
url |
string | no | URL |
keyword |
string | no | Parola chiave |
keywordMode |
“contains” | “not-contains” | no | Condizione |
host |
string | no | Host |
port |
integer | no | Porta |
sslWarnDays |
integer | no | Avviso prima della scadenza (giorni) |
componentId |
string (uuid) | no | Componente |
intervalSeconds |
“60” | “300” | “600” | “1800” | “3600” | “21600” | “43200” | “86400” | “604800” | no | Intervallo di controllo |
graceSeconds |
integer | no | Periodo di tolleranza (secondi) |
enabled |
boolean | no | Attivo |
Richiesta di esempio
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:monitor:create",
"payload": {
"name": "API health",
"url": "http://93.184.216.34/",
"componentId": "00000000-0000-4000-8000-000000000001"
}
}'
Risposta di esempio
Stato: 200
{
"isSuccess": true,
"data": {
"kind": "save",
"id": "00000000-0000-4000-8000-000000000002",
"data": {
"id": "00000000-0000-4000-8000-000000000002",
"tenantId": "00000000-0000-4000-8000-000000000003",
"version": 1,
"insertedAt": "2026-01-15T09:30:00.000Z",
"modifiedAt": null,
"insertedById": "00000000-0000-4000-8000-000000000004",
"modifiedById": null,
"name": "API health",
"kind": "http",
"url": "http://93.184.216.34/",
"keyword": null,
"keywordMode": "contains",
"host": null,
"port": null,
"sslWarnDays": 14,
"componentId": "00000000-0000-4000-8000-000000000001",
"intervalSeconds": "300",
"graceSeconds": 59,
"enabled": true
},
"changes": {
"name": "API health",
"kind": "http",
"url": "http://93.184.216.34/",
"keywordMode": "contains",
"sslWarnDays": 14,
"componentId": "00000000-0000-4000-8000-000000000001",
"intervalSeconds": "300",
"graceSeconds": 59,
"enabled": true
},
"previous": {},
"isNew": true,
"entityName": "monitor"
}
}
monitor: delete
Eliminare monitor
Elimina definitivamente un monitor e ne interrompe i controlli periodici.
- Scope richiesto:
monitors:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
id |
string (uuid) | sì |
Richiesta di esempio
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:monitor:delete",
"payload": {
"id": "00000000-0000-4000-8000-000000000001"
}
}'
monitor: mint-heartbeat-token
Creare token di heartbeat
Genera un nuovo token di ping per un monitor heartbeat e restituisce una sola volta l’URL di ping completo. Il token precedente smette di funzionare.
- Scope richiesto:
monitors:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
monitorId |
string (uuid) | sì |
Richiesta di esempio
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:monitor:mint-heartbeat-token",
"payload": {
"monitorId": "00000000-0000-4000-8000-000000000001"
}
}'
monitor: update
Modificare monitor
Modifica la configurazione di un monitor, ad esempio destinazione, intervallo di controllo o componente a cui riporta.
- Scope richiesto:
monitors:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
id |
string (uuid) | sì | |
version |
number | sì | |
changes |
object | sì | |
changes.name |
string | no | Nome |
changes.kind |
“http” | “keyword” | “ssl-expiry” | “heartbeat” | “tcp-port” | no | Tipo di controllo |
changes.url |
string | null | no | URL |
changes.keyword |
string | null | no | Parola chiave |
changes.keywordMode |
“contains” | “not-contains” | no | Condizione |
changes.host |
string | null | no | Host |
changes.port |
integer | null | no | Porta |
changes.sslWarnDays |
integer | no | Avviso prima della scadenza (giorni) |
changes.componentId |
string (uuid) | null | no | Componente |
changes.intervalSeconds |
“60” | “300” | “600” | “1800” | “3600” | “21600” | “43200” | “86400” | “604800” | no | Intervallo di controllo |
changes.graceSeconds |
integer | no | Periodo di tolleranza (secondi) |
changes.enabled |
boolean | no | Attivo |
Richiesta di esempio
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:monitor:update",
"payload": {
"id": "00000000-0000-4000-8000-000000000001",
"version": 1,
"changes": {
"name": "text",
"kind": "http",
"url": "text",
"keyword": "text",
"keywordMode": "contains",
"host": "text",
"port": 1,
"sslWarnDays": 1,
"componentId": "00000000-0000-4000-8000-000000000001",
"intervalSeconds": "60",
"graceSeconds": 1,
"enabled": true
}
}
}'