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/delete-resources-from-a-batch-migration.md. A documentation index is available at /llms.txt.
Language
Datadog site

Delete resources from 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.
DELETEhttps://api.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/resourceshttps://api.us3.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/resourceshttps://api.us5.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/resourceshttps://api.datadoghq.eu/api/v2/security_monitoring/batch-migrations/{batch_id}/resourceshttps://api.ap1.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/resourceshttps://api.ap2.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/resourceshttps://api.uk1.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/resourceshttps://api.ddog-gov.com/api/v2/security_monitoring/batch-migrations/{batch_id}/resourceshttps://api.us2.ddog-gov.com/api/v2/security_monitoring/batch-migrations/{batch_id}/resources

Présentation

Delete resources from a batch migration. The request is all-or-nothing: it returns 404 Not Found if any resource does not exist, and 409 Conflict if any resource is in_progress or publishing. In both cases nothing is deleted. Duplicate resource IDs are ignored. Detection rules already published from the deleted resources are not deleted.

This endpoint requires the security_monitoring_rules_write permission.

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

Arguments

Paramètres du chemin

Name
Type
Description
batch_id [required]
string

The UUID of the batch migration.

Requête

Body Data (required)

Champ
Type
Description
data [required]
object

Data of the resources to delete from a batch migration.

Réponse

No Content

Exemple de code

Delete resources from a batch migration returns "No Content" response
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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 DELETE "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResources",
    "attributes": {
      "resourceIds": [
        "c968cf83-56c2-4d54-a993-6c86dfb83527"
      ]
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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 DELETE "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResources",
    "attributes": {
      "resourceIds": [
        "c968cf83-56c2-4d54-a993-6c86dfb83527"
      ]
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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 DELETE "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResources",
    "attributes": {
      "resourceIds": [
        "c968cf83-56c2-4d54-a993-6c86dfb83527"
      ]
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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 DELETE "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResources",
    "attributes": {
      "resourceIds": [
        "c968cf83-56c2-4d54-a993-6c86dfb83527"
      ]
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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 DELETE "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResources",
    "attributes": {
      "resourceIds": [
        "c968cf83-56c2-4d54-a993-6c86dfb83527"
      ]
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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 DELETE "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResources",
    "attributes": {
      "resourceIds": [
        "c968cf83-56c2-4d54-a993-6c86dfb83527"
      ]
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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 DELETE "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResources",
    "attributes": {
      "resourceIds": [
        "c968cf83-56c2-4d54-a993-6c86dfb83527"
      ]
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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 DELETE "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResources",
    "attributes": {
      "resourceIds": [
        "c968cf83-56c2-4d54-a993-6c86dfb83527"
      ]
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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 DELETE "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResources",
    "attributes": {
      "resourceIds": [
        "c968cf83-56c2-4d54-a993-6c86dfb83527"
      ]
    }
  }
}
EOF