Updated on 2024-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 Obtaining a Project ID.

Minimum: 0

Maximum: 64

test_suite_id

Yes

Integer

Test project ID.

Minimum: 0

Maximum: 2147483647

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Query offset.

Minimum: 0

Maximum: 2147483647

limit

No

Integer

Number of queried records.

Minimum: 0

Maximum: 2147483647

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

code

String

Response code.

Minimum: 0

Maximum: 1024

extend

Array of strings

Extension information.

Minimum: 0

Maximum: 1024

Array Length: 0 - 1024

message

String

Response message.

Minimum: 0

Maximum: 1024

tasks

Array of Task objects

Project set details.

Array Length: 0 - 1000

Table 4 Task

Parameter

Type

Description

bench_concurrent

Integer

Benchmark concurrency.

Minimum: 0

Maximum: 2147483647

description

String

Description.

Minimum: 0

Maximum: 1024

id

Integer

Task ID.

Minimum: 0

Maximum: 2147483647

name

String

Task name.

Minimum: 0

Maximum: 1024

operate_mode

Integer

Task pressure test model.

Minimum: 0

Maximum: 2147483647

task_run_info

TaskRunInfo object

Task running information.

update_time

String

Update time.

Minimum: 0

Maximum: 1024

parallel

Boolean

Whether test cases are executed in parallel between tasks.

Table 5 TaskRunInfo

Parameter

Type

Description

id

Integer

Task ID.

Minimum: 0

Maximum: 2147483647

run_type

Integer

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

Minimum: 0

Maximum: 2147483647

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.