Skip to main content

Duplicate the app

Basic Information

This interface is mainly used for replication applications

请求路径
POST /openapi/v1/teams/{team_id}/regions/{region_name}/apps/{app_id}/copy
Body 请求体示例
{
"services": [
{
"service_id": "string"
}
],
"target_team_name": "string",
"target_region_name": "string",
"target_app_id": 3
}

Here target_team_name specifies the target team name, corresponding to tenant_name or team_name, the value is similar to o19p6wen, not user-defined team name

Here target_region_name specifies the target cluster name, corresponding to the data returned by the cluster list interface region_name

Here target_app_id specifies the target app name

request parameters

nameLocationtyperequiredChinese nameillustrate
team_idpathstringYesnone
region_namepathstringYesnone
app_idpathstringYesnone
bodybodyAppCopyCnonone

return result

status codeStatus code meaningillustratedata model
200OKsuccessAppCopyCRes

return data structure

响应示例
{
"services": [
{
"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,
"buil d_upgrade": true,
"oauth_service_id": 3,
"k8s_component_name": "string"
}
]
}

Model

AppPostInfo

{
"services": [
{
"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_c md": "string",
"server_type": "strin",
"is_upgrate": true,
"build_upgrade": true,
"oauth_service_id": -2147483648,
"k8s_component_name": "string"
}
]
}

Attributes

nametyperequiredconstraintChinese nameillustrate
services[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

AppCopyC

{
"services": [
{
"service_id": "string",
"change": "string"
}
],
"target_team_name": "string",
"target_region_name": "string",
"target_app_id": 0
}

Attributes

nametyperequiredconstraintChinese nameillustrate
services[AppCopyModify]truenonenone
target_team_namestringtruenoneTarget team nameTeam Name
target_region_namestringtruenoneTarget region namedata center name
target_app_idintegertruenoneTarget app idapp id

AppCopyCRes

{
"services": [
{
"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_c md": "string",
"server_type": "strin",
"is_upgrate": true,
"build_upgrade": true,
"oauth_service_id": -2147483648,
"k8s_component_name": "string"
}
]
}

Attributes

nametyperequiredconstraintChinese nameillustrate
services[ServiceBaseInfo]truenonenone

AppCopyModify

{
"service_id": "string",
"change": "string"
}

Attributes

nametyperequiredconstraintChinese nameillustrate
service_idstringtruenoneService idcomponent ID
changestringfalseread-onlyChangenone