# Create execution cases in a batch

URL: https://docs.ones.cn/developer/openapi/api/batch-create-execution-cases

```
POST
## /project/executionCases/batch-create

```

Asynchronously adds multiple source test cases to one test plan. Duplicate bindings are idempotent. The response only confirms that the task was created. Poll `/project/asyncTasks/{jobID}` until the status is `success` , `failed` , or `interrupted` before reading the execution cases. Polling the task requires the `read:project:project` scope.

## Request

### Query Parameters

**teamID** stringrequired The team ID

- application/json

### Body

**required

**

**planIssueID** stringrequired The target test plan issue ID.

**sourceCaseIssueIDs** string[]required **Possible values:**`>= 1` , `<= 10000`

## Responses

- 200
- 401
- 403
- 404
- 500

Batch task was created. Query `/project/asyncTasks/{jobID}` for progress.

- application/json

- Schema
- Example (from schema)

**Schema

**

**data

** object

**jobID** stringrequired Query this ID through `/project/asyncTasks/{jobID}` .

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

**errorData** object Error meta data for this request.

```json
{
  "result": "SUCCESS",
  "data": {
    "jobID": "asyncTaskUUID"
  }
}
```

Returned if the authentication credentials are incorrect or missing.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "Unauthorized",
  "errorMsg": "Access token is invalid"
}
```

Returns if the scope check fails.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "Forbidden",
  "errorMsg": "Scope is invalid"
}
```

Returned if the resource object was not found.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "NotFound",
  "errorMsg": "Not Found"
}
```

Internal Server Error.

- application/json

- Schema
- Example (from schema)

**Schema

**

**result** string The result of this request.

**errorCode** string The error code of this request.

**errorMsg** string Error message for this request.

```json
{
  "result": "FAIL",
  "errorCode": "Internal Server Error",
  "errorMsg": "Internal Server Error"
}
```
