Updated on 2025-04-08 GMT+08:00

Querying a Task Set

Function

This API is used to query a task set.

URI

GET /v1/{project_id}/all-tasks/{test_suite_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

test_suite_id

Yes

Integer

Test project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Query offset.

limit

No

Integer

Number of queried records.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

code

String

Response code.

extend

Array of strings

Extension information.

message

String

Response message.

tasks

Array of Task objects

Project set details.

Table 4 Task

Parameter

Type

Description

bench_concurrent

Integer

Benchmark concurrency.

description

String

Description.

id

Integer

Task ID.

name

String

Task name.

operate_mode

Integer

Task pressure test model.

task_run_info

TaskRunInfo object

Task running information.

update_time

String

Update time.

parallel

Boolean

Whether test cases are executed in parallel between tasks.

Table 5 TaskRunInfo

Parameter

Type

Description

id

Integer

Task ID.

run_type

Integer

Task type (0: old edition task; 1: new edition task).

Status code: 501

Table 6 Response body parameters

Parameter

Type

Description

-

String

response message

Example Requests

Querying the task set associated with the project whose ID is 1.

/v1/{project_id}/all-tasks/1

Example Responses

Status code: 200

success

{
  "code" : "SVCSTG.CPTS.0000000",
  "extend" : [ ],
  "message" : "success",
  "tasks" : [ {
    "bench_concurrent" : 100,
    "description" : "",
    "id" : 52631,
    "name" : "task1",
    "operate_mode" : 2,
    "parallel" : true,
    "task_run_info" : {
      "id" : 0,
      "run_type" : 0
    },
    "update_time" : "2022-01-05T11:16:08.415954+08:00"
  }, {
    "bench_concurrent" : 100,
    "description" : "",
    "id" : 52621,
    "name" : "task2",
    "operate_mode" : 2,
    "parallel" : true,
    "task_run_info" : {
      "id" : 0,
      "run_type" : 0
    },
    "update_time" : "2021-12-31T15:43:53.014385+08:00"
  } ]
}

Status Codes

Status Code

Description

200

success

501

unknown error

Error Codes

See Error Codes.