Welcome to Cat2BugWelcome to Cat2Bug
Home
  • Cat2Bug-Platform
  • Cat2Bug-Platform
  • GitHub
  • Gitee
  • 简体中文
  • English
Home
  • Cat2Bug-Platform
  • Cat2Bug-Platform
  • GitHub
  • Gitee
  • 简体中文
  • English
  • Guide

    • Introduce
    • Experience
    • Rapid Deployment
    • /lang/us/document/cat2bug-platform/guide/update.html
  • Function

    • Member
    • Team
    • Project
    • Deliverable
    • Test Cases
    • Defect
    • Report
    • Document
    • /lang/us/document/cat2bug-platform/system/notice.html
  • API Interface

    • API Introduction
    • Defect Interface
    • Reporting Interface

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

ParameterTypeRangeIllustrate
defectTypeIntegerMust,BUG、TASK、DEMANDDefect Type
defectNameStringMust,1 to 128 bit bytesDefect Name
defectDescribeStringMust,1 to 65536 bit bytesDefect Describe
defectLevelIntegerMust,1 to 5Defect 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

ParameterTypeRangeIllustrate
createByStringCreate Member
createTimeStringCreate Time
updateByStringUpdate Member
updateTimeStringUpdate Time
defectNumberIntegerDefect Number,Numbers in the same project cannot be duplicated
defectTypeStringBUG、TASK、DEMANDDefect Type
defectNameString1 to 128 bit bytesDefect Name
defectDescribeString1 to 65536 bit bytesDefect Describe
annexListStringAnnex Path List
imgListStringImage Path List
projectStringProject Name
deliverableStringDeliverable Name
deliverableVersionStringDeliverable Version
defectStateStringPROCESSING、AUDIT、RESOLVED、REJECTED、CLOSEDDefect State
defectLevelIntegerDefect 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

Last Updated:
Contributors: yuzhantao
Prev
API Introduction
Next
Reporting Interface