查询应用详情
更新时间 2026-08-19 15:14:14
最近更新时间: 2026-08-19 15:14:14
接口功能介绍
查询应用详情信息。
接口约束
无
URI
GET /v1/cae/application/query
路径参数 无
Query参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| appID | 否 | String | 应用ID | 09db72fa-xxxx-xxxx-a1d8-24a420181216 | |
| appName | 否 | String | 应用名称,和应用ID 二选一,使用时必须填入 namespaceID 或者 namespaceName | app-test | |
| namespaceID | 否 | String | 命名空间ID,和 namespaceName 二选一,配合appName使用 | 0b7b7988-xxxx-xxxx-af7d-244e82424221 |
请求参数
请求头header参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| regionId | 是 | String | 资源池 ID | bb9fdb42056xxxeda1610242ac1xxxxx | |
| locale | 否 | String | 指定客户端期望的响应语言偏好,默认语言为中文 | en英文,zh-CH中文 |
请求体body参数 无
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 业务状态码(800为成功,900为失败) | 800 | |
| message | String | 业务状态码为900时的错误信息 | success | |
| description | String | 业务状态码为900时的错误描述 | 成功 | |
| returnObj | Object | 业务数据 | returnObj |
表 returnObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| appDescription | String | 应用描述 | 测试应用 | |
| appID | String | 应用id | 09db72fa-xxxx-xxxx-a1d8-24a420181216 | |
| appName | String | 应用名称 | app1 | |
| appSource | String | 应用来源 | app_center_es | |
| appType | String | 应用类型 | deployment | |
| autoConfig | Boolean | 命名空间类型 | true | |
| baseAppID | String | 原始应用id | 09db72fa-xxxx-xxxx-a1d8-24a420181216 | |
| codeOssInfo | Object | 代码包信息 | CodeOssInfo | |
| command | String | 命令类型 | /bin/sh | |
| commandArgs | String | 命令内容 | -c start.sh | |
| configmapMountDesc | Array of Objects | 配置管理 | ConfigMapMountDescData | |
| cpu | Integer | cpu核数 | 500 | |
| cpuBurstEnable | Boolean | 是否开启cpu突发核数 | false | |
| createTime | Integer | 创建时间 | 1634544000000 | |
| customHostAlias | String | host配置 | 127.0.0.1 my-host | |
| envs | Array of Objects | 环境变量 | EnvData | |
| governanceEnable | Integer | 是否开启网格服务治理 | 1 | |
| headlessPvtzDiscoverySvc | Object | Headless Service 服务注册发现配置 | ServiceData | |
| imageConfig | Object | 镜像相关配置 | ImageConfig | |
| imagePullSecretId | String | 镜像拉取秘钥 | secret-xxxx | |
| imageType | String | 镜像类型 | custom | |
| imageUrl | String | 镜像地址 | nginx:latest | |
| instances | Integer | 实例数量 | 2 | |
| liveness | String | 应用监控live配置 | ||
| logConfig | String | 日志配置 | ||
| logEnable | Integer | 是否开启日志 | 1 | |
| memory | Integer | 内存大小 | 1024 | |
| minReadyInstance | Integer | 最小就绪实例数量 | 1 | |
| minReadyInstanceRatio | Integer | 最小就绪实例比例 | 1 | |
| mseEnable | Integer | 是否开启mse | 1 | |
| nacosConfig | Object | nacos配置 | NacosConfig | |
| namespaceID | String | 命名空间id | 0b7b7988-xxxx-xxxx-af7d-244e82424221 | |
| packageType | String | 代码包类型 | jar | |
| packageVersion | String | 代码包版本 | 1.0.0 | |
| postStartCommand | String | PostStart命令类型 | /bin/sh | |
| postStartCommandArgs | String | PostStart命令内容 | -c start.sh | |
| preStopCommand | String | preStop命令类型 | /bin/sh | |
| preStopCommandArgs | String | preStop命令内容 | -c stop.sh | |
| programmingLanguage | String | 编程语言类型 | java | |
| pvtzDiscoverySvc | Object | 服务注册发现配置 | ServiceData | |
| readiness | String | 应用健康ready配置 | ||
| regionID | String | 区域id | cn-east-3 | |
| replicas | Integer | 实例数量 | 2 | |
| runningInstances | Integer | 运行实例数 | 2 | |
| runtimeKey | String | 运行时key | java8 | |
| runtimeType | Integer | 运行时类型 | 1 | |
| secretMountDesc | Array of Objects | 保密字典配置 | SecretMountDescData | |
| securityGroupID | String | 安全组id | sg-xxxx | |
| serviceEnable | Boolean | 是否开启k8s service | true | |
| serviceTags | String | 灰度标签 | gray-tag | |
| sfsConfig | Array of Objects | sfs配置 | SfsConfig | |
| sidecarContainersConfig | Array of Objects | sidecar容器配置 | SidecarContainersConfigDesc | |
| startupProbe | String | 应用健康startupProbe配置 | ||
| status | String | Running:运行中 Stopped:已停止 Executing:执行中 Stopping: 停止中 Starting: 启动中 | Running | |
| subnetID | String | 子网id | subnet-xxxx | |
| tempStorage | Integer | 临时存储配置 | 20 | |
| terminationGracePeriodSeconds | Integer | 应用关闭前等待时间 | 30 | |
| updateStrategy | Object | 更新策略 | AppUpdateStrategy | |
| updateTime | Integer | 更新时间 | 1634544300000 | |
| vpcID | String | vpcid | vpc-tsge****asd | |
| zosConfig | Array of Objects | zos配置 | ZosConfig | |
| requestID | String | 请求ID | 5fd3e6f7-9229-4fb4-a352-0f91bfd638b1 |
表 CodeOssInfo
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| codeUrl | String | 后台通过 oss 接口获取 | https://oss.example.com/apps/app-1.0.0.jar | |
| codeZipFileName | String | 代码包名称 | app-1.0.0.jar | |
| ossBucketName | String | 代码上传的oss bucket名 | cae-bucket | |
| ossObjectName | String | 代码上传的oss object名 | apps/app-1.0.0.jar | |
| zipFile | String | 函数代码 ZIP 包的 Base 64 编码(与 OSS 对象信息二选一,OSS 优先) |
表 ConfigMapMountDescData
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| configmapID | String | 配置管理id | 09db72fa-xxxx-xxxx-a1d8-24a420181216 | |
| configmapName | String | 配置管理名称 | my-config | |
| key | String | 配置项key | config-key | |
| mountPath | String | 挂载路径 | /mnt/config |
表 EnvData
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| name | String | 环境变量名称 | APP_ENV | |
| value | String | 环境变量值 | production | |
| valueFrom | Object | 环境变量来源 | EnvVarSource |
表 EnvVarSource
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| configmapRef | Object | 配置管理引用 | ConfigMapRefSourceData | |
| secretRef | Object | 保密字典引用 | SecretRefSourceData |
表 ConfigMapRefSourceData
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| configmapID | String | 配置管理id | 09db72fa-xxxx-xxxx-a1d8-24a420181216 | |
| configmapName | String | 配置管理名称 | my-config | |
| key | String | 配置项key | config-key |
表 SecretRefSourceData
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| key | String | 保密字典key | secret-key | |
| secretID | String | 保密字典id | 09db72fa-xxxx-xxxx-a1d8-24a420181216 | |
| secretName | String | 保密字典名称 | my-secret |
表 ServiceData
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| enable | Boolean | 是否开启服务 | true | |
| hosts | Array of Strings | 主机列表 | ["app.example.com"] | |
| portProtocols | Array of Objects | 端口协议 | PortProtocol | |
| serviceName | String | 服务名称 | my-service |
表 PortProtocol
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| port | Integer | 端口 | 80 | |
| protocol | String | 协议 | TCP | |
| targetPort | Integer | 目标端口 | 8080 |
表 ImageConfig
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| instanceId | String | crs实例id | crs-instance-xxxx | |
| repositoryId | String | crs仓库id | repo-xxxx | |
| repositoryName | String | crs仓库名称` | my-repo |
表 NacosConfig
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| enable | Boolean | 是否启用 | true | |
| type | Integer | 类型: 1: 内置nacos, 2: mse, 3: 自定义 | 1 |
表 SecretMountDescData
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| key | String | 保密字典key | secret-key | |
| mountPath | String | 挂载路径 | /mnt/secret | |
| secretID | String | 保密字典id | 09db72fa-xxxx-xxxx-a1d8-24a420181216 | |
| secretName | String | 保密字典名称 | my-secret |
表 SfsConfig
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| localMountPath | String | 挂载本地目录 | /tmp/sfs | |
| remoteSfsPath | String | 远程sfs路径 | /data | |
| sfsId | String | sfs id | sfs-123456 | |
| sfsName | String | sfs名称 | my-sfs | |
| sharePath | String | 共享路径 | 192.168.1.1:/share |
表 SidecarContainersConfigDesc
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| command | String | 命令类型 | /bin/sh | |
| commandArgs | String | 命令内容 | -c start.sh | |
| configmapMountDesc | Array of Objects | 配置管理 | ConfigMapMountDescData | |
| cpu | Integer | cpu核数 | 2 | |
| emptyDirDesc | Array of Objects | 空目录配置 | EmptyDirConfig | |
| envs | Array of Objects | 环境变量 | EnvData | |
| imageUrl | String | 镜像地址 | nginx:latest | |
| memory | Integer | 内存大小 | 2048 | |
| name | String | sidecar容器名称 | my-sidecar | |
| postStartCommand | String | PostStart命令类型 | ||
| postStartCommandArgs | String | PostStart命令内容 | ||
| preStopCommand | String | preStop命令类型 | ||
| preStopCommandArgs | String | preStop命令内容 | ||
| sfsConfig | Array of Objects | sfs配置 | SfsConfig | |
| zosConfig | Array of Objects | zos配置 | ZosConfig |
表 EmptyDirConfig
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| mountPath | String | 挂载路径 | /mnt/empty-dir | |
| name | String | 空目录名称 | my-empty-dir |
表 ZosConfig
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| accessUrl | String | oss 访问地址 | https://zos.example.com/bucket | |
| bucketID | String | bucketID | zos-123455 | |
| bucketName | String | bucket名 | my-zos | |
| bucketPath | String | bucket子目录 | /tmp/sfs | |
| mountDir | String | 挂载本地目录 | /local/sfs | |
| readOnly | Boolean | 是否只读,默认false | true |
表 AppUpdateStrategy
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| batchUpdate | Object | 分批发布配置 | BatchUpdateConfig | |
| grayUpdate | Object | 灰度发布配置 | GrayUpdateConfig | |
| type | String | 部署类型(分批发布) | RollingUpdate |
表 BatchUpdateConfig
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| batchCount | Integer | 分批数量 | 2 | |
| batchWaitTime | Integer | 自动分批间隔时间 | 5 | |
| releaseType | String | 分批方式(手动/自动) | auto |
表 GrayUpdateConfig
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| enableGreyRule | Boolean | 是否启用灰度规则 | false | |
| grayNum | Integer | 灰度实例数量 | 1 |
枚举参数
无
请求示例
请求url
GET /v1/cae/application/query
请求头header
regionId:20000000***1852
请求体body
无
响应示例
{
"statusCode": 800,
"message": "success",
"description": "成功",
"returnObj": {
"appDescription": "测试应用",
"appID": "09db72fa-xxxx-xxxx-a1d8-24a420181216",
"appName": "app1",
"appSource": "app_center_es",
"appType": "deployment",
"autoConfig": true,
"baseAppID": "09db72fa-xxxx-xxxx-a1d8-24a420181216",
"codeOssInfo": {
"codeUrl": "https://oss.example.com/apps/app-1.0.0.jar",
"codeZipFileName": "app-1.0.0.jar",
"ossBucketName": "cae-bucket",
"ossObjectName": "apps/app-1.0.0.jar",
"zipFile": ""
},
"command": "/bin/sh",
"commandArgs": "-c start.sh",
"configmapMountDesc": [
{
"configmapID": "09db72fa-xxxx-xxxx-a1d8-24a420181216",
"configmapName": "my-config",
"key": "config-key",
"mountPath": "/mnt/config"
}
],
"cpu": 500,
"cpuBurstEnable": false,
"createTime": 1634544000000,
"customHostAlias": "127.0.0.1 my-host",
"envs": [
{
"name": "APP_ENV",
"value": "production",
"valueFrom": {
"configmapRef": {
"configmapID": "09db72fa-xxxx-xxxx-a1d8-24a420181216",
"configmapName": "my-config",
"key": "config-key"
},
"secretRef": {
"key": "secret-key",
"secretID": "09db72fa-xxxx-xxxx-a1d8-24a420181216",
"secretName": "my-secret"
}
}
}
],
"governanceEnable": 1,
"headlessPvtzDiscoverySvc": {
"enable": true,
"hosts": [
"[\"app.example.com\"]"
],
"portProtocols": [
{
"port": 80,
"protocol": "TCP",
"targetPort": 8080
}
],
"serviceName": "my-service"
},
"imageConfig": {
"instanceId": "crs-instance-xxxx",
"repositoryId": "repo-xxxx",
"repositoryName": "my-repo"
},
"imagePullSecretId": "secret-xxxx",
"imageType": "custom",
"imageUrl": "nginx:latest",
"instances": 2,
"liveness": "",
"logConfig": "",
"logEnable": 1,
"memory": 1024,
"minReadyInstance": 1,
"minReadyInstanceRatio": 1,
"mseEnable": 1,
"nacosConfig": {
"enable": true,
"type": 1
},
"namespaceID": "0b7b7988-xxxx-xxxx-af7d-244e82424221",
"packageType": "jar",
"packageVersion": "1.0.0",
"postStartCommand": "/bin/sh",
"postStartCommandArgs": "-c start.sh",
"preStopCommand": "/bin/sh",
"preStopCommandArgs": "-c stop.sh",
"programmingLanguage": "java",
"pvtzDiscoverySvc": null,
"readiness": "",
"regionID": "cn-east-3",
"replicas": 2,
"runningInstances": 2,
"runtimeKey": "java8",
"runtimeType": {},
"secretMountDesc": [
{
"key": "secret-key",
"mountPath": "/mnt/secret",
"secretID": "09db72fa-xxxx-xxxx-a1d8-24a420181216",
"secretName": "my-secret"
}
],
"securityGroupID": "sg-xxxx",
"serviceEnable": true,
"serviceTags": "gray-tag",
"sfsConfig": [
{
"localMountPath": "/tmp/sfs",
"remoteSfsPath": "/data",
"sfsId": "sfs-123456",
"sfsName": "my-sfs",
"sharePath": "192.168.1.1:/share"
}
],
"sidecarContainersConfig": [
{
"command": "/bin/sh",
"commandArgs": "-c start.sh",
"configmapMountDesc": null,
"cpu": 2,
"emptyDirDesc": [
{
"mountPath": "/mnt/empty-dir",
"name": "my-empty-dir"
}
],
"envs": null,
"imageUrl": "nginx:latest",
"memory": 2048,
"name": "my-sidecar",
"postStartCommand": "postStartCommand",
"postStartCommandArgs": "postStartCommandArgs",
"preStopCommand": "preStopCommand",
"preStopCommandArgs": "preStopCommandArgs",
"sfsConfig": null,
"zosConfig": [
{
"accessUrl": "https://zos.example.com/bucket",
"bucketID": "zos-123455",
"bucketName": "my-zos",
"bucketPath": "/tmp/sfs",
"mountDir": "/local/sfs",
"readOnly": true
}
]
}
],
"startupProbe": "",
"status": "Running",
"subnetID": "subnet-xxxx",
"tempStorage": 20,
"terminationGracePeriodSeconds": 30,
"updateStrategy": {
"batchUpdate": {
"batchCount": 2,
"batchWaitTime": 5,
"releaseType": "auto"
},
"grayUpdate": {
"enableGreyRule": false,
"grayNum": 1
},
"type": "RollingUpdate"
},
"updateTime": 1634544300000,
"vpcID": "vpc-tsge****asd",
"zosConfig": null,
"requestID": "5fd3e6f7-9229-4fb4-a352-0f91bfd638b1"
}
}
状态码
请参考 状态码
错误码
请参考 错误码