跳到主要内容
版本:V6.0

从应用商店安装应用

基本信息

该接口主要用于从应用商店安装应用

请求路径
POST /openapi/v1/teams/{team_id}/regions/{region_name}/apps/{app_id}/install
Body 请求体示例
{
"market_url": "https://hub.grapps.cn",
"market_domain": "rainbond",
"market_type": "rainstore",
"market_access_key": "123456789012340af5dff63cb740788e",
"app_model_id": "string",
"app_model_version": "string"
}

market_type 默认值传 rainstore

请求参数

名称位置类型必选中文名说明
app_idpathinteger应用组id
team_idpathstringnone
region_namepathstringnone
is_deployquerystring是否构建
bodybodyInstallnone

返回结果

状态码状态码含义说明数据模型
200OK成功MarketInstall

返回数据结构

响应示例
{
"enterprise_id": "string",
"team_id": "string",
"note": "string",
"ID": 3,
"region_name": "string",
"service_list": [
{
"status": "",
"access_infos": [
"string"
],
"service_id": "string",
"tenant_id": "string",
"service_key": "string",
"service_alias": "string",
"service_cname": "string",
"service_region": "string",
"desc": "string",
"category": "string",
"version": "string",
"update_version": 3,
"image": "string",
"cmd": "string",
"min_node": 3,
"min_cpu": 3,
"container_gpu": 3,
"min_memory": 3,
"extend_method": "string",
"code_from": "string",
"git_url": "string",
"git_project_id": 3,
"code_version": "string",
"service_type": "string",
"creater": 3,
"language": "string",
"total_memory": 3,
"is_service": true,
"service_origin": "string",
"tenant_service_group_id": 3,
"open_webhooks": true,
"service_source": "string",
"create_status": "string",
"check_uuid": "string",
"check_event_id": "string",
"docker_cmd": "string",
"server_type": "string",
"is_upgrate": true,
"build_upgrade": true,
"oauth_service_id": 3,
"k8s_component_name": "string"
}
]
}

模型

Install

{
"market_url": "string",
"market_domain": "string",
"market_type": "string",
"market_access_key": "string",
"app_model_id": "string",
"app_model_version": "string"
}

属性

名称类型必选约束中文名说明
market_urlstringtruenoneMarket url应用商店路由
market_domainstringtruenoneMarket domain应用商店domain
market_typestringtruenoneMarket type应用商店类型
market_access_keystringtruenoneMarket access key应用商店令牌
app_model_idstringtruenoneApp model id应用id
app_model_versionstringtruenoneApp model version应用版本

MarketInstall

{
"enterprise_id": "string",
"team_id": "string",
"note": "string",
"ID": 0,
"region_name": "string",
"service_list": [
{
"status": "",
"access_infos": [],
"service_id": "string",
"tenant_id": "string",
"service_key": "string",
"service_alias": "string",
"service_cname": "string",
"service_region": "string",
"desc": "string",
"category": "string",
"version": "string",
"update_version": -2147483648,
"image": "string",
"cmd": "string",
"min_node": -2147483648,
"min_cpu": -2147483648,
"container_gpu": -2147483648,
"min_memory": -2147483648,
"extend_method": "string",
"code_from": "string",
"git_url": "string",
"git_project_id": -2147483648,
"code_version": "string",
"service_type": "string",
"creater": -2147483648,
"language": "string",
"total_memory": -2147483648,
"is_service": true,
"service_origin": "string",
"tenant_service_group_id": -2147483648,
"open_webhooks": true,
"service_source": "string",
"create_status": "string",
"check_uuid": "string",
"check_event_id": "string",
"docker_cmd": "string",
"server_type": "strin",
"is_upgrate": true,
"build_upgrade": true,
"oauth_service_id": -2147483648,
"k8s_component_name": "string"
}
]
}

属性

名称类型必选约束中文名说明
enterprise_idstringtruenoneEnterprise id企业ID(联合云ID)
team_idstringtruenoneTeam id团队id
notestringtruenoneNote备注
IDintegertruenoneId应用id
region_namestringtruenoneRegion name数据中心名
service_list[ServiceBaseInfo]truenonenone

