---
title: "Cancel Test Execution"
method: PATCH
path: "/v1/projects/{projectId}/test-executions/{testExecutionId}"
tags: ["Test Execution"]
---

# Cancel Test Execution

`PATCH /v1/projects/{projectId}/test-executions/{testExecutionId}`

Cancel a test execution, optionally forcing the termination

## Path parameters

- `projectId` string, required
- `testExecutionId` string, uuid, required

## Request body

- PipelineExecutionUpdateRequest
  - `forceUpdate` boolean, required — If true, the execution will be forcefully terminated
  - `status` 'CANCELLED', required — Cancel pipeline execution by updating status to CANCELLED

## Response `200`

Test execution cancelled successfully

- CancelTestExecutionResponse
  - `testExecutionId` string, uuid — Server-generated identifier for the cancelled test execution

## Other responses

- `400` — Unable to cancel test execution
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Test execution not found
- `500` — Unexpected error occurred
- `504` — Gateway timeout

---

[API](https://skmtc.net/maia/apis/maia-public-rest-api.md) · [All operations](https://skmtc.net/maia/apis/maia-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maia/maia-public-rest-api/versions/6239825f68eb/schema)
