---
title: "Cancel a historical job"
method: PATCH
path: "/api/v2/siem-historical-detections/jobs/{job_id}/cancel"
tags: ["Security Monitoring"]
---

# Cancel a historical job

`PATCH /api/v2/siem-historical-detections/jobs/{job_id}/cancel`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/siem-historical-detections/jobs/{job_id}/cancel`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `security_monitoring_rules_write`

Cancel a historical job.

## Path parameters

- `job_id` string, required

## Response `204`

OK

## Other responses

- `400`: Bad Request
- `401`: Concurrent Modification
- `403`: Not Authorized
- `404`: Not Found
- `409`: Conflict
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/api-v2.md) - [All operations](https://skmtc.dev/datadog/apis/api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/api-v2/revisions/da68bf029e4c?raw)
