Install apps from the app store

Basic Information

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

请求路径

  1. POST /openapi/v1/teams/{team_id}/regions/{region_name}/apps/{app_id}/install

Body 请求体示例

  1. {
  2. "market_url": "https://hub.grapps.cn",
  3. "market_domain": "rainbond",
  4. "market_type": "rainstore",
  5. "market_access_key": "123456789012340af5dff63cb740788e",
  6. "app_model_id": "string",
  7. "app_model_version": "string"
  8. }

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

响应示例

  1. {
  2. "enterprise_id": "string",
  3. "team_id": "string",
  4. "note": "string",
  5. "ID": 3,
  6. "region_name": "string",
  7. "service_list": [
  8. {
  9. "status": "",
  10. "access_infos": [
  11. "string"
  12. ],
  13. "service_id": "string",
  14. "tenant_id": "string",
  15. "service_key": "string",
  16. "service_alias": "string",
  17. "service_cname": "string",
  18. "service_region": "string",
  19. "desc": "string",
  20. "category": "string",
  21. "version": "string",
  22. "update_version": 3,
  23. "image": "string",
  24. "cmd": "string",
  25. "min_node": 3,
  26. "min_cpu": 3,
  27. "container_gpu": 3,
  28. "min_memory": 3,
  29. "extend_method": "string",
  30. "code_from": "string",
  31. "git_url": "string",
  32. "git_project_id": 3,
  33. "code_version": "string",
  34. "service_type": "string",
  35. "creater": 3,
  36. "language": "string",
  37. "total_memory": 3,
  38. "is_service": true,
  39. "service_origin": "string",
  40. " tenant_service_group_id": 3,
  41. "open_webhooks": true,
  42. "service_source": "string",
  43. "create_status": "string",
  44. "check_uuid": "string" ,
  45. "check_event_id": "string",
  46. "docker_cmd": "string",
  47. "server_type": "string",
  48. "is_upgrate": true,
  49. "build_upgrade": true,
  50. "oauth_service_id": 3,
  51. "k8s_component_name": "string"
  52. }
  53. ]
  54. }

Model

Install

  1. {
  2. "market_url": "string",
  3. "market_domain": "string",
  4. "market_type": "string",
  5. "market_access_key": "string",
  6. "app_model_id": "string",
  7. "app_model_version" : "string"
  8. }

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

  1. {
  2. "enterprise_id": "string",
  3. "team_id": "string",
  4. "note": "string",
  5. "ID": 0,
  6. "region_name": "string",
  7. "service_list": [
  8. {
  9. "status": "",
  10. "access_infos": [],
  11. "service_id": "string",
  12. "tenant_id": "string",
  13. "service_key": "string",
  14. "service_alias": "string",
  15. "service_cname": "string",
  16. "service_region": "string",
  17. "desc": "string",
  18. "category": "string",
  19. "version": "string",
  20. "update_version": -2147483648,
  21. "image": "string",
  22. "cmd": "string",
  23. "min_node": -2147483648,
  24. "min_cpu": -2147483648,
  25. "container_gpu": -2147483648,
  26. "min_memory": -2147483648,
  27. "extend_method": "string",
  28. "code_from": "string",
  29. "git_url": "string",
  30. "git_project_id": -2147483648,
  31. "code_version": "string" ,
  32. "service_type": "string",
  33. "creater": -2147483648,
  34. "language": "string",
  35. "total_memory": -2147483648,
  36. "is_service": true,
  37. "service_origin": "string" ,
  38. "tenant_service_group_id": -2147483648,
  39. "open_webhooks": true,
  40. "service_ source": "string",
  41. "create_status": "string",
  42. "check_uuid": "string",
  43. "check_event_id": "string",
  44. "docker_cmd": "string",
  45. "server_type": "strin ",
  46. "is_upgrate": true,
  47. "build_upgrade": true,
  48. "oauth_service_id": -2147483648,
  49. "k8s_component_name": "string"
  50. }
  51. ]
  52. }

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

  1. {
  2. "status": "",
  3. "access_infos": [],
  4. "service_id": "string",
  5. "tenant_id": "string",
  6. "service_key": "string",
  7. "service_alias": " string",
  8. "service_cname": "string",
  9. "service_region": "string",
  10. "desc": "string",
  11. "category": "string",
  12. "version": "string",
  13. " update_version": -2147483648,
  14. "image": "string",
  15. "cmd": "string",
  16. "min_node": -2147483648,
  17. "min_cpu": -2147483648,
  18. "container_gpu": -2147483648,
  19. " min_memory": -2147483648,
  20. "extend_method": "string",
  21. "code_from": "string",
  22. "git_url": "string",
  23. "git_project_id": -2147483648,
  24. "code_version": "string",
  25. "service_type": "string",
  26. "creater": -2147483648,
  27. "language": "string",
  28. "total_memory": -2147483648,
  29. "is_service": true,
  30. "service_origin": "string",
  31. "tenant_service_group_id": -2147483648,
  32. "open_webhooks": true,
  33. "service_source": "string",
  34. "create_status": "string",
  35. "check_uuid": "string",
  36. "check_event_id": "string" ,
  37. "docker_cmd": "string",
  38. "ser ver_type": "strin",
  39. "is_upgrate": true,
  40. "build_upgrade": true,
  41. "oauth_service_id": -2147483648,
  42. "k8s_component_name": "string"
  43. }

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