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

Query a case tree.

Function

Querying a Case Tree

URI

GET /v1/{project_id}/test-suites/{test_suite_id}/directory

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

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

code

String

Status code.

message

String

Description.

directory

Array of ProjectDirectory objects

Case set.

Table 3 ProjectDirectory

Parameter

Type

Description

id

Integer

id

name

String

Name.

status

Integer

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

create_time

String

Creation time.

update_time

String

Update time.

parent_id

Integer

Parent ID.

type

Integer

Type (1: directory; 2: case).

Example Requests

Querying the directory list. The ID of the project to which the directory belongs is 1.

/v1/{project_id}/test-suites/1/directory

Example Responses

Status code: 200

success

{
  "code" : "SVCSTG.CPTS.0000000",
  "directory" : [ {
    "id" : 57667,
    "name" : "directory1",
    "status" : 1,
    "create_time" : "2022-09-02T11:12:04.308643+08:00",
    "update_time" : "2022-09-02T11:12:04.315547+08:00",
    "parent_id" : 0,
    "type" : 1
  } ],
  "message" : "success"
}

Status Codes

Status Code

Description

200

success

501

unknown error

Error Codes

See Error Codes.