---
title: "Requests the cancellation of the given repair task."
method: POST
path: "/$/CancelRepairTask"
tags: ["RepairManagement"]
---

# Requests the cancellation of the given repair task.

`POST /$/CancelRepairTask`

This API supports the Service Fabric platform; it is not meant to be used directly from your code.

## Query parameters

- `api-version` '6.0', required

## Request body

- RepairTaskCancelDescription — Describes a request to cancel a repair task. This type supports the Service Fabric platform; it is not meant to be used directly from your code.
  - `TaskId` string, required — The ID of the repair task.
  - `Version` string — The current version number of the repair task. If non-zero, then the request will only succeed if this value matches the actual current version of the repair task. If zero, then no version check is performed.
  - `RequestAbort` boolean — _True_ if the repair should be stopped as soon as possible even if it has already started executing. _False_ if the repair should be cancelled only if execution has not yet started.

## Response `200`

A successful operation will return 200 status code.
The response body provides information about the updated repair task.
Success indicates that the cancellation request was recorded, but does not guarantee that the repair task will be cancelled.
Clients may use the State property of the repair task to determine the current state of the repair task.

- RepairTaskUpdateInfo — Describes the result of an operation that created or updated a repair task. This type supports the Service Fabric platform; it is not meant to be used directly from your code.
  - `Version` string, required — The new version of the repair task.

## Other responses

- `default` — The detailed error response.

---

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