Référence de l’API Incidents

Récupérer tous les incidents d’une page

Point de terminaison :

GET /v1/:page_id/incidents?page=:page&per_page=:per_page
  • Le numéro de page par défaut est 1.
  • La valeur par défaut de per_page est 50, avec un maximum de 100 éléments par page.

Exemple de réponse :

[
{
"id": "ckf01m59ueaqb0a32wrljz1yd",
"name": "Rocket is going down",
"started": "2020-09-12T19:05:17.398Z",
"status": "RESOLVED",
"resolved": "2020-09-12T19:09:04.498Z",
"updates": [
{
"id": "ckf01m5ioeaqi0a32jtv8ovp8",
"message": "We are currently investigating this incident.",
"messageHtml": "<p>We are currently investigating this incident.</p>",
"status": "INVESTIGATING",
"notify": true,
"started": "2020-09-12T19:05:17.398Z",
"ended": null,
"duration": 228,
"createdAt": "2020-09-12T19:08:50.160Z"
},
{
"id": "ckf01mnk9eaui0a32mmhgq68g",
"message": "This incident has been resolved.",
"messageHtml": "<p>This incident has been resolved.</p>",
"status": "RESOLVED",
"notify": true,
"started": "2020-09-12T19:09:04.498Z",
"ended": null,
"duration": null,
"createdAt": "2020-09-12T19:09:13.545Z"
}
],
"components": [
{
"id": "ckf01fvnxywz50a35nh1qzssm",
"name": "Website",
"status": "PARTIALOUTAGE",
"showUptime": true,
"site": {
"id": "ckf01fonve9i40a32oas5b0uw",
"name": "Nasa",
"subdomain": "nasa",
"color": null,
"logoUrl": null,
"publicEmail": null
},
"customImpactPercentage": 40
}
],
"user": {
"id": "ckf01g7m4eaqb0a32fl7jl1xx",
"name": "Buzz Aldrin",
"email": "buzz@nasa.com"
}
}
]

Vous pouvez ajouter les paramètres de requête status et !status pour limiter les résultats aux incidents qui ont, ou n’ont pas, l’un des statuts d’une liste séparée par des virgules.

user est le membre de l’espace de travail qui a créé l’incident. Il vaut null lorsque l’incident a été créé automatiquement (par un moniteur, une intégration tierce ou un e-mail).

Récupérer un incident

Point de terminaison :

GET /v1/:page_id/incidents/:incident_id

Exemple de réponse :

{
"id": "ckf01m59ueaqb0a32wrljz1yd",
"name": "Rocket is going down",
"status": "RESOLVED",
"started": "2020-09-12T19:05:17.398Z",
"resolved": "2020-09-12T19:09:04.498Z",
"updates": [
{
"id": "ckf01m5ioeaqi0a32jtv8ovp8",
"message": "We are currently investigating this incident.",
"messageHtml": "<p>We are currently investigating this incident.</p>",
"status": "INVESTIGATING",
"notify": true,
"started": "2020-09-12T19:05:17.398Z",
"ended": null,
"duration": 228,
"createdAt": "2020-09-12T19:08:50.160Z"
},
{
"id": "ckf01mnk9eaui0a32mmhgq68g",
"message": "This incident has been resolved.",
"messageHtml": "<p>This incident has been resolved.</p>",
"status": "RESOLVED",
"notify": true,
"started": "2020-09-12T19:09:04.498Z",
"ended": null,
"duration": null,
"createdAt": "2020-09-12T19:09:13.545Z"
}
],
"components": [
{
"id": "ckf01fvnxywz50a35nh1qzssm",
"name": "Website",
"status": "MAJOROUTAGE",
"showUptime": true,
"site": {
"id": "ckf01fonve9i40a32oas5b0uw",
"name": "Nasa",
"subdomain": "nasa",
"color": null,
"logoUrl": null,
"publicEmail": null
}
}
],
"user": {
"id": "ckf01g7m4eaqb0a32fl7jl1xx",
"name": "Buzz Aldrin",
"email": "buzz@nasa.com"
}
}

Ajouter un incident

Point de terminaison :

POST /v1/:page_id/incidents

Exemple de requête :

{
"name": "Test incident",
"message": "We're currently investigating an issue with the Website",
"components": ["ckf01fvnxywz50a35nh1qzssm"],
"started": "2020-09-12 05:38:47.998",
"status": "INVESTIGATING",
"notify": true,
"statuses": [
{
"id": "ckf01fvnxywz50a35nh1qzssm",
"status": "PARTIALOUTAGE",
"customImpactPercentage": 40
}
],
"translations": {
"name": {
"fr": "Incident de test"
},
"message": {
"fr": "Nous enquêtons actuellement sur un problème avec le site Web"
}
}
}

Les incidents sont publiés sur votre page de statut par défaut. Si vous souhaitez créer un incident non publié, définissez shouldPublish sur false.

Exemple de réponse :

