文档首页/ 需求管理 CodeArts Req/ API参考/ API/ IPD工作项管理/ 查询工作项详情 - ShowIssueDetail
更新时间:2026-09-01 GMT+08:00
分享

查询工作项详情 - ShowIssueDetail

功能介绍

查询工作项详情。

调用方法

请参见如何调用API

授权信息

当前API调用无需身份策略权限。

URI

GET /v1/ipdprojectservice/projects/{project_id}/issues/{issue_id}

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释

项目32位ID,项目唯一标识。通过查询IPD项目列表获取,响应消息体中的id字段的值就是项目ID。

约束限制

不涉及。

取值范围

32个字符,由英文字母和数字组成。

默认取值

不涉及。

issue_id

String

参数解释

工作项唯一ID。可以通过查询工作项列表或者查询树状工作项接口获取,响应消息体中的id字段的值就是工作项ID。

约束限制

不涉及。

取值范围

18~19个字符的数字字符串。

默认取值

不涉及。

表2 Query参数

参数

是否必选

参数类型

描述

issue_type

String

参数解释

工作项分类。

约束限制

1~32个字符。

取值范围

Epic,FE,SF,IR,RR,SR,US,AR,Bug,Task

默认取值

不涉及

domain_id

String

参数解释

项目空间ID,可以通过查询IPD项目列表接口获取,响应消息体中的domain_id字段的值就是项目空间ID。

约束限制

32个字符,由英文字母和数字组成。

取值范围

不涉及。

默认取值

不涉及

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

参数解释

用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

约束限制

不涉及。

取值范围

10~32768个字符。

默认取值

不涉及。

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

status

String

参数解释

返回状态。

取值范围

success:响应成功。

error:响应失败

message

String

参数解释

信息。

取值范围

不涉及

result

Array of IssueDetailsResponse objects

参数解释

查询结果。

表5 IssueDetailsResponse

参数

参数类型

描述

id

String

参数解释

工作项ID。

取值范围

不涉及。

number

String

参数解释

工作项编号。

取值范围

不涉及。

type

String

参数解释

工作项类型。

取值范围

不涉及。

stay_days

Integer

参数解释

停留天数。

取值范围

不涉及。

tenant_id

String

参数解释

租户ID。

取值范围

不涉及。

created_date

String

参数解释

工作项创建时间。

取值范围

不涉及。

title

String

参数解释

工作项标题。

取值范围

不涉及。

状态码:400

表6 响应Body参数

参数

参数类型

描述

error_code

String

参数解释

错误码。

取值范围

不涉及。

error_msg

String

参数解释

错误描述,对error_code的补充解释。

取值范围

不涉及。

请求示例

GET https://{endpoint}/v1/ipdprojectservice/projects/e4b0424709934bd1a54753e70336564d/issues/981935538274476033?issue_type=RR

响应示例

状态码:200

成功响应

