Querying the Test Plan List in a Project (V2)
Function
Queries the test plan list in a project (V2).
URI
GET /v2/projects/{project_id}/plans
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
DevCloud project ID, which uniquely identifies a project. The value contains 32 characters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
Yes |
Integer |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. |
limit |
Yes |
Integer |
Number of items displayed on each page. A maximum of 200 items are supported. |
name |
No |
String |
Used for fuzzy query (for test plan names) |
current_stage |
No |
String |
Test plan stage (create, design, execute, or report) |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Call IAM to obtain the user token (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
[items] |
Array of TestPlanDetail objects |
Response for querying the test plan list in a project |
Parameter |
Type |
Description |
---|---|---|
creator |
creator object |
Test plan creator information |
current_stage |
String |
Stage of the current test plan |
design_stage |
design_stage object |
Information about the test plan design stage |
end_date |
String |
Test plan deadline |
execute_stage |
execute_stage object |
Information about the test plan execution stage |
expire_day |
String |
Obtains the expiration time. A positive value indicates that the plan has expired. |
finish_date |
String |
Actual completion time of the test plan (Actual completion of the test plan means that all test cases under the test plan are completed.) |
iteration |
NameAndId object |
Test plan iteration No. and iteration name |
name |
String |
Test plan name |
owner |
owner object |
Test plan processor information |
plan_id |
String |
Test plan ID |
project_id |
String |
Project ID |
report_stage |
report_stage object |
Statistics in the report stage |
start_date |
String |
Test plan start time |
Parameter |
Type |
Description |
---|---|---|
id |
String |
ID of the test plan creator |
nick_name |
String |
Alias of the test plan creator. This parameter is not returned if the user does not set an alias. |
user_name |
String |
Name of the test plan creator |
Parameter |
Type |
Description |
---|---|---|
case_count |
Integer |
Number of cases |
issue_count |
Integer |
Number of requirements |
issue_covered_count |
String |
Number of requirements associated with test cases |
Parameter |
Type |
Description |
---|---|---|
case_pass_rate |
String |
Test case pass rate, which is calculated based on test case results |
completed_defect_count |
Integer |
Number of completed defects |
defect_count |
Integer |
Number of defects |
executed_case_count |
Integer |
Number of executed test cases, counted by test case status |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Test plan processor ID |
name |
String |
Name of the test plan processor. nickName is returned first. If nickName does not exist, userName is returned. |
nick_name |
String |
Alias of the test plan processor. This parameter is not returned if the user does not set an alias. |
user_name |
String |
Username of the test plan processor |
Parameter |
Type |
Description |
---|---|---|
case_complete_rate |
String |
Case completion rate, which is calculated by status |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Example Requests
get https://{endpoint}/v2/projects/efdb403066474ab08836b9eeaaa23bca/plans?offset=1&limit=10&name¤t_stage
Example Responses
Status code: 201
OK
[ { "creator" : { "id" : "efdb403066474ab08836b9eeaaa23bca", "nick_name" : "Tester", "user_name" : "Tester" }, "current_stage" : "design", "design_stage" : { "case_count" : 2, "issue_count" : 0, "issue_covered_count" : "0" }, "end_date" : "2021-07-10", "execute_stage" : { "case_pass_rate" : "0.00%", "completed_defect_count" : 0, "defect_count" : 0, "executed_case_count" : 0 }, "expire_day" : "-4", "finish_date" : "2021-07-10", "iteration" : { "id" : "ID", "name" : "Name" }, "name" : "Test", "owner" : { "id" : "efdb403066474ab08836b9eeaaa23bca", "name" : "Tester", "nick_name" : "Tester", "user_name" : "Tester" }, "plan_id" : "c7c2ddf2ea914164ac6ee76bf11a30ea", "project_id" : "9b26f58ec29943f681804a6628779a23", "report_stage" : { "case_complete_rate" : "100.00%" }, "start_date" : "2021-07-10" } ]
Status Codes
Status Code |
Description |
---|---|
201 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
404 |
Not Found |
500 |
Internal Server 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