调用createApplication接口在项目下创建通用类型应用
接口URL:/v1/app/createApplication
Content-Type:application/json
请求方式:post
请求体参数说明:
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
codeReposAddress | String | String | 是 | 仓库名称,名称长度不能超过100个字符,以http/https开头 |
connectionId | String | String | 是 | 服务连接ID,数据来源于获取指定类型服务连接列表,若列表无数据,请在MSAP控制台,根据自己所需的项目后,在系统管理->服务连接管理里创建 |
description | String | String | 否 | 应用描述,数据长度不能超过500个字符 |
name | String | String | 是 | 应用名称,名称长度为3~30个字符,开头为小写字母,后可为大小写字母以及数字 |
origin | String | String | 是 | 代码仓库来源,可填参数GITEE/GITHUB |
projectId | String | String | 是 | 项目ID,数据来源于分页查询项目列表 |
category | String | String | 是 | 应用分类,可选类型:通用类型(“GENERAL_APP”)、其他(“OTHER”) |
type | String | String | 是 | 应用类型,可选:源码(“EXTERNAL_CODE”)、制品(“PACKAGE”)、镜像(“IMAGE”) |
请求示例:
{"codeReposAddress":"https://github.com/xxx","connectionId":"29b25b16-0b71-48ae-8e82-3746a052b98d","description":"测试仓库地址","name":"测试应用","origin":"test","projectId":"29b25b16-0b71-48ae-8e82-3746a052avdes "}
参数名 | 示例值 | 参数类型 | 参数描述 |
---|---|---|---|
statusCode | Integer | Integer | 响应编码 2000 success |
message | String | String | 消息内容 |
returnObj | Object | Object | 返回数据 |
error | String | String | 调用错误时返回的错误编码 |
返回示例:成功
{"statusCode":2000,"message":"成功","returnObj":{"appId":"29b25b16-0b71-48ae-8e82-3746a052b98d"}}
返回示例:失败
{"statusCode":190400,"error":"MSAP_400","message":"服务连接ID不能为空. "}