更新时间:2025-09-11 GMT+08:00
分享

查询工作设置模板V2

功能介绍

查询工作设置模板V2。

调用方法

请参见如何调用API

URI

GET /v2/project-template/template

表1 Query参数

参数

是否必选

参数类型

描述

search

String

参数解释:

根据名称模糊查询关键字。

约束限制:

不涉及。

取值范围:

不涉及。

默认取值:

不涉及。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

参数解释:

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

约束限制:

必传。

取值范围:

最小长度:10,最大长度:32768。

默认取值:

不涉及。

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

result

result object

参数解释:

返回结果。

status

String

参数解释:

返回状态。

取值范围:

success:返回成功。

error:返回失败。

表4 result

参数

参数类型

描述

templates

Array of templates objects

参数解释:

模板。

取值范围:

不涉及。

表5 templates

参数

参数类型

描述

name

String

参数解释:

模板名称。

取值范围:

不涉及。

description

String

参数解释:

模板描述。

取值范围:

不涉及。

creator

creator object

参数解释:

模板负责人。

取值范围:

不涉及。

source_project

source_project object

参数解释:

模板的来源项目。

取值范围:

不涉及。

count

Integer

参数解释:

模板数量。

取值范围:

不涉及。

project_list

Array of project_list objects

参数解释:

项目列表。

取值范围:

不涉及。

children

Array of children objects

参数解释:

子项目。

取值范围:

不涉及。

表6 creator

参数

参数类型

描述

nick_name

String

参数解释:

负责人姓名。

取值范围:

不涉及。

表7 source_project

参数

参数类型

描述

project_name

String

参数解释:

模板的来源项目名称。

取值范围:

不涉及。

表8 project_list

参数

参数类型

描述

name

String

参数解释:

项目名称。

取值范围:

不涉及。

identifier

String

参数解释:

项目uuid。

取值范围:

不涉及。

description

String

参数解释:

模板描述。

取值范围:

不涉及。

total

Integer

参数解释:

优先顺序级。

取值范围:

不涉及。

close

Integer

参数解释:

项目是否关闭。

取值范围:

0(关闭)

1(打开)

role

Integer

参数解释:

项目成员角色。

取值范围:

不涉及。

type

String

参数解释:

项目类型。

取值范围:

scrum。

mem_count

Integer

参数解释:

项目成员数量。

取值范围:

不涉及。

表9 children

参数

参数类型

描述

id

Integer

参数解释:

子项目id。

取值范围:

不涉及。

name

String

参数解释:

子项目名称。

取值范围:

不涉及。

description

String

参数解释:

子项目描述。

取值范围:

不涉及。

authorId

Integer

参数解释:

子项目负责人id。

取值范围:

不涉及。

count

Integer

参数解释:

子项目数量 。

取值范围:

不涉及。

请求示例

{endpoint}/v2/project-template/template

响应示例

状态码:200

查询工作项设置模板成功的响应。

{
  "result" : {
    "templates" : [ {
      "name" : "Scrum",
      "description" : "系统默认工作项设置模板",
      "creator" : {
        "nick_name" : "系统"
      },
      "source_project" : {
        "project_name" : ""
      },
      "count" : 1311,
      "project_list" : [ {
        "name" : "Scrum01192024",
        "identifier" : "9cf57d978ce74cb7aa4b444e1ca379fd",
        "description" : "",
        "total" : 0,
        "close" : 0,
        "role" : 0,
        "type" : "scrum",
        "mem_count" : 0
      } ],
      "children" : [ {
        "id" : 384006,
        "name" : "12345",
        "description" : "",
        "authorId" : 4091,
        "count" : 0
      } ]
    } ]
  },
  "status" : "success"
}

状态码

状态码

描述

200

查询工作项设置模板成功的响应。

错误码

请参见错误码

相关文档