Querying the Test Plan List in a Project
Function
This API is used to query the test plan list in a project.
Calling Method
For details, see Calling APIs.
URI
GET /v1/projects/{project_id}/plans
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Definition Project UUID. For details, see Obtaining a Project ID. Constraints 32 characters (letters and digits). Range N/A. Default Value N/A. |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
name | No | String | Definition Used for fuzzy query (for test plan names). Constraints N/A. Range N/A. Default Value N/A. |
current_stage | No | String | Definition Test plan stage (create, design, execute, or report). Constraints N/A. Range N/A. Default Value N/A. |
offset | Yes | Integer | Definition Offset Constraints N/A. Range 0–2000000. Default Value N/A. |
limit | Yes | Integer | Definition Number of items displayed on each page. Constraints N/A. Range 1–100 Default Value N/A. |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition User token. It can be obtained by calling the corresponding IAM API. The value of X-Subject-Token in the response header is the user token. Constraints N/A. Range 1 to 100,000 characters. Default Value N/A. |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
[Array elements] | Array of TestPlanDetail objects | Response structure for querying the test plan list in a project. |
Parameter | Type | Description |
|---|---|---|
creator | creator object | Definition Test plan creator information. Range N/A. |
current_stage | String | Definition Stage of the current test plan. Range N/A. |
design_stage | design_stage object | Definition Information about the test plan design stage. Range N/A. |
end_date | String | Definition Test plan deadline. Range N/A. |
execute_stage | execute_stage object | Definition Information about the test plan execution stage. Range N/A. |
expire_day | Integer | Definition Overdue days. A positive value indicates that the plan has expired. Range N/A. |
finish_date | String | Definition Actual completion time of the test plan (when all test cases under the test plan are completed.) Range N/A. |
iteration | NameAndId object | Definition Sprint No. and name of the test plan. Range N/A. |
name | String | Definition Test plan name. Range N/A. |
owner | owner object | Definition Test plan processor information. Range N/A. |
plan_id | String | Definition Test plan ID. Range N/A. |
project_id | String | Definition Project UUID, which uniquely identifies a project. For details about how to obtain the project UUID, see Obtaining a Project ID. Constraints 32 characters (letters and digits). Range N/A. Default Value N/A. |
report_stage | report_stage object | Definition Statistics at the reporting stage. Range N/A. |
start_date | String | Definition Test plan start time. Range N/A. |
Parameter | Type | Description |
|---|---|---|
id | String | Definition ID of the test plan creator. Range N/A. |
nick_name | String | Definition Nickname of the test plan creator. Range This field is not returned if the user does not set the nickname. |
user_name | String | Definition Name of the test plan creator. Range N/A. |
Parameter | Type | Description |
|---|---|---|
case_count | Integer | Definition Number of test cases. Range N/A. |
issue_count | Integer | Definition Number of requirements. Range N/A. |
issue_covered_count | String | Definition Number of requirements associated with test cases. Range N/A. |
Parameter | Type | Description |
|---|---|---|
case_pass_rate | String | Definition Test case pass rate, calculated by test case results. Range N/A. |
completed_defect_count | Integer | Definition Number of completed bugs. Range N/A. |
defect_count | Integer | Definition Number of bugs. Range N/A. |
executed_case_count | Integer | Definition Number of executed test cases, calculated by test case status. Range N/A. |
Parameter | Type | Description |
|---|---|---|
id | String | Definition Object ID. Range N/A. |
name | String | Definition Object name. Range N/A. |
Parameter | Type | Description |
|---|---|---|
id | String | Definition Test plan processor ID. Range N/A. |
name | String | Definition Name of the test plan processor. nickName is returned if it exists, otherwise userName is returned. Range N/A. |
nick_name | String | Definition Alias of the test plan processor. This parameter is not returned if the user does not set an alias. Range N/A. |
user_name | String | Definition Username of the test plan processor. Range N/A. |
Parameter | Type | Description |
|---|---|---|
case_complete_rate | String | Definition Case completion rate, calculated by status. Range 0%–100% |
Status code: 400
Parameter | Type | Description |
|---|---|---|
error_code | String | Definition Error code displayed after the API fails to be called. Range N/A. |
error_msg | String | Definition Error message displayed after the API fails to be called. Range N/A. |
Status code: 401
Parameter | Type | Description |
|---|---|---|
error_code | String | Definition Error code displayed after the API fails to be called. Range N/A. |
error_msg | String | Definition Error message displayed after the API fails to be called. Range N/A. |
Status code: 404
Parameter | Type | Description |
|---|---|---|
error_code | String | Definition Error code displayed after the API fails to be called. Range N/A. |
error_msg | String | Definition Error message displayed after the API fails to be called. Range N/A. |
Status code: 500
Parameter | Type | Description |
|---|---|---|
error_code | String | Definition Error code displayed after the API fails to be called. Range N/A. |
error_msg | String | Definition Error message displayed after the API fails to be called. Range N/A. |
Example Requests
get https://{endpoint}/v1/projects/efdb403066474ab08836b9eeaaa23bca/plans?offset=1&limit=10¤t_stage Example Responses
Status code: 200
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 |
|---|---|
200 | 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.

