Query Defect Density
Function
Query Defect Density
URI
POST /v2/{project_id}/bug-density/query
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the 32-bit ID of the devcloud project. |
Request 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. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
date_range |
No |
String |
Frequency |
metric_type |
No |
String |
Metric Type |
dividend |
No |
dividend object |
Counter Numerator Filter Criteria |
divisor |
No |
Object |
Indicator Denominator Filter Criteria |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
custom_fields |
No |
Array of custom_fields objects |
User-defined Filter Criteria |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
dividend_value |
String |
Numerator Value |
divisor_value |
String |
Denominator |
metric_name |
String |
Name |
metric_value |
String |
Indicator Value |
project_id |
String |
Project ID |
project_name |
String |
Project |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Description |
error_code |
String |
Error Codes |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Description |
error_code |
String |
Error Codes |
Example Requests
Post https://{endpoint}/v2/eace9c0a00574de6878ab580daa9a317/bug-density/query { "date_range" : "1590940800000,1593446400000", "dividend" : { "custom_fields" : [ { "name" : "Indicates the customized field name.", "options" : "Indicates the customized field value." } ] }, "divisor" : { }, "metric_type" : "bug_density" }
Example Responses
Status code: 200
OK
{ "dividend_value" : 15, "divisor_value" : 20, "metric_name" : "completion_rate|bug_density|bugs_per_developer", "metric_value" : 0.8945, "project_id" : "eace9c0a00574de6878ab580daa9a317", "project_name" : "demo" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
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