更新时间:2024-07-01 GMT+08:00
分享

示例2:查询缺陷概要

场景描述

本章节指导用户根据检查任务ID查询缺陷结果的概要,包括问题概述、问题状态、圈复杂度、代码重复率等。

约束限制

任务存在。

涉及接口

涉及的接口如下:

查询缺陷概要:查询缺陷概要,包括问题概述、问题状态、圈复杂度、代码重复率等。

操作步骤

  • 接口相关信息

    URI格式:GET /v2/tasks/{task_id}/defects-summary

  • 请求示例
    GET https://{endpoint}/v2/tasks/2b31ed520xxxxxxebedb6e57xxxxxxxx/defects-summary

    信息请从终端节点获取。

  • 响应示例
    {
    "result":{
    "info":{
    "projectId":"b9db371361724226937f3280df1d4fc4",
    "devCloudProjectId":"a2b9a42ee6494e0794f5655f8535920e",
    "devCloudProjectName":"TestDemo",
    "codeHubName":"portal-ts",
    "codeHubWebUrl":"https://xxxxx/portal-ts",
    "codeLineTotal":"63371",
    "projectName":"portal-ts-abctest111222",
    "creatorId":"ae161856f2604229ae12056478a7919f",
    "creatorName":"name",
    "domainId":"78d0e09c1ad0425b9b4f3a8fdd066164",
    "domainName":"name",
    "gitUrl":"git@xxxxx/portal-ts.git",
    "branch":"master",
    "language":"[
    \"html\"
    ]",
    "filePath":"[
    \"\"
    ]",
    "lastCheckTime\"":"2019-09-24 15:00:41",
    "codeQuality":"141.7",
    "codeLine":"55777",
    "projectStatus":"2",
    "riskCoefficient":"790",
    "starLevel":"0",
    "defectInfo":{
    "totalCount":"0",
    "criticalCount":"0",
    "seriousCount":"0",
    "normalCount":"0",
    "promptCount":"0"
    },
    "defectStatusInfo":{
    "totalCount":"2952",
    "newCount":"2952",
    "ignoredCount":"0",
    "fixedCount":"0"
    },
    "progress":{
    
    },
    "createdAt":"2019-08-08 17:56:40",
    "duplications":"24.0%",
    "complexityNum":"0",
    "complexityAvg":"0",
    "duplicatedLines":"15206",
    "commentLines":"0",
    "commentRatio":"0",
    "duplicatedBlocks":"0",
    "lastExecTime":"2 分 4 秒",
    "checkType":"source",
    "dependenceType":"",
    "logDatasStr":{
    
    }
    }
    },
    "status":"success"
    }

相关文档