{
  "status" : "success",
  "message" : "",
  "result" : [ {
    "position_float" : "9999999996.0678440000",
    "develop_owner" : null,
    "project" : {
      "id" : "1276960103044919297",
      "state" : "正在工作",
      "title" : "IPD-系统设备类0625001",
      "project_id" : "9919c49270f24584bfd99cf468704688",
      "category" : "Project",
      "created_by" : "d3775f2d201f423f9eeaa0b06f8f1b8f",
      "modified_by" : "d3775f2d201f423f9eeaa0b06f8f1b8f",
      "tenant_id" : "7e110bd5ff4e49fbacb683a2da7f79da",
      "model_id" : "10001",
      "project_template_id" : "10001",
      "category_template_id" : "10001",
      "feature_template_id" : "10001",
      "created_date" : "2026-06-25T17:43:33Z"
    },
    "child_issues" : [ ],
    "type" : "requirement",
    "plan_test_end_date" : null,
    "domain_id" : {
      "id" : "1276960103044919297",
      "name" : "IPD-系统设备类0625001",
      "title" : "IPD-系统设备类0625001",
      "project_id" : "9919c49270f24584bfd99cf468704688",
      "parent_id" : null,
      "category" : "Project",
      "created_by" : "d3775f2d201f423f9eeaa0b06f8f1b8f",
      "model_id" : "10001",
      "children" : [ ],
      "project_template_id" : "10001",
      "category_template_id" : "10001",
      "category_template_name" : null,
      "feature_template_id" : "10001",
      "feature_template_name" : null,
      "is_managed_by_tenant" : false,
      "is_locked" : false
    },
    "number" : "IR20260630026183",
    "path" : "/1278755202640818176",
    "convolution_actual_hours" : null,
    "upstream_change_flag" : null,
    "workload_man_day" : null,
    "children" : null,
    "id" : "1278755202640818176",
    "state" : "正在工作",
    "stay_days" : 5,
    "ir2feature" : "",
    "need_break" : {
      "id" : "1276960107109199995",
      "field_id" : "10164",
      "display_value" : "是",
      "value" : "yes",
      "code" : "yes",
      "value_py" : "yes",
      "sequence" : 1,
      "level" : 1,
      "domain_id" : "1276960103044919297",
      "belong_definition_type" : "5"
    },
    "collaborative_history" : null,
    "related_network_security" : {
      "id" : "1276960107109199878",
      "field_id" : "10258",
      "display_value" : "否",
      "value" : "no",
      "code" : "no",
      "value_py" : "no",
      "sequence" : 2,
      "level" : 1,
      "domain_id" : "1276960103044919297",
      "belong_definition_type" : "5"
    },
    "assigned_cc" : null,
    "workitem2label" : null,
    "baseline" : {
      "id" : "1276960107109199903",
      "field_id" : "10106",
      "display_value" : "已基线",
      "value" : "baselined",
      "code" : "baselined",
      "value_py" : "baselined",
      "sequence" : 2,
      "level" : 1,
      "domain_id" : "1276960103044919297",
      "belong_definition_type" : "5"
    },
    "close_time" : null,
    "priority" : {
      "id" : "1276960107109199909",
      "field_id" : "10042",
      "display_value" : "中",
      "value" : "中",
      "code" : "中",
      "value_py" : "2",
      "sequence" : 2,
      "level" : 1,
      "domain_id" : "1276960103044919297",
      "belong_definition_type" : "5"
    },
    "modified_date" : "1783073007920",
    "created_by" : {
      "user_id" : "029f95b680474fa396fcaba6a73954af",
      "user_name" : "creq_chm2",
      "domain_id" : "7e110bd5ff4e49fbacb683a2da7f79da",
      "nick_name" : "",
      "role_id" : "1cf8f0078f6847ee8ccc23b24fe4267f",
      "role_name" : "项目经理",
      "role_alias_name" : "Project manager",
      "role_code" : "Project manager"
    },
    "break_status" : {
      "id" : "1276960107109199918",
      "field_id" : "10253",
      "display_value" : "未分解",
      "value" : "undecomposed",
      "code" : "undecomposed",
      "value_py" : "undecomposed",
      "sequence" : 2,
      "level" : 1,
      "domain_id" : "1276960103044919297",
      "belong_definition_type" : "5"
    },
    "status_modified_date" : "1782808598494",
    "important" : null,
    "collaboratives" : null,
    "parent_id" : null,
    "business_domain" : {
      "id" : "1276960107109199972",
      "field_id" : "10024",
      "display_value" : "软件",
      "value" : "software",
      "code" : "software",
      "value_py" : "rj",
      "sequence" : 1,
      "level" : 1,
      "domain_id" : "1276960103044919297",
      "belong_definition_type" : "5"
    },
    "assignee" : {
      "user_id" : "029f95b680474fa396fcaba6a73954af",
      "user_name" : "creq_chm2",
      "domain_id" : "7e110bd5ff4e49fbacb683a2da7f79da",
      "nick_name" : "",
      "role_id" : "1cf8f0078f6847ee8ccc23b24fe4267f",
      "role_name" : "项目经理",
      "role_alias_name" : "Project manager",
      "role_code" : "Project manager"
    },
    "region" : "roma-dg-7",
    "inherit_button" : "hide",
    "status" : {
      "id" : "1276960107478298626",
      "belonging" : "START",
      "space_id" : "1276960103044919297",
      "name" : "初始",
      "code" : "Start",
      "definition_type" : "5",
      "belong_definition_type" : 3,
      "display_value" : "初始",
      "position" : 1,
      "displayable" : 1,
      "editable" : 1,
      "deletable" : 1,
      "mutable" : 1,
      "title_py" : "cs",
      "created_by" : "d3775f2d201f423f9eeaa0b06f8f1b8f",
      "created_date" : 1782380614394,
      "modified_date" : 1782380614394,
      "modified_by" : "d3775f2d201f423f9eeaa0b06f8f1b8f",
      "linkage_node_fields" : false
    },
    "plan_pi" : null,
    "tenant_id" : "7e110bd5ff4e49fbacb683a2da7f79da",
    "plan_dev_end_date" : null,
    "link" : "",
    "description" : "<p>【需求背景】</p><p><br></p><p>【需求价值】</p><p><br></p><p>【需求详情】</p><img data-src=\"/api/ipdproject/v1/projects/9919c49270f24584bfd99cf468704688/imgs/63624517320d4df6953bd3a0e28fef13.png\" src=\"/api/ipdproject/v1/projects/9919c49270f24584bfd99cf468704688/imgs/63624517320d4df6953bd3a0e28fef13.png\" data-image-id=\"img0\" devui-editorx-image=\"true\" style=\"vertical-align: baseline;\">",
    "is_suspended" : null,
    "change_status" : null,
    "title" : "IR-E2E追溯",
    "descendants" : "1278755202640818176",
    "sum_workload_man_day" : "12.0",
    "ir2rr" : "",
    "plan_end_date" : null,
    "root_id" : "1278755202640818176",
    "plan_start_date" : null,
    "convolution_plan_hours" : null,
    "category_layer_id" : "10001",
    "no_break_reason" : null,
    "submitted_by" : [ {
      "user_id" : "029f95b680474fa396fcaba6a73954af",
      "user_name" : "creq_chm2",
      "domain_id" : "7e110bd5ff4e49fbacb683a2da7f79da",
      "nick_name" : "",
      "role_id" : "1cf8f0078f6847ee8ccc23b24fe4267f",
      "role_name" : "项目经理",
      "role_alias_name" : "Project manager",
      "role_code" : "Project manager"
    } ],
    "cascade_delete" : "none",
    "issue_opinion_id" : null,
    "test_owner" : null,
    "issue_review_id" : null,
    "modified_by" : {
      "user_id" : "d3775f2d201f423f9eeaa0b06f8f1b8f",
      "user_name" : "creq_chm1",
      "domain_id" : "7e110bd5ff4e49fbacb683a2da7f79da",
      "nick_name" : "",
      "role_id" : "1cf8f0078f6847ee8ccc23b24fe4267f,e8b7a70b3d0d4c639823889498e00afe",
      "role_name" : "项目经理,项目管理员",
      "role_alias_name" : "Project manager,Project admin",
      "role_code" : "Project manager,project_admin"
    },
    "setup" : true,
    "created_date" : "1782808598427",
    "closed_flag" : null,
    "category" : "IR",
    "collaborative_status" : null
  } ]
}

