# Execution Case

URL: https://docs.ones.cn/developer/openapi/api/execution-case

Version: 2.0Execution cases generated from a version of a test case in a test plan. Source test case content is read-only.

Available subscription event types:

- `ones:test:execution_case:created`
- `ones:test:execution_case:updated`
- `ones:test:execution_case:removed`
- `ones:test:execution_case:source_changed`
- `ones:test:execution_case:source_change_resolved`
Read execution cases with `POST /openapi/v3alpha/onesql/query` and `from execution_case` ; this API does not provide dedicated list or detail endpoints. Filter a plan with `field178` , a source test case with `field170` , and an execution case ID with `uuid` . Select `field171.uuid/seq` for the applied source version. OneSQL reads require `read:project:issue` .

Creating, updating, and removing require permission to edit the test plan; creating also requires permission to view the source test case. Source content and source-change status are read-only. This API does not expose source synchronization or confirmation of unaffected changes.

## Authentication

- OAuth 2.0: oauth2

| Security Scheme Type: | oauth2 |
| OAuth Flow (authorizationCode): | Token URL: /oauth2/token<br>Authorization URL: /oauth2/authorize<br>Scopes:<br>- read:project:issue: Read execution cases<br>- write:project:issue: Create, update, and remove execution cases |

[## 📄️Create an execution case

Creates one execution case synchronously and returns success after the write completes, without an async task or details. The plan and source test case binding is idempotent.](https://docs.ones.cn/developer/openapi/api/create-execution-case/)
[## 📄️Create execution cases in a batch

Asynchronously adds multiple source test cases to one test plan. Duplicate bindings are idempotent.](https://docs.ones.cn/developer/openapi/api/batch-create-execution-cases/)
[## 📄️Update execution cases in a batch

Applies the same fieldValues to selected execution cases, including execution result, executor, remark, and other writable layout fields. Uses the same field protocol, permission, readonly, and required validation as single updates. Source content is readonly. Each item has an independent transaction; failures do not roll back successful items. Step UUIDs belong to individual execution cases; use single updates for steps in different execution cases.](https://docs.ones.cn/developer/openapi/api/batch-update-execution-cases/)
[## 📄️Remove execution cases in a batch

Removes each execution case independently. A failed item does not roll back successful items.](https://docs.ones.cn/developer/openapi/api/batch-delete-execution-cases/)
[## 📄️Update execution information

Source test case fields are read-only. Writable fields are executor, execution result, result remark, attachments, related issues, and step execution information.](https://docs.ones.cn/developer/openapi/api/update-execution-case/)
[## 📄️Remove an execution case from its test plan

Logically removes the execution case from its test plan. Historical execution activities remain available internally.](https://docs.ones.cn/developer/openapi/api/delete-execution-case/)
[## 📄️Get execution case attachments

Get attachment metadata and temporary download URLs for an execution case.](https://docs.ones.cn/developer/openapi/api/get-execution-case-attachments/)
