获取项目模板列表

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求语法

GET /organization/organizationId/projects/listTemplates?category=String HTTP/1.1
Content-Type:application/json

请求参数

表 1. 请求Path参数
参数名称 类型 是否必选 示例 说明
organizationId String 5ebbc0228123212b59xxxxx

企业标识,也称企业id,字符串形式,可在云效访问链接中获取,如https://devops.aliyun.com/organization/【OrganizationId】

表 2. 请求Query参数
参数名称 类型 是否必选 示例 说明
category String Project

模板类型,这里的场景只用填Project

响应体语法

HTTP/1.1 200 OK
Content-Type:application/json

{
  "requestId" : "String",
  "errorMsg" : "String",
  "errorCode" : "String",
  "success" : Boolean,
  "templates" : [ {
    "creator" : "String",
    "description" : "String",
    "gmtCreate" : Long,
    "gmtModified" : Long,
    "type" : Long,
    "icon" : "String",
    "identifier" : "String",
    "modifier" : "String",
    "name" : "String",
    "nameEn" : "String",
    "resourceCategory" : "String",
    "copyFrom" : "String",
    "resourceType" : "String",
    "spaceIdentifier" : "String",
    "spaceType" : "String"
  } ]
}

响应参数

表 3. 响应Body参数
参数名称 类型 示例 说明
requestId String ASSDS-ASSASX-XSAXSA-XSAXSAXS

请求id,每次请求都是唯一值,便于后续排查问题

errorMsg String error

错误信息

errorCode String Openapi.RequestError

错误码

success Boolean true

true或者false

templates Array of template

项目模板信息

creator String 19xx7043xxxxxxx914

创建人的阿里云accountId

description String 迭代的具体信息

描述信息

gmtCreate Long 1623916393000

创建时间的时间戳,单位毫秒

gmtModified Long 1623916393000

修改时间的时间戳,单位毫秒

type Long 4

模板类型

0-system

4-custom

16-instance

icon String https://img.xxxx.png

模板封面

identifier String e8bxxxxxxxxxxxxxxxx23

模板唯一标识符

modifier String 19xx7043xxxxxxx914

修改人的阿里云accountId

name String 专用模板

模板名称

nameEn String Test Template

模板英文名称

resourceCategory String Project

所属资源类型

copyFrom String null

废弃字段

resourceType String null

废弃字段

spaceIdentifier String null

废弃字段

spaceType String null

废弃字段

示例1

GET /organization/5ebbc0228123212b59xxxxx/projects/listTemplates?category=例:Project HTTP/1.1
Host:devops.aliyuncs.com
Content-Type:application/json

正常返回示例

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "requestId" : "10492C3C-2D3A-1AD7-9D7E-4E6E87...",
  "success" : true,
  "templates" : [ {
    "identifier" : "d4cb9e77c0ca8f4e310f...",
    "creator" : "AK-ADMIN",
    "gmtModified" : 1641782004000,
    "modifier" : "AK-ADMIN",
    "icon" : "https://img.alicdn.com/imgextra/i3/O1CN01oQzkhj1ydJ73kJxT5_!!6000000006601-2-tps-640-320.png",
    "name" : "敏捷研发项目管理空间",
    "description" : "支持如Scrum、Kanban等经典的敏捷研发场景,涵盖从需求管理、迭代规划、任务协作及迭代复盘,助力企业持续、快速、高效地交付产品需求,实现业务目标。",
    "gmtCreate" : 1620428400000,
    "type" : 0,
    "resourceCategory" : "Project"
  }, {
    "identifier" : "8036c3cff3fede478be...",
    "creator" : "AK-ADMIN",
    "gmtModified" : 1641782004000,
    "modifier" : "AK-ADMIN",
    "icon" : "https://img.alicdn.com/imgextra/i1/O1CN01I1REUL23dNFPTUyXC_!!6000000007278-2-tps-640-320.png",
    "name" : "经典项目管理空间",
    "description" : "支持计划型项目管理场景,通过WBS任务拆解、里程碑规划、及任务甘特图、风险管理等能力,对项目执行过程进行有效跟踪管理,达成项目计划目标。",
    "gmtCreate" : 1620428820000,
    "type" : 0,
    "resourceCategory" : "Project"
  }, {
    "identifier" : "77bf1753149f3b62d799...",
    "creator" : "AK-ADMIN",
    "gmtModified" : 1641782004000,
    "modifier" : "AK-ADMIN",
    "icon" : "https://img.alicdn.com/imgextra/i4/O1CN01UNJoc21MAUnW9wgTz_!!6000000001394-2-tps-640-320.png",
    "name" : "缺陷管理空间",
    "description" : "提供规范的缺陷记录、跟踪和灵活的流程定制功能,有效管理缺陷修复过程。结合全面的质量分析报表,帮助您有效管理研发质量。",
    "gmtCreate" : 1620428827000,
    "type" : 0,
    "resourceCategory" : "Project"
  } ],
  "errorCode" : "",
  "errorMsg" : ""
}

错误码

HttpCode 错误码 错误信息 描述
400 Openapi.RequestError request error OpenAPI请求数据错误
403 Operate.NoPermission NoPermission 没有权限

访问错误中心查看更多错误码。

开发者资源

  • SDK

    阿里云为您提供多种语言的SDK,帮助您快速通过API集成阿里云的产品和服务,推荐您使用SDK调用API,已免除您手动签名验证。

  • OpenAPI Explorer

    快速检索,可视化调试API,在线命令行工具,同步动态生成可执行的SDK代码示例。

  • 阿里云CLI

    阿里云资产管理和配置工具,可通过命令方式同时管理多个阿里云产品和服务,简单快捷,是您上云好帮手。