文档首页 > > API参考> 应用示例> 示例1:根据项目ID查询项目列表

示例1:根据项目ID查询项目列表

分享
更新时间:2020/07/30 GMT+08:00

场景描述

本章节指导用户根据DEVCLOUD_PROJECT_UUID查询任务列表。

约束限制

涉及接口

涉及的接口如下:

根据项目ID查询任务列表:根据DEVCLOUD_PROJECT_UUID查询任务列表。

操作步骤

查询任务列表。

  • 接口相关信息

    URI格式:GET /v1/projects/{project_id}/tasks

  • 请求示例

    GET https://{endpoint}/codecheck/v1/projects/2b31ee57xxxxxxxx/tasks{endpoint}

    信息请从终端节点获取。

  • 响应示例
    {
    "result":[
    {
    "projectId":"b9db371361724226937f3280df1d4fc4",
    "devCloudProjectId":"a2b9a42ee6494e0794f5655f8535920e",
    "devCloudProjectName":"TestDemo",
    "codeHubName":"portal-ts",
    "codeHubWebUrl":"https://xxxxx/portal-ts",
    "codeLineTotal":"63371",
    "projectName":"portal-ts-abctest111222",
    "creatorId":"ae161856f2604229ae12056478a7919f",
    "creatorName":"devcloud_devcloud_y00336947_01",
    "domainId":"78d0e09c1ad0425b9b4f3a8fdd066164",
    "domainName":"devcloud_devcloud_y00336947_01",
    "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":"7905",
    "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":{
    
    }
    },
    {
    "projectId":"b9db371361724226937f3280df1d4fc4",
    "devCloudProjectId":"a2b9a42ee6494e0794f5655f8535920e",
    "devCloudProjectName":"TestDemo",
    "codeHubName":"portal-ts",
    "codeHubWebUrl":"https://xxxxx/portal-ts",
    "codeLineTotal":"63371",
    "projectName":"portal-ts-abctest111222",
    "creatorId":"ae161856f2604229ae12056478a7919f",
    "creatorName":"devcloud_devcloud_y00336947_01",
    "domainId":"78d0e09c1ad0425b9b4f3a8fdd066164",
    "domainName":"devcloud_devcloud_y00336947_01",
    "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":"7905",
    "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"
    }

  

分享:

    相关文档

    相关产品

文档是否有解决您的问题?

提交成功!非常感谢您的反馈,我们会继续努力做到更好!
反馈提交失败,请稍后再试!

*必选

请至少选择或填写一项反馈信息

字符长度不能超过200

提交反馈 取消

如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨

智能客服提问云社区提问