查询迭代关联的需求列表或树
功能介绍
查询迭代关联的需求列表或树
调用方法
请参见如何调用API。
URI
POST /GT3KServer/v4/{project_id}/iterators/{iterator_id}/issues/batch-query
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
iterator_id |
是 |
String |
参数解释 迭代uri 约束限制 不涉及 取值范围 11-34位数字/字母 默认取值 不涉及 |
project_id |
是 |
String |
参数解释: 项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID 约束限制: 不涉及 取值范围: 项目uuid应符合如下规则:长度等于32位,包含大小写字母、数字 默认取值: 不涉及 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
参数解释: 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 必传。 取值范围: 字符串长度不少于1,不超过10万。 默认取值: 不涉及。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
owner |
否 |
String |
参数解释 过滤条件:处理人 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
issue_id |
否 |
String |
参数解释 需求ID 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
page_no |
否 |
Integer |
参数解释 页码 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
page_size |
否 |
Integer |
参数解释 每页展示条数 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
key_word |
否 |
String |
参数解释 关键字 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
iteration_id |
否 |
String |
参数解释 过滤条件:迭代ID 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
severity_id |
否 |
String |
参数解释 过滤条件:重要程度ID 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
status_id |
否 |
String |
参数解释 过滤条件:状态ID 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
module_id |
否 |
String |
参数解释 过滤条件:模块ID 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
status_ids |
否 |
String |
参数解释 过滤条件:状态ID多个条件,每个条件取或, 约束限制 不涉及 取值范围 -2代表搜索未设置 默认取值 不涉及 |
module_ids |
否 |
String |
参数解释 过滤条件:模块ID多个,每个条件取或 约束限制 不涉及 取值范围 -2代表搜索未设置 默认取值 不涉及 |
pi_filter |
否 |
Array of IssueListPiFilterInfo objects |
参数解释 迭代、pi过滤条件 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
status_names |
否 |
Array of strings |
参数解释 状态名称列表 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
value |
Array of WorkItemVo objects |
参数解释 实际的数据类型:单个对象,集合 或 NULL 取值范围 不涉及 |
参数 |
参数类型 |
描述 |
---|---|---|
name |
String |
参数解释 工作项名称 取值范围 不涉及 |
owner |
String |
参数解释 处理人 取值范围 不涉及 |
path |
String |
参数解释 工作项路径 取值范围 不涉及 |
start_date |
String |
参数解释 预计开始日期 取值范围 不涉及 |
due_date |
String |
参数解释 预计结束日期 取值范围 不涉及 |
region |
String |
参数解释 逻辑region 取值范围 使用公有云实际区域 |
creator |
String |
参数解释 创建人 取值范围 不涉及 |
updator |
String |
参数解释 更新人 取值范围 不涉及 |
project_uuid |
String |
参数解释 项目UUID 取值范围 项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID |
work_item_id |
String |
参数解释 工作项编号 取值范围 不涉及 |
status_id |
String |
参数解释 状态ID 取值范围 不涉及 |
status_name |
String |
参数解释 状态 取值范围 不涉及 |
tracker_id |
String |
参数解释 类型ID 取值范围 不涉及 |
tracker_name |
String |
参数解释 类型 取值范围 不涉及 |
iteration_id |
String |
参数解释 迭代ID 取值范围 不涉及 |
module_id |
String |
参数解释 模块ID 取值范围 不涉及 |
severity_id |
String |
参数解释 重要程度ID 取值范围 不涉及 |
severity_name |
String |
参数解释 重要程度 取值范围 不涉及 |
parent_workitem_id |
String |
参数解释 父工作项编号 取值范围 不涉及 |
board_id |
String |
参数解释 看板ID 取值范围 不涉及 |
board_name |
String |
参数解释 看板名称 取值范围 不涉及 |
create_time |
String |
参数解释 创建时间 取值范围 不涉及 |
update_time |
String |
参数解释 更新时间 取值范围 不涉及 |
iteration_name |
String |
参数解释 迭代名 取值范围 不涉及 |
module_name |
String |
参数解释 模块名 取值范围 不涉及 |
module_path |
String |
参数解释 模块path 取值范围 不涉及 |
module_path_name |
String |
参数解释 模块路径名称 取值范围 不涉及 |
owner_name |
String |
参数解释 处理人 取值范围 不涉及 |
have_child_dynamic |
Boolean |
参数解释 父工作项下是否有子工作项包含动态 取值范围 true:是 false:否 |
has_child |
Boolean |
参数解释 父工作项下是否有子工作项 取值范围 true:有子工作项 false:无子工作项 |
issue_dynamic_count |
Integer |
参数解释 需求动态数量 取值范围 不涉及 |
case_count |
Integer |
参数解释 用例数量 取值范围 不涉及 |
sequence_id |
String |
参数解释 xBoard项目工作项序列 取值范围 不涉及号 |
pi_id |
String |
参数解释 pi的id 取值范围 层级关系:pi -> 迭代 -> 需求 |
pi_name |
String |
参数解释 迭代ID 取值范围 不涉及 |
状态码:400
参数 |
参数类型 |
描述 |
---|---|---|
code |
String |
参数解释: 业务失败的错误码 取值范围: 不涉及 |
reason |
String |
参数解释: 业务失败的提示内容 取值范围: 不涉及 |
状态码:401
参数 |
参数类型 |
描述 |
---|---|---|
code |
String |
参数解释: 业务失败的错误码 取值范围: 不涉及 |
reason |
String |
参数解释: 业务失败的提示内容 取值范围: 不涉及 |
状态码:404
参数 |
参数类型 |
描述 |
---|---|---|
code |
String |
参数解释: 业务失败的错误码 取值范围: 不涉及 |
reason |
String |
参数解释: 业务失败的提示内容 取值范围: 不涉及 |
状态码:500
参数 |
参数类型 |
描述 |
---|---|---|
code |
String |
参数解释: 业务失败的错误码 取值范围: 不涉及 |
reason |
String |
参数解释: 业务失败的提示内容 取值范围: 不涉及 |
请求示例
post https://{endpoint}/GT3KServer/v4/f3087a82b44744c29a1bd69ab6ada154/iterators/9b26f58ec29943f681804a6628779a23/issues/batch-query { "owner" : "e8ad9e7478c94f4eaf90d5a379af9cb1", "issue_id" : "efdb403066474ab08836b9eeaaa23bca", "page_no" : 1, "page_size" : 1000, "key_word" : "管理", "iteration_id" : "10415967", "severity_id" : "12", "status_id" : "1", "module_id" : "261469", "status_ids" : "1", "module_ids" : "261469", "status_names" : [ "string" ] }
响应示例
状态码:200
OK
{ "value" : [ { "name" : "Story1", "owner" : "dfc5347b9b16491e942ce55ce7f79dbc", "path" : "1413918,1413919", "region" : { "region" : null }, "creator" : "dfc5347b9b16491e942ce55ce7f79dbc", "updator" : "dfc5347b9b16491e942ce55ce7f79dbc", "project_uuid" : "90f8dc52eb7b4c47b853c661152ca62d", "work_item_id" : "1413919", "status_id" : "1", "status_name" : "新建", "tracker_id" : "7", "tracker_name" : "Story", "severity_id" : "12", "severity_name" : "一般", "parent_workitem_id" : "1413918", "create_time" : "2025-02-28 16:05:21", "update_time" : "2025-02-28 16:05:21", "owner_name" : "TMSS01", "have_child_dynamic" : false, "has_child" : false, "issue_dynamic_count" : 0, "case_count" : 0 } ] }
SDK代码示例
SDK代码示例如下。
Java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.cloudtest.v1.region.CloudtestRegion; import com.huaweicloud.sdk.cloudtest.v1.*; import com.huaweicloud.sdk.cloudtest.v1.model.*; import java.util.List; import java.util.ArrayList; public class ListIteratorIssueTreeSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); ICredential auth = new BasicCredentials() .withAk(ak) .withSk(sk); CloudtestClient client = CloudtestClient.newBuilder() .withCredential(auth) .withRegion(CloudtestRegion.valueOf("<YOUR REGION>")) .build(); ListIteratorIssueTreeRequest request = new ListIteratorIssueTreeRequest(); request.withIteratorId("{iterator_id}"); request.withProjectId("{project_id}"); IssueTreeInfo body = new IssueTreeInfo(); List<String> listbodyStatusNames = new ArrayList<>(); listbodyStatusNames.add("string"); body.withStatusNames(listbodyStatusNames); body.withModuleIds("261469"); body.withStatusIds("1"); body.withModuleId("261469"); body.withStatusId("1"); body.withSeverityId("12"); body.withIterationId("10415967"); body.withKeyWord("管理"); body.withPageSize(1000); body.withPageNo(1); body.withIssueId("efdb403066474ab08836b9eeaaa23bca"); body.withOwner("e8ad9e7478c94f4eaf90d5a379af9cb1"); request.withBody(body); try { ListIteratorIssueTreeResponse response = client.listIteratorIssueTree(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } } |
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# coding: utf-8 import os from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkcloudtest.v1.region.cloudtest_region import CloudtestRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkcloudtest.v1 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.environ["CLOUD_SDK_AK"] sk = os.environ["CLOUD_SDK_SK"] credentials = BasicCredentials(ak, sk) client = CloudtestClient.new_builder() \ .with_credentials(credentials) \ .with_region(CloudtestRegion.value_of("<YOUR REGION>")) \ .build() try: request = ListIteratorIssueTreeRequest() request.iterator_id = "{iterator_id}" request.project_id = "{project_id}" listStatusNamesbody = [ "string" ] request.body = IssueTreeInfo( status_names=listStatusNamesbody, module_ids="261469", status_ids="1", module_id="261469", status_id="1", severity_id="12", iteration_id="10415967", key_word="管理", page_size=1000, page_no=1, issue_id="efdb403066474ab08836b9eeaaa23bca", owner="e8ad9e7478c94f4eaf90d5a379af9cb1" ) response = client.list_iterator_issue_tree(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) |
Go
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" cloudtest "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cloudtest/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cloudtest/v1/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cloudtest/v1/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). Build() client := cloudtest.NewCloudtestClient( cloudtest.CloudtestClientBuilder(). WithRegion(region.ValueOf("<YOUR REGION>")). WithCredential(auth). Build()) request := &model.ListIteratorIssueTreeRequest{} request.IteratorId = "{iterator_id}" request.ProjectId = "{project_id}" var listStatusNamesbody = []string{ "string", } moduleIdsIssueTreeInfo:= "261469" statusIdsIssueTreeInfo:= "1" moduleIdIssueTreeInfo:= "261469" statusIdIssueTreeInfo:= "1" severityIdIssueTreeInfo:= "12" iterationIdIssueTreeInfo:= "10415967" keyWordIssueTreeInfo:= "管理" pageSizeIssueTreeInfo:= int32(1000) pageNoIssueTreeInfo:= int32(1) issueIdIssueTreeInfo:= "efdb403066474ab08836b9eeaaa23bca" ownerIssueTreeInfo:= "e8ad9e7478c94f4eaf90d5a379af9cb1" request.Body = &model.IssueTreeInfo{ StatusNames: &listStatusNamesbody, ModuleIds: &moduleIdsIssueTreeInfo, StatusIds: &statusIdsIssueTreeInfo, ModuleId: &moduleIdIssueTreeInfo, StatusId: &statusIdIssueTreeInfo, SeverityId: &severityIdIssueTreeInfo, IterationId: &iterationIdIssueTreeInfo, KeyWord: &keyWordIssueTreeInfo, PageSize: &pageSizeIssueTreeInfo, PageNo: &pageNoIssueTreeInfo, IssueId: &issueIdIssueTreeInfo, Owner: &ownerIssueTreeInfo, } response, err := client.ListIteratorIssueTree(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } } |
更多
更多编程语言的SDK代码示例,请参见API Explorer的代码示例页签,可生成自动对应的SDK代码示例。
状态码
状态码 |
描述 |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
404 |
Not Found |
500 |
Internal Server Error |
错误码
请参见错误码。