文档

CreateProject - 创建项目

可以创建项目。

调试

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

授权信息

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

请求语法

POST /organization/{organizationId}/projects/createProject

请求参数

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

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

5ebbc0228123212b59xxxxx
bodyobject

请求 Body

templateIdentifierstring

项目模板 id,可以从前端的项目模板列表页获取,前端接口: https:// devops.aliyun.com/projex/api/workspace/template/setting/corp/listSpaceTemplatesForCreate?category=Project&_input_charset=utf-8。 取值 identifier: "704eaxxxx5efede61xxx5",

704eaxxxx5efede61xxx5
namestring

项目名称

name
scopestring

公开:public 私有:private

public
customCodestring

项目编号,四到六位大写字母,企业下唯一

ABCD

返回参数

名称类型描述示例值
object
requestIdstring

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

ASSDS-ASSASX-XSAXSA-XSAXSAXS
errorMsgstring

错误信息

error
errorCodestring

错误码

Openapi.RequestError
successboolean

true 或者 false

true
projectobject

项目信息

categoryIdentifierstring

空间大类 id,这里为 Project

Project
creatorstring

创建人的阿里云 accountID

19xx7043xxxxxxx914
customCodestring

项目编号,四到六位大写字母,企业下唯一

OJAY
descriptionstring

描述信息

该项目用来跟进测试需求。
gmtCreatelong

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

1623916393000
gmtModifiedlong

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

1623916393000
iconstring

图标

https://xxxxxx.png
identifierstring

项目唯一标识符

e8bxxxxxxxxxxxxxxxx23
logicalStatusstring

项目状态

NORMAL
modifierstring

修改人的阿里云 accoutID

19xx7043xxxxxxx914
namestring

项目名称

demo示例项目
organizationIdentifierstring

企业 id

5e70xxxxxxcd000xxxxe96
scopestring

可见范围

public
statusIdentifierstring

状态 id

8a40xxxxxxxxxxxxx64
statusStageIdentifierstring

状态阶段

1
typeIdentifierstring

空间小类 id

CustomProject

示例

正常返回示例

JSON格式

{
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "errorMsg": "error",
  "errorCode": "Openapi.RequestError",
  "success": true,
  "project": {
    "categoryIdentifier": "Project",
    "creator": "19xx7043xxxxxxx914",
    "customCode": "OJAY",
    "description": "该项目用来跟进测试需求。",
    "gmtCreate": 1623916393000,
    "gmtModified": 1623916393000,
    "icon": "https://xxxxxx.png",
    "identifier": "e8bxxxxxxxxxxxxxxxx23",
    "logicalStatus": "NORMAL",
    "modifier": "19xx7043xxxxxxx914",
    "name": "demo示例项目",
    "organizationIdentifier": "5e70xxxxxxcd000xxxxe96",
    "scope": "public",
    "statusIdentifier": "8a40xxxxxxxxxxxxx64",
    "statusStageIdentifier": "1",
    "typeIdentifier": "CustomProject"
  }
}

错误码

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

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

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