{
"id": "ckf02l5m8z36j0a35qr9q1tq1",
"name": "Test incident",
"status": "INVESTIGATING",
"started": "2020-09-12T03:38:47.998Z",
"resolved": null,
"updates": [],
"components": [
{
"id": "ckf01fvnxywz50a35nh1qzssm",
"name": "Website",
"status": "OPERATIONAL",
"showUptime": true,
"site": {
"id": "ckf01fonve9i40a32oas5b0uw",
"name": "Nasa",
"subdomain": "nasa",
"color": null,
"logoUrl": null,
"publicEmail": null
}
}
],
"translations": {
"name": {
"fr": "Incident de test"
},
"message": {
"fr": "Nous enquêtons actuellement sur un problème avec le site Web"
}
}
}

Ajouter un incident à partir d’un modèle

Point de terminaison :

POST /v1/:page_id/incidents/:template

Exemple de réponse :

{
"id": "cl8hrdsdsasu441sv26yq",
"name": "Investigating Template",
"nameTranslationId": null,
"notify": false,
"status": "INVESTIGATING",
"started": "2022-09-25T19:53:20.778Z",
"resolved": null,
"duration": null,
"createdAt": "2022-09-25T19:53:20.800Z",
"updatedAt": "2022-09-25T19:53:20.800Z",
"automated": false,
"impact": "MAJOROUTAGE",
"appId": null,
"siteId": "cl8hadasdasd6wkxdco",
"importedFrom": null
}

Mettre à jour un incident

Point de terminaison :

PUT /v1/:page_id/incidents/:incident_id

Exemple de requête :

{
"name": "Test incident 2",
"components": ["ckf01fvnxywz50a35nh1qzssm"],
"started": "2020-09-12 05:38:47.998",
"status": "INVESTIGATING",
"notify": true,
"statuses": [
{
"id": "ckf01fvnxywz50a35nh1qzssm",
"status": "OPERATIONAL"
}
],
"translations": {
"name": {
"fr": "Incident de test"
},
"message": {
"fr": "Nous enquêtons actuellement sur un problème avec le site Web"
}
}
}

Exemple de réponse :

{
"id": "ckf02l5m8z36j0a35qr9q1tq1",
"name": "Test incident 2",
"status": "INVESTIGATING",
"started": "2020-09-12T03:38:47.998Z",
"resolved": null,
"updates": [],
"components": [
{
"id": "ckf01fvnxywz50a35nh1qzssm",
"name": "Website",
"status": "OPERATIONAL",
"showUptime": true,
"site": {
"id": "ckf01fonve9i40a32oas5b0uw",
"name": "Nasa",
"subdomain": "nasa",
"color": null,
"logoUrl": null,
"publicEmail": null
}
}
],
"translations": {
"name": {
"fr": "Incident de test"
},
"message": {
"fr": "Nous enquêtons actuellement sur un problème avec le site Web"
}
}
}

Supprimer un incident

Point de terminaison :

DELETE /v1/:page_id/incidents/:incident_id

Exemple de réponse :

{
"id": "ckf02l5m8z36j0a35qr9q1tq1"
}

Obtenir les intervenants d’un incident

Qui a été appelé pour un incident via l’astreinte, si quelqu’un en a accusé réception, et qui le pilote.

Point de terminaison :

GET /v1/:page_id/incidents/:incident_id/responders

Exemple de réponse :

{
"incidentId": "ckf02l5m8z36j0a35qr9q1tq1",
"paged": true,
"acknowledged": true,
"lead": {
"teamMemberId": "clh8nmaan72592bfokqjqd95s1",
"name": "Sam Rivera",
"email": "sam@example.com"
},
"pages": [
{
"teamMemberId": "clh8nmaan72592bfokqjqd95s1",
"name": "Sam Rivera",
"email": "sam@example.com",
"pagedAt": "2026-11-01T12:01:00.000Z"
}
],
"responders": [
{
"teamMemberId": "clh8nmaan72592bfokqjqd95s1",
"name": "Sam Rivera",
"email": "sam@example.com",
"status": "ACKNOWLEDGED",
"acknowledgedAt": "2026-11-01T12:05:00.000Z",
"declinedAt": null
}
]
}

Accuser réception d’un incident

Accuse réception d’un incident au nom de l’utilisateur de la clé d’API. Le premier accusé de réception annule toute escalade encore en attente d’appeler d’autres personnes, et fait de cette personne le responsable de l’incident s’il n’y en a pas. Rien ne change sur la page de statut. Accuser réception une nouvelle fois est sans risque : alreadyAcknowledged vaut alors true.

Point de terminaison :

POST /v1/:page_id/incidents/:incident_id/acknowledge

Exemple de réponse :

{
"incidentId": "ckf02l5m8z36j0a35qr9q1tq1",
"alreadyAcknowledged": false,
"paged": true,
"acknowledged": true,
"lead": {
"teamMemberId": "clh8nmaan72592bfokqjqd95s1",
"name": "Sam Rivera",
"email": "sam@example.com"
},
"pages": [
{
"teamMemberId": "clh8nmaan72592bfokqjqd95s1",
"name": "Sam Rivera",
"email": "sam@example.com",
"pagedAt": "2026-11-01T12:01:00.000Z"
}
],
"responders": [
{
"teamMemberId": "clh8nmaan72592bfokqjqd95s1",
"name": "Sam Rivera",
"email": "sam@example.com",
"status": "ACKNOWLEDGED",
"acknowledgedAt": "2026-11-01T12:05:00.000Z",
"declinedAt": null
}
]
}