For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/fr/api/latest/delivery-performance/send-an-incident-event.md. A documentation index is available at /llms.txt.
Language
Datadog site

Envoyer un événement d'incident

POSThttps://api.datadoghq.com/api/v2/dora/failurehttps://api.us3.datadoghq.com/api/v2/dora/failurehttps://api.us5.datadoghq.com/api/v2/dora/failurehttps://api.datadoghq.eu/api/v2/dora/failurehttps://api.ap1.datadoghq.com/api/v2/dora/failurehttps://api.ap2.datadoghq.com/api/v2/dora/failurehttps://api.uk1.datadoghq.com/api/v2/dora/failurehttps://api.ddog-gov.com/api/v2/dora/failurehttps://api.us2.ddog-gov.com/api/v2/dora/failure

Présentation

Utilisez cet endpoint d'API pour fournir des données d'incident pour les métriques DORA. Notez que le taux d'échec des modifications et le temps de récupération après un déploiement en échec sont calculés à partir des échecs de modifications détectés sur les déploiements, et non à partir des événements d'incident envoyés via cet endpoint. Le suivi des incidents offre une vue côte à côte de la façon dont les déploiements en échec se traduisent en incidents réels, notamment leur gravité et leur fréquence.

Requête

Body Data (required)

Champ
Type
Description
data [required]
object

La requête de création d'un événement dʼincident DORA.

Réponse

OK

Response after receiving a DORA incident event.

Champ
Type
Description
data [required]
object

Response after receiving a DORA incident event.

Exemple de code

Envoyer un événement d'incident
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "custom_tags": [
        "language:java",
        "department:engineering"
      ],
      "env": "staging",
      "finished_at": 1693491984000000000,
      "git": {
        "commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
        "repository_url": "https://github.com/organization/example-repository"
      },
      "name": "Webserver is down failing all requests.",
      "services": [
        "test-service"
      ],
      "severity": "High",
      "started_at": 1693491974000000000,
      "team": "backend",
      "version": "v1.12.07"
    }
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "custom_tags": [
        "language:java",
        "department:engineering"
      ],
      "env": "staging",
      "finished_at": 1693491984000000000,
      "git": {
        "commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
        "repository_url": "https://github.com/organization/example-repository"
      },
      "name": "Webserver is down failing all requests.",
      "services": [
        "test-service"
      ],
      "severity": "High",
      "started_at": 1693491974000000000,
      "team": "backend",
      "version": "v1.12.07"
    }
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "custom_tags": [
        "language:java",
        "department:engineering"
      ],
      "env": "staging",
      "finished_at": 1693491984000000000,
      "git": {
        "commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
        "repository_url": "https://github.com/organization/example-repository"
      },
      "name": "Webserver is down failing all requests.",
      "services": [
        "test-service"
      ],
      "severity": "High",
      "started_at": 1693491974000000000,
      "team": "backend",
      "version": "v1.12.07"
    }
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "custom_tags": [
        "language:java",
        "department:engineering"
      ],
      "env": "staging",
      "finished_at": 1693491984000000000,
      "git": {
        "commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
        "repository_url": "https://github.com/organization/example-repository"
      },
      "name": "Webserver is down failing all requests.",
      "services": [
        "test-service"
      ],
      "severity": "High",
      "started_at": 1693491974000000000,
      "team": "backend",
      "version": "v1.12.07"
    }
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "custom_tags": [
        "language:java",
        "department:engineering"
      ],
      "env": "staging",
      "finished_at": 1693491984000000000,
      "git": {
        "commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
        "repository_url": "https://github.com/organization/example-repository"
      },
      "name": "Webserver is down failing all requests.",
      "services": [
        "test-service"
      ],
      "severity": "High",
      "started_at": 1693491974000000000,
      "team": "backend",
      "version": "v1.12.07"
    }
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "custom_tags": [
        "language:java",
        "department:engineering"
      ],
      "env": "staging",
      "finished_at": 1693491984000000000,
      "git": {
        "commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
        "repository_url": "https://github.com/organization/example-repository"
      },
      "name": "Webserver is down failing all requests.",
      "services": [
        "test-service"
      ],
      "severity": "High",
      "started_at": 1693491974000000000,
      "team": "backend",
      "version": "v1.12.07"
    }
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "custom_tags": [
        "language:java",
        "department:engineering"
      ],
      "env": "staging",
      "finished_at": 1693491984000000000,
      "git": {
        "commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
        "repository_url": "https://github.com/organization/example-repository"
      },
      "name": "Webserver is down failing all requests.",
      "services": [
        "test-service"
      ],
      "severity": "High",
      "started_at": 1693491974000000000,
      "team": "backend",
      "version": "v1.12.07"
    }
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "custom_tags": [
        "language:java",
        "department:engineering"
      ],
      "env": "staging",
      "finished_at": 1693491984000000000,
      "git": {
        "commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
        "repository_url": "https://github.com/organization/example-repository"
      },
      "name": "Webserver is down failing all requests.",
      "services": [
        "test-service"
      ],
      "severity": "High",
      "started_at": 1693491974000000000,
      "team": "backend",
      "version": "v1.12.07"
    }
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "custom_tags": [
        "language:java",
        "department:engineering"
      ],
      "env": "staging",
      "finished_at": 1693491984000000000,
      "git": {
        "commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
        "repository_url": "https://github.com/organization/example-repository"
      },
      "name": "Webserver is down failing all requests.",
      "services": [
        "test-service"
      ],
      "severity": "High",
      "started_at": 1693491974000000000,
      "team": "backend",
      "version": "v1.12.07"
    }
  }
}
EOF