Query a case tree.
Function
Querying a Case Tree
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:getPerfTestProject
Read
cpts *
g:ResourceTag/<tag-key>
-
-
URI
GET /v1/{project_id}/test-suites/{test_suite_id}/directory
|
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, which is the value of project_id in the response body of the API for creating a project. |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Status code. |
|
message |
String |
Description. |
|
directory |
Array of ProjectDirectory objects |
Case set. |
|
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). |
Status code: 501
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
response message |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot