---
title: Update a batch migration
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Security Monitoring
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Update a batch migration{% #update-a-batch-migration %}

{% tab title="v2" %}
**Note**: This endpoint is in Preview and is subject to change. To request access, contact [Datadog support](https://docs.datadoghq.com/help/) or your Customer Success Manager.
| Datadog site      | API endpoint                                                                               |
| ----------------- | ------------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id} |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id} |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/security_monitoring/batch-migrations/{batch_id}      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/security_monitoring/batch-migrations/{batch_id}      |
| us2.ddog-gov.com  | PATCH https://api.us2.ddog-gov.com/api/v2/security_monitoring/batch-migrations/{batch_id}  |
| uk1.datadoghq.com | PATCH https://api.uk1.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id} |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id} |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id} |

### Overview

Update the name, description, or tags of a batch migration, in any status. At least one of these attributes must be provided. Omitted attributes are left unchanged, and `tags` replaces the full list of tags. This endpoint requires the `security_monitoring_rules_write` permission.

OAuth apps require the `security_monitoring_rules_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#security-monitoring) to access this endpoint.



### Arguments

#### Path Parameters

| Name                       | Type   | Description                      |
| -------------------------- | ------ | -------------------------------- |
| batch_id [*required*] | string | The UUID of the batch migration. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                        | Type     | Description                                                                       |
| ------------ | ---------------------------- | -------- | --------------------------------------------------------------------------------- |
|              | data [*required*]       | object   | Data of the batch migration to update.                                            |
| data         | attributes [*required*] | object   | Attributes of the batch migration to update. At least one attribute is required.  |
| attributes   | description                  | string   | The description of the batch migration.                                           |
| attributes   | name                         | string   | The name of the batch migration.                                                  |
| attributes   | tags                         | [string] | Tags of the batch migration. Up to 50 tags, each up to 256 characters.            |
| data         | type [*required*]       | enum     | The type of resource for a batch migration. Allowed enum values: `batchMigration` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "type": "batchMigration",
    "attributes": {
      "name": "Example-Security-Monitoring-updated",
      "tags": [
        "source:splunk",
        "team:secops"
      ]
    }
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a batch migration.

| Parent field         | Field                                  | Type      | Description                                                                                                                                                                                                                                                                           |
| -------------------- | -------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | data [*required*]                 | object    | A batch migration.                                                                                                                                                                                                                                                                    |
| data                 | attributes [*required*]           | object    | Attributes of a batch migration.                                                                                                                                                                                                                                                      |
| attributes           | createdAt [*required*]            | date-time | The creation date of the batch migration, in RFC 3339 format.                                                                                                                                                                                                                         |
| attributes           | createdBy                              | string    | The UUID of the user or service account who created the batch migration.                                                                                                                                                                                                              |
| attributes           | description                            | string    | The description of the batch migration.                                                                                                                                                                                                                                               |
| attributes           | inputSource [*required*]          | enum      | The origin of a batch migration. Always `batch_migration` for batch migrations created through this API. Allowed enum values: `batch_migration,threat_hunting,user`                                                                                                                   |
| attributes           | lastUpdatedAt [*required*]        | date-time | The last update date of the batch migration, in RFC 3339 format.                                                                                                                                                                                                                      |
| attributes           | lastUpdatedBy                          | string    | The UUID of the user or service account who last updated the batch migration, or the name of a system actor.                                                                                                                                                                          |
| attributes           | name [*required*]                 | string    | The name of the batch migration.                                                                                                                                                                                                                                                      |
| attributes           | orgId [*required*]                | int64     | The ID of the organization that owns the batch migration.                                                                                                                                                                                                                             |
| attributes           | resourceStatusCounts [*required*] | object    | The number of resources of a batch migration in each status.                                                                                                                                                                                                                          |
| resourceStatusCounts | canceled [*required*]             | int64     | Number of resources whose translation was canceled.                                                                                                                                                                                                                                   |
| resourceStatusCounts | completed [*required*]            | int64     | Number of resources translated and ready to be published.                                                                                                                                                                                                                             |
| resourceStatusCounts | duplicate [*required*]            | int64     | Number of resources identified as duplicates of an existing rule. Reserved for future use.                                                                                                                                                                                            |
| resourceStatusCounts | failed [*required*]               | int64     | Number of resources whose translation failed.                                                                                                                                                                                                                                         |
| resourceStatusCounts | inProgress [*required*]           | int64     | Number of resources being translated.                                                                                                                                                                                                                                                 |
| resourceStatusCounts | pending [*required*]              | int64     | Number of resources waiting to be translated.                                                                                                                                                                                                                                         |
| resourceStatusCounts | published [*required*]            | int64     | Number of resources published as Cloud SIEM detection rules.                                                                                                                                                                                                                          |
| resourceStatusCounts | publishing [*required*]           | int64     | Number of resources being published.                                                                                                                                                                                                                                                  |
| attributes           | status [*required*]               | enum      | The status of a batch migration. A batch migration is created as `draft` and moves to `in_progress` when started. It moves to `completed` once no resource is `pending` or `in_progress`, or to `canceled` when canceled. Allowed enum values: `draft,in_progress,canceled,completed` |
| attributes           | tags [*required*]                 | [string]  | Tags of the batch migration. Up to 50 tags, each up to 256 characters.                                                                                                                                                                                                                |
| data                 | id [*required*]                   | uuid      | The UUID of the batch migration.                                                                                                                                                                                                                                                      |
| data                 | type [*required*]                 | enum      | The type of resource for a batch migration. Allowed enum values: `batchMigration`                                                                                                                                                                                                     |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "createdAt": "2026-09-21T12:00:00Z",
      "createdBy": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
      "description": "Rules imported from Splunk",
      "inputSource": "batch_migration",
      "lastUpdatedAt": "2026-09-21T12:00:00Z",
      "lastUpdatedBy": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
      "name": "Splunk migration",
      "orgId": 123456,
      "resourceStatusCounts": {
        "canceled": 0,
        "completed": 0,
        "duplicate": 0,
        "failed": 0,
        "inProgress": 0,
        "pending": 1,
        "published": 0,
        "publishing": 0
      },
      "status": "draft",
      "tags": [
        "source:splunk"
      ]
    },
    "id": "7cdb3a75-64fb-46ce-9445-41969e78fe8e",
    "type": "batchMigration"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
 \# Path parameters export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e" \# Use a Personal Access Token or Service Access Token export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"  \# Curl command curl -X PATCH "https://api.datadoghq.com/api/v2/security_monitoring/batch-migrations/${batch_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Splunk migration - Windows",
      "tags": [
        "source:splunk",
        "team:secops"
      ]
    },
    "type": "batchMigration"
  }
}
EOF 

                        
{% /tab %}
