For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/api/latest/security-monitoring/start-a-rule-proposal.md. A documentation index is available at /llms.txt.
Language
Datadog site

Start a rule proposal

WARNINGNote: This endpoint is in Preview and is subject to change. To request access, contact Datadog support or your Customer Success Manager.
POSThttps://api.datadoghq.com/api/v2/security_monitoring/rules/proposalshttps://api.us3.datadoghq.com/api/v2/security_monitoring/rules/proposalshttps://api.us5.datadoghq.com/api/v2/security_monitoring/rules/proposalshttps://api.datadoghq.eu/api/v2/security_monitoring/rules/proposalshttps://api.ap1.datadoghq.com/api/v2/security_monitoring/rules/proposalshttps://api.ap2.datadoghq.com/api/v2/security_monitoring/rules/proposalshttps://api.uk1.datadoghq.com/api/v2/security_monitoring/rules/proposalshttps://api.ddog-gov.com/api/v2/security_monitoring/rules/proposalshttps://api.us2.ddog-gov.com/api/v2/security_monitoring/rules/proposals

Overview

Start generating a proposed Cloud SIEM detection rule from a natural-language description, or from an SPL or KQL rule. The proposal is based on your organization's log sources, log fields, and existing detection rules. When logs from the matching source are available, the proposed query is tested against your recent logs.

The proposed rule is generated asynchronously. This endpoint returns a proposal id with the status pending. To get the proposed rule, pass this id to the get-a-rule-proposal endpoint and poll the endpoint until the status is completed or failed. A proposal usually takes a few minutes, and up to 10 minutes.

This endpoint does not create or modify any detection rules in Cloud SIEM. To translate many rules at once, use batch migrations instead.

This endpoint requires the security_monitoring_rules_write permission.

OAuth apps require the security_monitoring_rules_write authorization scope to access this endpoint.

Request

Body Data (required)

Field
Type
Description
data [required]
object

Data of the rule proposal to start.

Response

Accepted

Response to a started rule proposal.

Field
Type
Description
data [required]
object

Data of the started rule proposal.

Code Example

Start a rule proposal returns "Accepted" response
# 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/security_monitoring/rules/proposals" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "rule_proposals",
    "attributes": {
      "inputType": "natural_language",
      "input": "Detect repeated failed Okta logins followed by a successful login from the same IP."
    }
  }
}
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/security_monitoring/rules/proposals" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "rule_proposals",
    "attributes": {
      "inputType": "natural_language",
      "input": "Detect repeated failed Okta logins followed by a successful login from the same IP."
    }
  }
}
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/security_monitoring/rules/proposals" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "rule_proposals",
    "attributes": {
      "inputType": "natural_language",
      "input": "Detect repeated failed Okta logins followed by a successful login from the same IP."
    }
  }
}
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/security_monitoring/rules/proposals" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "rule_proposals",
    "attributes": {
      "inputType": "natural_language",
      "input": "Detect repeated failed Okta logins followed by a successful login from the same IP."
    }
  }
}
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/security_monitoring/rules/proposals" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "rule_proposals",
    "attributes": {
      "inputType": "natural_language",
      "input": "Detect repeated failed Okta logins followed by a successful login from the same IP."
    }
  }
}
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/security_monitoring/rules/proposals" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "rule_proposals",
    "attributes": {
      "inputType": "natural_language",
      "input": "Detect repeated failed Okta logins followed by a successful login from the same IP."
    }
  }
}
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/security_monitoring/rules/proposals" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "rule_proposals",
    "attributes": {
      "inputType": "natural_language",
      "input": "Detect repeated failed Okta logins followed by a successful login from the same IP."
    }
  }
}
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/security_monitoring/rules/proposals" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "rule_proposals",
    "attributes": {
      "inputType": "natural_language",
      "input": "Detect repeated failed Okta logins followed by a successful login from the same IP."
    }
  }
}
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/security_monitoring/rules/proposals" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "rule_proposals",
    "attributes": {
      "inputType": "natural_language",
      "input": "Detect repeated failed Okta logins followed by a successful login from the same IP."
    }
  }
}
EOF