Skip to main content

Install apps from the app store

Basic Information

This interface is mainly used to install applications from the application store

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

market_type default value pass rainstore

request parameters

nameLocationtyperequiredChinese nameillustrate
app_idpathintegerYesapplication group id
team_idpathstringYesnone
region_namepathstringYesnone
is_deployquerystringnowhether to build
bodybodyInstallnonone

return result

status codeStatus code meaningillustratedata model
200OKsuccessMarketInstall

return data structure

响应示例
{
"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"
}
]
}

Model

Install

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

Attributes

nametyperequiredconstraintChinese nameillustrate
market_urlstringtruenoneMarket urlApp store routing
market_domainstringtruenoneMarket domainapp store domain
market_typestringtruenoneMarket typeApp store type
market_access_keystringtruenoneMarket access keyapp store token
app_model_idstringtruenoneApp model idapp id
app_model_versionstringtruenoneApp model versionApp 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"
}
]
}

Attributes

nametyperequiredconstraintChinese nameillustrate
enterprise_idstringtruenoneEnterprise idEnterprise ID (Federated Cloud ID)
team_idstringtruenoneteam idteam id
notestringtruenoneNoteRemark
IDintegertruenoneIdapp id
region_namestringtruenoneRegion namedata center 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",
"ser ver_type": "strin",
"is_upgrate": true,
"build_upgrade": true,
"oauth_service_id": -2147483648,
"k8s_component_name": "string"
}

Attributes

nametyperequiredconstraintChinese nameillustrate
statusstringfalsenoneStatuscomponent status
access_infos[string]falsenonecomponent access address
service_idstringtruenoneService idcomponent id
tenant_idstringtruenoneTenant idtenant id
service_keystringtruenoneService keycomponent key
service_aliasstringtruenoneService aliascomponent alias
service_cnamestringfalsenoneService cnamecomponent name
service_regionstringtruenoneService regionThe area to which the component belongs
descstring¦nullfalsenoneDescdescribe
categorystringtruenoneCategoryComponent classification:application, cache, store
versionstringtruenoneVersionVersion
update_versionintegerfalsenoneUpdate versionInternal Releases
imagestringtruenoneImagemirror
cmdstring¦nullfalsenoneCmdstartup parameters
min_nodeintegerfalsenoneMin nodenumber of instances
min_cpuintegerfalsenoneMin cpuCPU allocation 1000=1core
container_gpuintegerfalsenoneContainer GPUsAmount of GPU memory
min_memoryintegerfalsenoneMin memoryMemory size unit (M)
extend_methodstringfalsenoneExtend methodComponent deployment type, stateless or state
code_fromstring¦nullfalsenoneCode fromCode source: gitlab, github
git_urlstring¦nullfalsenoneGit urlcode code repository
git_project_idintegerfalsenoneGit project idProject id in gitlab
code_versionstring¦nullfalsenoneCode versioncode version
service_typestring¦nullfalsenoneService typeComponent type: web, mysql, redis, mongodb, phpadmin
creatorintegerfalsenoneCreatercomponent creator
languagestring¦nullfalsenoneLanguagecode language
total_memoryintegerfalsenoneTotal memoryMemory usage M
is_servicebooleanfalsenoneIs serviceWhether the inner component
service_originstringfalsenoneService originComponent creation type cloud cloud city component, assistant cloud help component
tenant_service_group_idintegerfalsenoneTenant service group idThe component group id to which the component belongs. For components installed from the application template, this field needs to be assigned a value
open_webhooksbooleanfalsenoneOpen webhooksWhether to enable the automatic trigger deployment function (compatible with older version components)
service_sourcestring¦nullfalsenoneService sourceComponent sources (source_code, market, docker_run, docker_compose)
create_statusstring¦nullfalsenoneCreate statusComponent creation state creating
check_uuidstring¦nullfalsenoneCheck uuidComponent detection ID
check_event_idstring¦nullfalsenoneCheck event idComponent detection event ID
docker_cmdstring¦nullfalsenoneDocker-cmdImage creation command
server_typestringfalsenoneServer typeSource repository type
is_upgratebooleanfalsenoneIs upgradeIs it possible to update
build_upgradebooleanfalsenoneBuild upgradeWhether to upgrade components after building
oauth_service_idinteger¦nullfalsenoneOauth service idThe OAuth service id used to pull the source code
k8s_component_namestringtruenoneK8s component nameCluster component name