Updated on 2023-06-12 GMT+08:00

Obtaining Work Item Completion Rate

Function

Obtain the completion rate of work items.

URI

GET /v4/projects/{project_id}/issue-completion-rate

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the 32-bit ID of the devcloud project.

Minimum: 32

Maximum: 32

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Minimum: 10

Maximum: 32768

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

issue_completion_rates

Array of issue_completion_rates objects

Completion rate of different types of work items

total

Integer

Total

Table 4 issue_completion_rates

Parameter

Type

Description

issue_status

issue_status object

Number of work items in different states

tracker_id

Integer

Work item type ID. 1: requirement; 2: task/task; 3: defect /Bug,5Epic,6Feature,7Story

Table 5 issue_status

Parameter

Type

Description

closed_num

Integer

Indicates the number of closed work items.

new_num

Integer

Indicates the number of new work items.

process_num

Integer

Indicates the number of work items under development.

rejected_num

Integer

Indicates the number of rejected work items.

solved_num

Integer

Indicates the number of resolved work items.

test_num

Integer

Indicates the number of work items under testing.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Example Requests

GET https://{endpoint}/v4/projects/e2da96a5d2c845e284f0ad47f8ca8cb1/issue-completion-rate

Example Responses

Status code: 200

OK

{
  "issue_completion_rates" : [ {
    "issue_status" : {
      "closed_num" : 0,
      "new_num" : 0,
      "process_num" : 0,
      "rejected_num" : 0,
      "solved_num" : 0,
      "test_num" : 0
    },
    "tracker_id" : 3
  } ],
  "total" : 2
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.