Monitors
Référence de l'API pour Monitors : chaque handler avec ses champs et un exemple.
Dernière mise à jour :
monitor: detail
Récupérer un moniteur
Renvoie un moniteur par son identifiant, avec URL cible, composant lié et intervalle de contrôle.
- Scope requis:
monitors:read - Endpoint:
POST /api/query
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
id |
string (uuid) | oui |
Exemple de requête
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
Lister les moniteurs
Renvoie une liste filtrée et paginée de moniteurs, avec URL cible, intervalle de contrôle et état actif.
- Scope requis:
monitors:read - Endpoint:
POST /api/query
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
cursor |
string | non | Position issue de nextCursor de la page précédente. |
limit |
integer | non | Lignes par page, 50 par défaut, au maximum 200. |
search |
string | non | Recherche plein texte dans les champs interrogeables. |
sort |
string | non | Champ servant au tri. |
sortDirection |
“asc” | “desc” | non | asc ou desc. |
offset |
integer | non | Nombre de lignes à ignorer. Pour paginer, préfère cursor. |
totalCount |
boolean | non | Avec true, tu reçois aussi total, le nombre de lignes correspondantes. |
includeDeleted |
boolean | non | Avec true, les lignes supprimées sont incluses. Uniquement pour les entités avec suppression logique. |
onlyDeleted |
boolean | non | Avec true, seules les lignes supprimées sont renvoyées. Uniquement pour les entités avec suppression logique, pas avec includeDeleted. |
filter |
object | non | Un filtre de champ avec field, op et value. op est l’un de eq, ne, lt, gt, lte, gte, in. |
filter.field |
string | oui | |
filter.op |
“eq” | “ne” | “lt” | “gt” | “lte” | “gte” | “in” | oui | |
filter.value |
any | oui | |
filters |
array of object | non | Plusieurs filtres de champ, chacun avec field, op et value. op est l’un de eq, ne, lt, gt, lte, gte, in. |
namedFilter |
string | non | Nom d’un filtre prédéfini de l’entité, par exemple une file de travail. |
aggregate |
object | non | Renvoie des valeurs agrégées au lieu de lignes. |
aggregate.groupBy |
string | non | |
aggregate.measures |
array of object | non |
Exemple de requête
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": {}
}'
Exemple de réponse
Statut : 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
Récupérer la disponibilité d’un moniteur
Renvoie l’historique public de disponibilité et de temps de réponse d’un moniteur, limité aux moniteurs liés à un composant affiché publiquement.
- Scope requis:
monitors:read - Endpoint:
POST /api/query
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
monitorId |
string (uuid) | oui | |
range |
“24h” | “30d” | non |
Exemple de requête
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
Lancer la vérification d’un moniteur maintenant
Contrôle immédiatement la cible d’un moniteur et enregistre l’état disponible ou indisponible et le temps de réponse.
- Scope requis:
monitors:write - Endpoint:
POST /api/write
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
monitorId |
string (uuid) | oui |
Exemple de requête
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
Créer un moniteur
Crée un nouveau moniteur (HTTP, mot-clé, expiration SSL, port TCP ou heartbeat) qui contrôle sa cible régulièrement et enregistre la disponibilité.
- Scope requis:
monitors:write - Endpoint:
POST /api/write
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
name |
string | oui | Nom |
kind |
“http” | “keyword” | “ssl-expiry” | “heartbeat” | “tcp-port” | non | Type de vérification |
url |
string | non | URL |
keyword |
string | non | Mot-clé |
keywordMode |
“contains” | “not-contains” | non | Condition |
host |
string | non | Hôte |
port |
integer | non | Port |
sslWarnDays |
integer | non | Alerte avant expiration (jours) |
componentId |
string (uuid) | non | Composant |
intervalSeconds |
“60” | “300” | “600” | “1800” | “3600” | “21600” | “43200” | “86400” | “604800” | non | Intervalle de vérification |
graceSeconds |
integer | non | Délai de grâce (secondes) |
enabled |
boolean | non | Actif |
Exemple de requête
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"
}
}'
Exemple de réponse
Statut : 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
Supprimer un moniteur
Supprime définitivement un moniteur et arrête ses contrôles périodiques.
- Scope requis:
monitors:write - Endpoint:
POST /api/write
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
id |
string (uuid) | oui |
Exemple de requête
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
Créer un jeton de heartbeat
Génère un nouveau jeton de ping pour un moniteur heartbeat et renvoie une seule fois l’URL de ping complète. L’ancien jeton cesse de fonctionner.
- Scope requis:
monitors:write - Endpoint:
POST /api/write
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
monitorId |
string (uuid) | oui |
Exemple de requête
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
Modifier un moniteur
Modifie la configuration d’un moniteur, par exemple sa cible, son intervalle de contrôle ou le composant auquel il rend compte.
- Scope requis:
monitors:write - Endpoint:
POST /api/write
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
id |
string (uuid) | oui | |
version |
number | oui | |
changes |
object | oui | |
changes.name |
string | non | Nom |
changes.kind |
“http” | “keyword” | “ssl-expiry” | “heartbeat” | “tcp-port” | non | Type de vérification |
changes.url |
string | null | non | URL |
changes.keyword |
string | null | non | Mot-clé |
changes.keywordMode |
“contains” | “not-contains” | non | Condition |
changes.host |
string | null | non | Hôte |
changes.port |
integer | null | non | Port |
changes.sslWarnDays |
integer | non | Alerte avant expiration (jours) |
changes.componentId |
string (uuid) | null | non | Composant |
changes.intervalSeconds |
“60” | “300” | “600” | “1800” | “3600” | “21600” | “43200” | “86400” | “604800” | non | Intervalle de vérification |
changes.graceSeconds |
integer | non | Délai de grâce (secondes) |
changes.enabled |
boolean | non | Actif |
Exemple de requête
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
}
}
}'