---
title: "Terminates the specified Task."
method: POST
path: "/jobs/{jobId}/tasks/{taskId}/terminate"
tags: ["Tasks"]
---

# Terminates the specified Task.

`POST /jobs/{jobId}/tasks/{taskId}/terminate`

When the Task has been terminated, it moves to the completed state. For
multi-instance Tasks, the terminate Task operation applies synchronously to the
primary task; subtasks are then terminated asynchronously in the background.

## Path parameters

- `jobId` string, required
- `taskId` string, required

## Query parameters

- `api-version` string, required
- `timeOut` integer

## Headers

- `client-request-id` string
- `return-client-request-id` boolean
- `ocp-date` string, date-time-rfc7231
- `If-Modified-Since` string, date-time-rfc7231
- `If-Unmodified-Since` string, date-time-rfc7231
- `If-Match` string
- `If-None-Match` string

## Response `204`

There is no content to send for this request, but the headers may be useful.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/batch-batch.md) · [All operations](https://skmtc.net/azure/apis/batch-batch/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/batch-batch/revisions/8427acd8fd77/schema)
