Defect Interface
Create Defect
Prompt
This interface is deprecated in Cat2Bug-Platform 0.3.2, submit defects to Reporting Interface
Interface path: /api/defect
Method: POST
Request Parameters
{
"defectType":"BUG",
"defectName":"There is no limit on the length of the login account",
"defectDescribe":"The account length should be set to a maximum of 32 bits. Currently, entering 33 bits can still be submitted for approval",
"defectLevel":2
}
Request Parameter Description
Parameter | Type | Range | Illustrate |
---|---|---|---|
defectType | Integer | Must,BUG、TASK、DEMAND | Defect Type |
defectName | String | Must,1 to 128 bit bytes | Defect Name |
defectDescribe | String | Must,1 to 65536 bit bytes | Defect Describe |
defectLevel | Integer | Must,1 to 5 | Defect Level |
- Return Value
{
{
"msg":"success",
"code":200,
"data":{
"createBy":"robot",
"createTime":"2024-02-18 01:13:34",
"updateBy":"robot",
"updateTime":"2024-02-18 01:13:34",
"defectNumber":16,
"defectType":"TASK",
"defectName":"There is no limit on the length of the login account",
"defectDescribe":"The account length should be set to a maximum of 32 bits. Currently, entering 33 bits can still be submitted for approval",
"annexList":null,
"imgList":null,
"project":"Cat2Bug-Platform",
"module":"Cat2Bug-Platform\登陆",
"moduleVersion":"0.3.2",
"defectState":"PROCESSING",
"defectLevel":"2",
}
}
}
Return Value Description
Parameter | Type | Range | Illustrate |
---|---|---|---|
createBy | String | Create Member | |
createTime | String | Create Time | |
updateBy | String | Update Member | |
updateTime | String | Update Time | |
defectNumber | Integer | Defect Number,Numbers in the same project cannot be duplicated | |
defectType | String | BUG、TASK、DEMAND | Defect Type |
defectName | String | 1 to 128 bit bytes | Defect Name |
defectDescribe | String | 1 to 65536 bit bytes | Defect Describe |
annexList | String | Annex Path List | |
imgList | String | Image Path List | |
project | String | Project Name | |
deliverable | String | Deliverable Name | |
deliverableVersion | String | Deliverable Version | |
defectState | String | PROCESSING、AUDIT、RESOLVED、REJECTED、CLOSED | Defect State |
defectLevel | Integer | Defect Level |
- Example
curl --location -X POST 'http://localhost:2020/api/defect' \
-H 'Content-Type: application/json' \
-H 'CAT2BUG-API-KEY: 202402110748485l2ug97j471ul9wq' \
-d '{"defectType": 1, "defectName":"defectName", "defectDescribe":"defectDescribe", "defectLevel":2 }'
Prompt
Please replace the interface IP, port, and CAT2BUG-API-KEY key in the example