For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/fr/api/latest/security-monitoring/create-a-batch-migration.md. A documentation index is available at /llms.txt.
Language
Datadog site

Create a batch migration

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/batch-migrationshttps://api.us3.datadoghq.com/api/v2/security_monitoring/batch-migrationshttps://api.us5.datadoghq.com/api/v2/security_monitoring/batch-migrationshttps://api.datadoghq.eu/api/v2/security_monitoring/batch-migrationshttps://api.ap1.datadoghq.com/api/v2/security_monitoring/batch-migrationshttps://api.ap2.datadoghq.com/api/v2/security_monitoring/batch-migrationshttps://api.uk1.datadoghq.com/api/v2/security_monitoring/batch-migrationshttps://api.ddog-gov.com/api/v2/security_monitoring/batch-migrationshttps://api.us2.ddog-gov.com/api/v2/security_monitoring/batch-migrations

Présentation

Create a batch migration in the draft status, together with 1 to 100 initial resources. Each resource holds one source rule to translate into a Cloud SIEM detection rule. To load more rules, add them with the add resources endpoint before starting the batch migration. A batch migration can hold up to 1000 resources. The response does not include the created resources: list the resources of the batch migration to retrieve them.

This endpoint requires the security_monitoring_rules_write permission.

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

Requête

Body Data (required)

Champ
Type
Description
data [required]
object

Data of the batch migration to create.

Réponse

Created

Response containing a batch migration.

Champ
Type
Description
data [required]
object

A batch migration.

Exemple de code

# 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/batch-migrations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Rules imported from Splunk",
      "name": "Splunk migration",
      "resources": [
        {
          "description": "Detects repeated failed Windows authentication attempts.",
          "input": "index=wineventlog EventCode=4625",
          "inputType": "spl",
          "name": "Repeated Windows login failures"
        },
        {
          "input": "Alert when PowerShell is launched with a command line that downloads and executes a remote script, such as IEX with Net.WebClient or Invoke-WebRequest.",
          "inputType": "natural_language",
          "name": "Suspicious PowerShell download cradle"
        }
      ],
      "tags": [
        "source:splunk"
      ]
    },
    "type": "batchMigration"
  }
}
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/batch-migrations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Rules imported from Splunk",
      "name": "Splunk migration",
      "resources": [
        {
          "description": "Detects repeated failed Windows authentication attempts.",
          "input": "index=wineventlog EventCode=4625",
          "inputType": "spl",
          "name": "Repeated Windows login failures"
        },
        {
          "input": "Alert when PowerShell is launched with a command line that downloads and executes a remote script, such as IEX with Net.WebClient or Invoke-WebRequest.",
          "inputType": "natural_language",
          "name": "Suspicious PowerShell download cradle"
        }
      ],
      "tags": [
        "source:splunk"
      ]
    },
    "type": "batchMigration"
  }
}
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/batch-migrations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Rules imported from Splunk",
      "name": "Splunk migration",
      "resources": [
        {
          "description": "Detects repeated failed Windows authentication attempts.",
          "input": "index=wineventlog EventCode=4625",
          "inputType": "spl",
          "name": "Repeated Windows login failures"
        },
        {
          "input": "Alert when PowerShell is launched with a command line that downloads and executes a remote script, such as IEX with Net.WebClient or Invoke-WebRequest.",
          "inputType": "natural_language",
          "name": "Suspicious PowerShell download cradle"
        }
      ],
      "tags": [
        "source:splunk"
      ]
    },
    "type": "batchMigration"
  }
}
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/batch-migrations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Rules imported from Splunk",
      "name": "Splunk migration",
      "resources": [
        {
          "description": "Detects repeated failed Windows authentication attempts.",
          "input": "index=wineventlog EventCode=4625",
          "inputType": "spl",
          "name": "Repeated Windows login failures"
        },
        {
          "input": "Alert when PowerShell is launched with a command line that downloads and executes a remote script, such as IEX with Net.WebClient or Invoke-WebRequest.",
          "inputType": "natural_language",
          "name": "Suspicious PowerShell download cradle"
        }
      ],
      "tags": [
        "source:splunk"
      ]
    },
    "type": "batchMigration"
  }
}
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/batch-migrations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Rules imported from Splunk",
      "name": "Splunk migration",
      "resources": [
        {
          "description": "Detects repeated failed Windows authentication attempts.",
          "input": "index=wineventlog EventCode=4625",
          "inputType": "spl",
          "name": "Repeated Windows login failures"
        },
        {
          "input": "Alert when PowerShell is launched with a command line that downloads and executes a remote script, such as IEX with Net.WebClient or Invoke-WebRequest.",
          "inputType": "natural_language",
          "name": "Suspicious PowerShell download cradle"
        }
      ],
      "tags": [
        "source:splunk"
      ]
    },
    "type": "batchMigration"
  }
}
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/batch-migrations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Rules imported from Splunk",
      "name": "Splunk migration",
      "resources": [
        {
          "description": "Detects repeated failed Windows authentication attempts.",
          "input": "index=wineventlog EventCode=4625",
          "inputType": "spl",
          "name": "Repeated Windows login failures"
        },
        {
          "input": "Alert when PowerShell is launched with a command line that downloads and executes a remote script, such as IEX with Net.WebClient or Invoke-WebRequest.",
          "inputType": "natural_language",
          "name": "Suspicious PowerShell download cradle"
        }
      ],
      "tags": [
        "source:splunk"
      ]
    },
    "type": "batchMigration"
  }
}
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/batch-migrations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Rules imported from Splunk",
      "name": "Splunk migration",
      "resources": [
        {
          "description": "Detects repeated failed Windows authentication attempts.",
          "input": "index=wineventlog EventCode=4625",
          "inputType": "spl",
          "name": "Repeated Windows login failures"
        },
        {
          "input": "Alert when PowerShell is launched with a command line that downloads and executes a remote script, such as IEX with Net.WebClient or Invoke-WebRequest.",
          "inputType": "natural_language",
          "name": "Suspicious PowerShell download cradle"
        }
      ],
      "tags": [
        "source:splunk"
      ]
    },
    "type": "batchMigration"
  }
}
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/batch-migrations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Rules imported from Splunk",
      "name": "Splunk migration",
      "resources": [
        {
          "description": "Detects repeated failed Windows authentication attempts.",
          "input": "index=wineventlog EventCode=4625",
          "inputType": "spl",
          "name": "Repeated Windows login failures"
        },
        {
          "input": "Alert when PowerShell is launched with a command line that downloads and executes a remote script, such as IEX with Net.WebClient or Invoke-WebRequest.",
          "inputType": "natural_language",
          "name": "Suspicious PowerShell download cradle"
        }
      ],
      "tags": [
        "source:splunk"
      ]
    },
    "type": "batchMigration"
  }
}
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/batch-migrations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "Rules imported from Splunk",
      "name": "Splunk migration",
      "resources": [
        {
          "description": "Detects repeated failed Windows authentication attempts.",
          "input": "index=wineventlog EventCode=4625",
          "inputType": "spl",
          "name": "Repeated Windows login failures"
        },
        {
          "input": "Alert when PowerShell is launched with a command line that downloads and executes a remote script, such as IEX with Net.WebClient or Invoke-WebRequest.",
          "inputType": "natural_language",
          "name": "Suspicious PowerShell download cradle"
        }
      ],
      "tags": [
        "source:splunk"
      ]
    },
    "type": "batchMigration"
  }
}
EOF