Incidents
Référence de l'API pour Incidents : chaque handler avec ses champs et un exemple.
Dernière mise à jour :
incident: detail
Récupérer un incident
Renvoie un incident par son identifiant, avec statut, gravité, début, heure de résolution et champs personnalisés.
- Scope requis:
incidents: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:incident:detail",
"payload": {
"id": "00000000-0000-4000-8000-000000000001"
}
}'
incident: list
Lister les incidents
Renvoie une liste filtrée et paginée d’incidents, y compris les résolus, avec statut, gravité et début.
- Scope requis:
incidents: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:incident:list",
"payload": {}
}'
Exemple de réponse
Statut : 200
{
"data": {
"rows": [
{
"id": "00000000-0000-4000-8000-000000000001",
"tenantId": "00000000-0000-4000-8000-000000000002",
"version": 3,
"insertedAt": "2026-01-15T09:30:00.000Z",
"modifiedAt": null,
"insertedById": "00000000-0000-4000-8000-000000000003",
"modifiedById": null,
"title": "Elevated API errors",
"status": "investigating",
"severity": "major",
"startedAt": "2026-01-15T09:30:00.000Z",
"resolvedAt": null,
"sourceMonitorId": null,
"customFields": {}
}
],
"nextCursor": null
}
}
incident: updates
Lister les mises à jour d’un incident
Renvoie la chronologie des mises à jour d’un incident, chacune avec le nom affiché de son auteur.
- Scope requis:
incidents:read - Endpoint:
POST /api/query
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
incidentId |
string (uuid) | oui | Incident |
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:incident:updates",
"payload": {
"incidentId": "00000000-0000-4000-8000-000000000001"
}
}'
incident: open
Ouvrir un incident
Ouvre un nouvel incident sur la page de statut, le lie aux composants concernés et enregistre la première mise à jour dans sa chronologie.
- Scope requis:
incidents:write - Endpoint:
POST /api/write
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
title |
string | oui | Titre |
body |
string | oui | Description |
severity |
“minor” | “major” | “critical” | non | Gravité |
componentIds |
array of string (uuid) | non | Composants concernés |
startedAt |
string (date-time) | non | Début |
sourceMonitorId |
string (uuid) | non |
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:incident:open",
"payload": {
"title": "Elevated API errors",
"body": "We are investigating elevated error rates.",
"severity": "major",
"componentIds": [
"00000000-0000-4000-8000-000000000001"
]
}
}'
Exemple de réponse
Statut : 200
{
"isSuccess": true,
"data": {
"id": "00000000-0000-4000-8000-000000000002"
}
}
incident: post-update
Publier une mise à jour d’incident
Ajoute une mise à jour à un incident ouvert et, au besoin, change son statut dans le même appel.
- Scope requis:
incidents:write - Endpoint:
POST /api/write
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
incidentId |
string (uuid) | oui | Incident |
body |
string | oui | Description |
newStatus |
“investigating” | “identified” | “monitoring” | “resolved” | non | Nouveau statut |
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:incident:post-update",
"payload": {
"incidentId": "00000000-0000-4000-8000-000000000001",
"body": "text",
"newStatus": "investigating"
}
}'
incident: resolve
Résoudre un incident
Marque un incident ouvert comme résolu, enregistre l’heure de résolution et ajoute une mise à jour finale à la chronologie.
- Scope requis:
incidents:write - Endpoint:
POST /api/write
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
incidentId |
string (uuid) | oui | Incident |
body |
string | oui | Description |
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:incident:resolve",
"payload": {
"incidentId": "00000000-0000-4000-8000-000000000001",
"body": "text"
}
}'
incident: update
Modifier un incident
Modifie le titre, la gravité, le début et les champs personnalisés d’un incident sans toucher à son statut. Seuls les appels d’ouverture, de mise à jour et de résolution changent le statut.
- Scope requis:
incidents:write - Endpoint:
POST /api/write
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
id |
string (uuid) | oui | |
version |
number | oui | |
changes |
object | oui | |
changes.title |
string | non | Titre |
changes.status |
“investigating” | “identified” | “monitoring” | “resolved” | non | Statut |
changes.severity |
“minor” | “major” | “critical” | non | Gravité |
changes.startedAt |
string (date-time) | non | Début |
changes.resolvedAt |
string (date-time) | null | non | Résolu |
changes.sourceMonitorId |
string | null | non | |
changes.customFields |
object | non |
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:incident:update",
"payload": {
"id": "00000000-0000-4000-8000-000000000001",
"version": 1,
"changes": {
"title": "text",
"status": "investigating",
"severity": "minor",
"startedAt": "2026-01-15T09:30:00.000Z",
"resolvedAt": "2026-01-15T09:30:00.000Z",
"sourceMonitorId": "text",
"customFields": {}
}
}
}'