Help Center/ CodeArts PerfTest/ API Reference/ API/ Task Management/ Obtaining the Case List Associated with the Task
Updated on 2026-02-09 GMT+08:00

Obtaining the Case List Associated with the Task

Function

This API is used to obtain the case list associated with the task.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    codeartsperftest:cpts:getPerfTestTask

    Read

    cpts *

    g:ResourceTag/<tag-key>

    -

    -

URI

GET /v1/{project_id}/test-suites/{test_suit_id}/tasks/{task_id}/test-cases

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

test_suit_id

Yes

Integer

Project ID.

project_id

Yes

String

Project ID. For details, see Method of obtaining instructions.

task_id

Yes

Integer

Task ID, which is the value of task_id in the response body of the API for creating a task.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

code

String

Status code.

message

String

Response.

test_cases

Array of TestCaseBriefInfo objects

Case list.

Table 3 TestCaseBriefInfo

Parameter

Type

Description

id

Integer

Case ID, which is the value of json.test_case_id in the response body of the API for creating a case.

name

String

Case name.

status

Integer

Status (0: deleted; 1: enabled; 2: disabled).

create_time

String

Creation time.

update_time

String

Update time.

parent_id

Integer

Directory ID.

type

Integer

Type (2: case).

Example Requests

Querying the case information associated with the task whose ID is 1.

/v1/{project_id}/test-suites/{test_suit_id}/tasks/1/test-cases

"code"

Example Responses

None

Status Codes

Status Code

Description

200

Response object for the case list.

Error Codes

See Error Codes.