For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/fr/api/latest/governance-console/mitigate-detections.md. A documentation index is available at /llms.txt.
Language
Datadog site

Mitigate detections

WARNINGNote: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/governance/detections/mitigatehttps://api.us3.datadoghq.com/api/v2/governance/detections/mitigatehttps://api.us5.datadoghq.com/api/v2/governance/detections/mitigatehttps://api.datadoghq.eu/api/v2/governance/detections/mitigatehttps://api.ap1.datadoghq.com/api/v2/governance/detections/mitigatehttps://api.ap2.datadoghq.com/api/v2/governance/detections/mitigatehttps://api.uk1.datadoghq.com/api/v2/governance/detections/mitigatehttps://api.ddog-gov.com/api/v2/governance/detections/mitigatehttps://api.us2.ddog-gov.com/api/v2/governance/detections/mitigate

Présentation

Apply a mitigation to a set of governance detections of a given detection type. When the mitigation type is omitted, the control's configured mitigation is used. The request is accepted for asynchronous processing.

This endpoint requires the governance_console_read permission.

Requête

Body Data (required)

Champ
Type
Description
data [required]
object

The data of a governance mitigation request.

Réponse

Accepted

Exemple de code

Mitigate detections
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/governance/detections/mitigate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "detection_ids": [
        "3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d"
      ],
      "detection_type": "unused_api_keys",
      "mitigation_parameters": {},
      "mitigation_type": "revoke_api_key"
    },
    "type": "governance_control_detection"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/governance/detections/mitigate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "detection_ids": [
        "3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d"
      ],
      "detection_type": "unused_api_keys",
      "mitigation_parameters": {},
      "mitigation_type": "revoke_api_key"
    },
    "type": "governance_control_detection"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/governance/detections/mitigate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "detection_ids": [
        "3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d"
      ],
      "detection_type": "unused_api_keys",
      "mitigation_parameters": {},
      "mitigation_type": "revoke_api_key"
    },
    "type": "governance_control_detection"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/governance/detections/mitigate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "detection_ids": [
        "3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d"
      ],
      "detection_type": "unused_api_keys",
      "mitigation_parameters": {},
      "mitigation_type": "revoke_api_key"
    },
    "type": "governance_control_detection"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/governance/detections/mitigate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "detection_ids": [
        "3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d"
      ],
      "detection_type": "unused_api_keys",
      "mitigation_parameters": {},
      "mitigation_type": "revoke_api_key"
    },
    "type": "governance_control_detection"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/governance/detections/mitigate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "detection_ids": [
        "3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d"
      ],
      "detection_type": "unused_api_keys",
      "mitigation_parameters": {},
      "mitigation_type": "revoke_api_key"
    },
    "type": "governance_control_detection"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/governance/detections/mitigate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "detection_ids": [
        "3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d"
      ],
      "detection_type": "unused_api_keys",
      "mitigation_parameters": {},
      "mitigation_type": "revoke_api_key"
    },
    "type": "governance_control_detection"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/governance/detections/mitigate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "detection_ids": [
        "3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d"
      ],
      "detection_type": "unused_api_keys",
      "mitigation_parameters": {},
      "mitigation_type": "revoke_api_key"
    },
    "type": "governance_control_detection"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/governance/detections/mitigate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "detection_ids": [
        "3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d"
      ],
      "detection_type": "unused_api_keys",
      "mitigation_parameters": {},
      "mitigation_type": "revoke_api_key"
    },
    "type": "governance_control_detection"
  }
}
EOF