ServiceBaseInfo

{
"status": "",
"access_infos": [],
"service_id": "string",
"tenant_id": "string",
"service_key": "string",
"service_alias": "string",
"service_cname": "string",
"service_region": "string",
"desc": "string",
"category": "string",
"version": "string",
"update_version": -2147483648,
"image": "string",
"cmd": "string",
"min_node": -2147483648,
"min_cpu": -2147483648,
"container_gpu": -2147483648,
"min_memory": -2147483648,
"extend_method": "string",
"code_from": "string",
"git_url": "string",
"git_project_id": -2147483648,
"code_version": "string",
"service_type": "string",
"creater": -2147483648,
"language": "string",
"total_memory": -2147483648,
"is_service": true,
"service_origin": "string",
"tenant_service_group_id": -2147483648,
"open_webhooks": true,
"service_source": "string",
"create_status": "string",
"check_uuid": "string",
"check_event_id": "string",
"docker_cmd": "string",
"server_type": "strin",
"is_upgrate": true,
"build_upgrade": true,
"oauth_service_id": -2147483648,
"k8s_component_name": "string"
}

属性

名称类型必选约束中文名说明
statusstringfalsenoneStatus组件状态
access_infos[string]falsenone组件访问地址
service_idstringtruenoneService id组件id
tenant_idstringtruenoneTenant id租户id
service_keystringtruenoneService key组件key
service_aliasstringtruenoneService alias组件别名
service_cnamestringfalsenoneService cname组件名
service_regionstringtruenoneService region组件所属区
descstring¦nullfalsenoneDesc描述
categorystringtruenoneCategory组件分类:application,cache,store
versionstringtruenoneVersion版本
update_versionintegerfalsenoneUpdate version内部发布次数
imagestringtruenoneImage镜像
cmdstring¦nullfalsenoneCmd启动参数
min_nodeintegerfalsenoneMin node实例数量
min_cpuintegerfalsenoneMin cpucpu分配额 1000=1core
container_gpuintegerfalsenoneContainer gpugpu显存数量
min_memoryintegerfalsenoneMin memory内存大小单位(M)
extend_methodstringfalsenoneExtend method组件部署类型,stateless or state
code_fromstring¦nullfalsenoneCode from代码来源:gitlab,github
git_urlstring¦nullfalsenoneGit urlcode代码仓库
git_project_idintegerfalsenoneGit project idgitlab 中项目id
code_versionstring¦nullfalsenoneCode version代码版本
service_typestring¦nullfalsenoneService type组件类型:web,mysql,redis,mongodb,phpadmin
createrintegerfalsenoneCreater组件创建者
languagestring¦nullfalsenoneLanguage代码语言
total_memoryintegerfalsenoneTotal memory内存使用M
is_servicebooleanfalsenoneIs service是否inner组件
service_originstringfalsenoneService origin组件创建类型cloud云市组件,assistant云帮组件
tenant_service_group_idintegerfalsenoneTenant service group id组件归属的组件组id,从应用模版安装的组件该字段需要赋值
open_webhooksbooleanfalsenoneOpen webhooks是否开启自动触发部署功能(兼容老版本组件)
service_sourcestring¦nullfalsenoneService source组件来源(source_code, market, docker_run, docker_compose)
create_statusstring¦nullfalsenoneCreate status组件创建状态 creating
check_uuidstring¦nullfalsenoneCheck uuid组件检测ID
check_event_idstring¦nullfalsenoneCheck event id组件检测事件ID
docker_cmdstring¦nullfalsenoneDocker cmd镜像创建命令
server_typestringfalsenoneServer type源码仓库类型
is_upgratebooleanfalsenoneIs upgrate是否可以更新
build_upgradebooleanfalsenoneBuild upgrade组件构建后是否升级
oauth_service_idinteger¦nullfalsenoneOauth service id拉取源码所用的OAuth服务id
k8s_component_namestringtruenoneK8s component name集群组件名称