状态码:400

错误原因

{
  "error_code" : "PM.02174103",
  "error_msg" : "无操作权限"
}

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
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.projectman.v4.region.ProjectManRegion;
import com.huaweicloud.sdk.projectman.v4.*;
import com.huaweicloud.sdk.projectman.v4.model.*;


public class ShowIssueDetailSolution {

    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);

        ProjectManClient client = ProjectManClient.newBuilder()
                .withCredential(auth)
                .withRegion(ProjectManRegion.valueOf("<YOUR REGION>"))
                .build();
        ShowIssueDetailRequest request = new ShowIssueDetailRequest();
        request.withProjectId("{project_id}");
        request.withIssueId("{issue_id}");
        try {
            ShowIssueDetailResponse response = client.showIssueDetail(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
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkprojectman.v4.region.projectman_region import ProjectManRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkprojectman.v4 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 = ProjectManClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(ProjectManRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = ShowIssueDetailRequest()
        request.project_id = "{project_id}"
        request.issue_id = "{issue_id}"
        response = client.show_issue_detail(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
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
    projectman "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/projectman/v4"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/projectman/v4/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/projectman/v4/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, err := basic.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        SafeBuild()

    if err != nil {
        fmt.Println(err)
        return
    }

    hcClient, err := projectman.ProjectManClientBuilder().
         WithRegion(region.ValueOf("<YOUR REGION>")).
         WithCredential(auth).
         SafeBuild()


    if err != nil {
        fmt.Println(err)
        return
    }

    client := projectman.NewProjectManClient(hcClient)

    request := &model.ShowIssueDetailRequest{}
	request.ProjectId = "{project_id}"
	request.IssueId = "{issue_id}"
	response, err := client.ShowIssueDetail(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

更多

更多编程语言的SDK代码示例,请参见API Explorer的代码示例页签,可生成自动对应的SDK代码示例。

状态码

状态码

描述

200

成功响应

400

错误原因

错误码

请参见错误码

相关文档