文档

ListProjectTemplates - 获取项目模板列表

获取项目模板列表。

调试

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

授权信息

当前API暂无授权信息透出。

请求语法

GET /organization/{organizationId}/projects/listTemplates

请求参数

名称类型必填描述示例值
organizationIdstring

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

5ebbc0228123212b59xxxxx
categorystring

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

Project

返回参数

名称类型描述示例值
object
requestIdstring

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

ASSDS-ASSASX-XSAXSA-XSAXSAXS
errorMsgstring

错误信息

error
errorCodestring

错误码

Openapi.RequestError
successboolean

true 或者 false

true
templatesobject []

项目模板信息

creatorstring

创建人的阿里云 accountId

19xx7043xxxxxxx914
descriptionstring

描述信息

迭代的具体信息
gmtCreatelong

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

1623916393000
gmtModifiedlong

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

1623916393000
typelong

模板类型 0-system 4-custom 16-instance

4
iconstring

模板封面

https://img.xxxx.png
identifierstring

模板唯一标识符

e8bxxxxxxxxxxxxxxxx23
modifierstring

修改人的阿里云 accountId

19xx7043xxxxxxx914
namestring

模板名称

专用模板
nameEnstring

模板英文名称

Test Template
resourceCategorystring

所属资源类型

Project
copyFromstring

废弃字段

null
resourceTypestring

废弃字段

null
spaceIdentifierstring

废弃字段

null
spaceTypestring

废弃字段

null

示例

正常返回示例

JSON格式

{
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "errorMsg": "error",
  "errorCode": "Openapi.RequestError",
  "success": true,
  "templates": [
    {
      "creator": "19xx7043xxxxxxx914",
      "description": "迭代的具体信息",
      "gmtCreate": 1623916393000,
      "gmtModified": 1623916393000,
      "type": 4,
      "icon": "https://img.xxxx.png",
      "identifier": "e8bxxxxxxxxxxxxxxxx23",
      "modifier": "19xx7043xxxxxxx914",
      "name": "专用模板",
      "nameEn": "Test Template",
      "resourceCategory": "Project",
      "copyFrom": "null",
      "resourceType": "null",
      "spaceIdentifier": "null",
      "spaceType": "null"
    }
  ]
}

错误码

HTTP status code错误码错误信息描述
400Openapi.RequestErrorrequest errorOpenAPI请求数据错误
403Operate.NoPermissionNoPermission没有权限

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

  • 本页导读 (0)
文档反馈