华为云用户手册

  • 请求示例 GET https://{endpoint}/v4/projects/526cefde62004de2b62b5e8dd2c2b3af/issues/workflow/config?tracker_id=7GET https://{endpoint}/v4/projects/526cefde62004de2b62b5e8dd2c2b3af/issues/workflow/config?tracker_id=7
  • URI GET /v4/projects/{project_id}/issues/workflow/config 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String devcloud项目的32位id 最小长度:32 最大长度:32 表2 Query参数 参数 是否必选 参数类型 描述 tracker_id 是 Integer 工作项类型id [2,3,4,5,6,7]
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 workflows Array of ScrumStatusFlowVo objects 流转数据 表5 ScrumStatusFlowVo 参数 参数类型 描述 id String 流转数据的uuid name String 状态名称 status_id Integer 状态id direct_to Array of ScrumStatusFlowDirectToVo objects 流转到的数据 表6 ScrumStatusFlowDirectToVo 参数 参数类型 描述 id String 流转数据的uuid status_id Integer 状态id name String 状态名 enabled Boolean 是否开启流转 状态码: 400 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 401 表8 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
  • 响应示例 状态码: 200 OK { "work_items" : [ { "id" : "4633454879781163008", "description" : "demo", "actual_work_hours" : 10, "assigned_user" : { "id" : "665b542eb4c14b53a15ead449f28b0ba", "name" : "demo_user_name", "nick_name" : "demo" }, "author" : { "id" : "665b542eb4c14b53a15ead449f28b0ba", "name" : "demo_user_name", "nick_name" : "demo" }, "begin_time" : "1590940800000", "created_time" : "1590940800000", "tags" : [ { "id" : "456", "name" : "tagdemo" } ], "developer" : { "id" : "665b542eb4c14b53a15ead449f28b0ba", "name" : "demo_user_name", "nick_name" : "demo" }, "assigned_cc_user" : [ { "id" : "665b542eb4c14b53a15ead449f28b0ba", "name" : "demo_user_name", "nick_name" : "demo" } ], "discover_version" : "ProjectMan 8.0.0", "end_time" : "1590940800000", "done_ratio" : "10%", "expected_work_hours" : 9, "order" : "1", "parent_work_item_id" : "4633454879781163001", "release_version" : "ProjectMan 8.0.0", "story_point" : "0", "domain" : { "id" : "14", "name" : "性能" }, "iteration" : { "id" : "456", "name" : "迭代1" }, "module" : { "id" : "456", "name" : "Project" }, "priority" : "低", "severity" : "一般", "status" : { "id" : "d25fe91f7f6b489db5f804e66ac3b360", "name" : "新建" }, "subject" : "demosubject", "updated_time" : "1595832054113", "sequence" : "5500756", "important" : "提示", "custom_fields" : [ { "field_id" : "d25fe91f7f6b489db5f804e66a0", "field_name" : "customField", "field_type" : "Select", "field_option_source" : "USER", "value" : "{\"id\":\"d25fe91f7f6b489db5f804e66a0\",\"name\":\"devcloud_test001\",\"nick_name\":\"demo\"}" } ] } ], "total" : 1}
  • URI GET /v4/projects/{project_id}/work-items 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String devcloud项目的32位id 最小长度:32 最大长度:32 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 偏移量 从0开始 最小值:0 缺省值:0 limit 否 Integer 每页数量 最小1,最大100 最小值:1 最大值:100 缺省值:100 created_time_interval 否 String 创建工作项的时间(查询的起始时间,查询的结束时间)
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 work_items Array of Workitems objects 工作项 total Integer 总数 表5 Workitems 参数 参数类型 描述 id String 工作项id description String 工作项描述 actual_work_hours Double 实际工时 assigned_user WorkitemUser object author WorkitemUser object begin_time String 工作项开始时间 created_time String 创建时间 tags Array of tags objects 标签 developer WorkitemUser object assigned_cc_user Array of WorkitemUser objects 抄送人 discover_version String 发现问题的版本 end_time String 工作项结束时间 done_ratio String 工作项进度值 expected_work_hours Double 预计工时 order String 顺序 parent_work_item_id String 父工作项的id release_version String 发布的版本 story_point String 故事点 domain domain object id, 领域 14, '性能', 15, '功能', 16, '可靠性' 17, '网络安全' 18, '可维护性' 19, '其他DFX' 20, '可用性' 其他 iteration iteration object 迭代 module module object 模块 priority String 工作项优先级 severity String 严重的程度 "提示", "一般", "严重", "致命" status status object 工作项状态 subject String 工作项标题 updated_time String 更新时间 sequence String 工作项编号 important String 重要程度 "关键", "重要", "一般", "提示" custom_fields Array of WorkitemCustomField objects 用户自定义字段 表6 tags 参数 参数类型 描述 id String 标签id name String 标签名 表7 WorkitemUser 参数 参数类型 描述 id String 用户32位uuid name String 用户名 nick_name String 昵称 表8 domain 参数 参数类型 描述 id String 领域id name String 领域 表9 iteration 参数 参数类型 描述 id String 迭代id name String 迭代名 表10 module 参数 参数类型 描述 id String 模块id name String 模块 表11 status 参数 参数类型 描述 id String 状态id name String 状态名称 表12 WorkitemCustomField 参数 参数类型 描述 field_id String 自定义字段id field_name String 自定义字段名称 field_type String 自定义字段类型, "Date","Number","DateTime", "MultiLineText","SingleLineText", "Select", "Checkbox" field_option_source String 自定义字段的选项源,CUSTOM,USER,DOMAIN,ITERATION,MODULE,TAG value String 自定义字段值, (field_type为Date,Number,DateTime时,field_option_source为空,value值是数字的字符串), (field_type为MultiLineText,SingleLineText时,field_option_source为空,value值是文本字符串), (field_type为Select ,field_option_source为CUSTOM时,value值是文本字符串) (field_type为Select ,field_option_source为USER,DOMAIN,ITERATION,MODULE,TAG时,value值是Json格式{}), (field_type为Checkbox ,field_option_source为CUSTOM时,value值是字符串数组["aaa"]), (field_type为"Checkbox" ,field_option_source为USER,DOMAIN,ITERATION,MODULE,TAG时,value值是Json的数组[{},{}]) 状态码: 400 表13 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 401 表14 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
  • 响应示例 状态码: 200 OK { "issue_completion_rates" : [ { "issue_status" : { "closed_num" : 0, "new_num" : 0, "process_num" : 0, "rejected_num" : 0, "solved_num" : 0, "test_num" : 0 }, "tracker_id" : 3 } ], "total" : 2}
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 issue_completion_rates Array of issue_completion_rates objects 不同类型的工作项完成率 total Integer 总数 表4 issue_completion_rates 参数 参数类型 描述 issue_status issue_status object 工作项不同状态下的数量 tracker_id Integer 工作项类型id,1需求,2任务/Task,3缺陷/Bug,5Epic,6Feature,7Story 表5 issue_status 参数 参数类型 描述 closed_num Integer 已关闭的工作项 new_num Integer 新建的工作项 process_num Integer 进行中的工作项数目 rejected_num Integer 已经拒绝的工作项 solved_num Integer 已经解决的工作项 test_num Integer 测试中的工作项 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 dividend_value String 指标分子数值 divisor_value String 指标分母数值 metric_name String 指标名称 metric_value String 指标数值 project_id String 项目ID project_name String 项目名称 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
  • 请求示例 Post https://{endpoint}/v1/eace9c0a00574de6878ab580daa9a317/completion-rate/query{ "date_range" : "1598457600000,1598544000000", "dividend" : { "custom_field16" : "自定义字段值", "on_time" : "ontime" }, "divisor" : { }, "metric_type" : "on-time_completion_rate", "sprint_id" : "8883443"}
  • 响应示例 状态码: 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" : "我的项目"}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 date_range 否 String 统计周期 metric_type 否 String 指标类型 sprint_id 否 String 迭代ID dividend 否 dividend object 指标分子过滤条件 divisor 否 Object 指标分母过滤条件 表4 dividend 参数 是否必选 参数类型 描述 on_time 否 String 是否按时 custom_field16 否 String 自定义字段 custom_field17 否 String 自定义字段 custom_field18 否 String 自定义字段 custom_field19 否 String 自定义字段 custom_field20 否 String 自定义字段 custom_field21 否 String 自定义字段 custom_field22 否 String 自定义字段 custom_field23 否 String 自定义字段 custom_field24 否 String 自定义字段 custom_field25 否 String 自定义字段 custom_field26 否 String 自定义字段 custom_field27 否 String 自定义字段 custom_field28 否 String 自定义字段 custom_field29 否 String 自定义字段 custom_field30 否 String 自定义字段 custom_field31 否 String 自定义字段 custom_field32 否 String 自定义字段 custom_field33 否 String 自定义字段 custom_field34 否 String 自定义字段 custom_field35 否 String 自定义字段 custom_field36 否 String 自定义字段 custom_field37 否 String 自定义字段 custom_field38 否 String 自定义字段 custom_field39 否 String 自定义字段 custom_field40 否 String 自定义字段
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 user_role Integer 用户角色id 成员角色, -1 项目创建者, 3 项目经理, 4 开发人员, 5 测试经理, 6 测试人员, 7 参与者, 8 浏览者, 9 运维经理 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 401 表5 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 dividend_value String 指标分子数值 divisor_value String 指标分母数值 metric_name String 指标名称 metric_value String 指标数值 project_id String 项目ID project_name String 项目名称 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
  • 请求示例 Post https://{endpoint}/v1/eace9c0a00574de6878ab580daa9a317/bugs-per-developer/query{ "dividend" : { "custom_field16" : "自定义字段值" }, "divisor" : { }, "metric_type" : "issues_per_developer", "sprint_id" : "8883443"}
  • 响应示例 状态码: 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"}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 metric_type 否 String 指标类型 sprint_id 否 String 迭代ID dividend 否 dividend object 指标分子过滤条件 divisor 否 Object 指标分母过滤条件 表4 dividend 参数 是否必选 参数类型 描述 custom_field16 否 String 自定义字段 custom_field17 否 String 自定义字段 custom_field18 否 String 自定义字段 custom_field19 否 String 自定义字段 custom_field20 否 String 自定义字段 custom_field21 否 String 自定义字段 custom_field22 否 String 自定义字段 custom_field23 否 String 自定义字段 custom_field24 否 String 自定义字段 custom_field25 否 String 自定义字段 custom_field26 否 String 自定义字段 custom_field27 否 String 自定义字段 custom_field28 否 String 自定义字段 custom_field29 否 String 自定义字段 custom_field30 否 String 自定义字段 custom_field31 否 String 自定义字段 custom_field32 否 String 自定义字段 custom_field33 否 String 自定义字段 custom_field34 否 String 自定义字段 custom_field35 否 String 自定义字段 custom_field36 否 String 自定义字段 custom_field37 否 String 自定义字段 custom_field38 否 String 自定义字段 custom_field39 否 String 自定义字段 custom_field40 否 String 自定义字段
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 domain_id String 租户id domain_name String 租户名 user_num_id Integer 用户数字id user_id String 用户id user_name String 用户名 nick_name String 用户昵称 created_time Long 创建时间 updated_time Long 更新时间 gender String 性别 user_type String 用户类型, User 云用户, Federation 联邦账号, 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 401 表4 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
  • 响应示例 状态码: 200 OK { "domain_id" : "4e919d73499648e3b0292cd3cbef806a", "domain_name" : "demo_user_name", "user_num_id" : "4060", "user_id" : "a360371833bf4c558f796fd707b44daf", "user_name" : "demo_user_name", "nick_name" : "我的名字要非常非常长才能测出问题", "created_time" : "1562318865000", "updated_time" : "1598074854000", "gender" : "male", "user_type" : "User"}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 date_range 否 String 统计周期 metric_type 否 String 指标类型 dividend 否 dividend object 指标分子过滤条件 divisor 否 Object 指标分母过滤条件 表4 dividend 参数 是否必选 参数类型 描述 custom_fields 否 Array of custom_fields objects 自定义类型过滤条件 表5 custom_fields 参数 是否必选 参数类型 描述 name 否 String 自定义字段名称 options 否 String 自定义字段取值,逗号分隔
  • 请求示例 Post https://{endpoint}/v2/eace9c0a00574de6878ab580daa9a317/bug-density/query{ "date_range" : "1590940800000,1593446400000", "dividend" : { "custom_fields" : [ { "name" : "自定义字段名称", "options" : "自定义字段值" } ] }, "divisor" : { }, "metric_type" : "bug_density"}
  • 响应参数 状态码: 200 表6 响应Body参数 参数 参数类型 描述 dividend_value String 指标分子数值 divisor_value String 指标分母数值 metric_name String 指标名称 metric_value String 指标数值 project_id String 项目ID project_name String 项目名称 状态码: 400 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 401 表8 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
  • 响应示例 状态码: 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"}
  • 响应示例 状态码: 200 OK { "records" : [ { "work_item_record_id" : "7401906a85de466c81fd90e22824eb19", "work_item_id" : "4633454879781163008", "project_id" : "526cefde62004de2b62b5e8dd2c2b3af", "work_item_statuses" : [ { "id" : "7401906a85de466c81fd90e22824eb19", "status" : { "id" : "d25fe91f7f6b489db5f804e66ac3b360", "name" : "7401906a85de466c81fd90e22824eb19", "type" : "BACK LOG ", "description" : "demo", "parent_status_id" : "7401906a85de466c81fd90e22824aaaa" } } ] } ], "total" : 1}
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 records Array of WorkitemStatusRecords objects 操作历史 total Integer 总数 表5 WorkitemStatusRecords 参数 参数类型 描述 work_item_record_id String 工作项的记录id,一个工作项对应一条记录 最小长度:32 最大长度:32 work_item_id String 工作项id project_id String devcloud项目的32位id 最小长度:32 最大长度:32 work_item_statuses Array of WorkitemStatus objects 操作历史 表6 WorkitemStatus 参数 参数类型 描述 id String 工作项状态变更记录的id,每次变更产生一条新的记录id 最小长度:1 最大长度:32 status status object 工作项的状态 表7 status 参数 参数类型 描述 id String 工作项的状态id 最小长度:1 最大长度:32 name String 状态名称 最小长度:1 最大长度:60 type String 工作项状态的类型, BACKLOG( "初始化"), READY("待启动"), IN_PROGRESS("进行中"), COMPLETE("已完成"), DONE("已结束"), description String 工作项状态的描述 parent_status_id String 工作项状态的父状态id 最小长度:1 最大长度:32 状态码: 400 表8 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 401 表9 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
  • URI GET /v4/projects/{project_id}/work-items/status-records 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String devcloud项目的32位id 最小长度:32 最大长度:32 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 偏移量 从0开始 最小值:0 缺省值:0 limit 否 Integer 每页数量 最小1,最大100 最小值:1 最大值:100 缺省值:100
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 templates Array of templates objects 模板信息列表 表5 templates 参数 参数类型 描述 id Integer 模板id project_id Integer 项目id tracker_id Integer 工作项类型id description String 工作项详情模板描述内容 issue_field_config String 模板配置 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
  • URI GET /v4/projects/{project_id}/status-statistic 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String devcloud项目的32位id 表2 Query参数 参数 是否必选 参数类型 描述 iteration_id 是 Integer 迭代数字id tracker_id 是 Integer 自定义字段支持的工作项类型 2任务/Task,3缺陷/Bug,7Story status_id 是 Integer 工作项状态数字id
  • 响应示例 状态码: 200 OK [ { "user" : { "user_id" : "112a642015cf11eca152fa163ec9f6c1", "user_num_id" : 5055, "name" : "devcloud_devcloud_test_01_test" }, "item_count" : 1, "data" : { "5874579" : 1 }}, { "user" : { "user_id" : "1139ffb615cf11eca152fa163ec9f6c1", "user_num_id" : 5255, "name" : "devcloud_devcloud_test_01_test" }, "item_count" : 1, "data" : { "5874580" : 1 }}, { "user" : { "user_id" : "a360371833bf4c558f796fd707b44daf", "user_num_id" : 9078, "nick_name" : "sstest5", "name" : "devcloud_devcloud_test_01" }, "item_count" : 2, "data" : { "5874581" : 1, "5874584" : 1 }}, { "user" : { "user_id" : "D0XCOQMxQ9Nujj9lybk51lFEQzpdpzMc", "user_num_id" : 15437, "name" : "devcloud_devcloud_test_01_FederationUser" }, "item_count" : 1, "data" : { "5874582" : 2 }} ]
  • 请求参数 表1 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表2 请求Body参数 参数 是否必选 参数类型 描述 project_id 否 String 项目uuid issue_ids 否 Array of strings 工作项id字符串列表
共100000条