From 7ea01e17fec3a8e6074a77ecf996a3a3a80210d0 Mon Sep 17 00:00:00 2001 From: tacklequestions Date: Sun, 24 Aug 2025 17:01:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat(openapi):=20=E5=88=9B=E5=BB=BA=20Apoll?= =?UTF-8?q?o=20OpenAPI=20=E7=9A=84=20YAML=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: arrow2020 <316166287@qq.com> --- Apollo-OpenAPI.yaml | 2499 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2499 insertions(+) create mode 100644 Apollo-OpenAPI.yaml diff --git a/Apollo-OpenAPI.yaml b/Apollo-OpenAPI.yaml new file mode 100644 index 00000000..c24b1ed2 --- /dev/null +++ b/Apollo-OpenAPI.yaml @@ -0,0 +1,2499 @@ +openapi: 3.0.1 +info: + title: Apollo + description: '' + version: 1.0.0 +tags: [] +paths: + /openapi/v1/apps: + post: + summary: createApp + deprecated: false + description: 创建新的Apollo应用,包括应用基本信息设置和管理员权限分配 + tags: [] + parameters: + - name: Authorization + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenCreateAppDTO' + description: 创建应用的请求参数,包含应用基本信息和管理员配置 + responses: + '200': + description: 操作成功 + content: + application/json: + schema: + type: object + properties: {} + headers: {} + security: [] + get: + summary: findApps + deprecated: false + description: 查询应用列表,支持根据应用ID列表进行筛选查询 + tags: [] + parameters: + - name: appIds + in: query + description: 应用ID列表,多个ID用逗号分隔,用于批量查询指定的应用信息 + required: false + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回数据列表 + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenAppDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenAppDTO + example: + - dataChangeCreatedBy: 'apollo-admin' + dataChangeLastModifiedBy: 'john.doe' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + name: '用户管理系统' + appId: 'user-management-service' + orgId: 'tech-dept' + orgName: '技术部' + ownerName: '张三' + ownerEmail: 'zhangsan@company.com' + - dataChangeCreatedBy: 'apollo-admin' + dataChangeLastModifiedBy: 'jane.smith' + dataChangeCreatedTime: '2024-01-10T09:15:00.000+0800' + dataChangeLastModifiedTime: '2024-01-18T16:40:15.000+0800' + name: '订单处理系统' + appId: 'order-processing-service' + orgId: 'business-dept' + orgName: '业务部' + ownerName: '李四' + ownerEmail: 'lisi@company.com' + headers: {} + security: [] + /openapi/v1/apps/{appId}/envclusters: + get: + summary: getEnvClusterInfo + deprecated: false + description: 获取指定应用在各个环境下的集群信息列表 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回数据列表 + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenEnvClusterDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO + example: + - env: 'DEV' + clusters: + - 'default' + - 'beijing' + - 'shanghai' + - env: 'TEST' + clusters: + - 'default' + - 'integration-test' + - env: 'PRO' + clusters: + - 'default' + - 'cluster-1' + - 'cluster-2' + headers: {} + security: [] + /openapi/v1/apps/authorized: + get: + summary: findAppsAuthorized + deprecated: false + description: 查询当前Token有权限操作的应用列表 + tags: [] + parameters: + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回数据列表 + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenAppDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenAppDTO + description: which apps can be operated by open api + example: + - dataChangeCreatedBy: 'apollo-admin' + dataChangeLastModifiedBy: 'config-manager' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + name: '用户管理系统' + appId: 'user-management-service' + orgId: 'tech-dept' + orgName: '技术部' + ownerName: '张三' + ownerEmail: 'zhangsan@company.com' + - dataChangeCreatedBy: 'apollo-admin' + dataChangeLastModifiedBy: 'ops-user' + dataChangeCreatedTime: '2024-01-12T11:20:00.000+0800' + dataChangeLastModifiedTime: '2024-01-19T13:15:45.000+0800' + name: '支付网关服务' + appId: 'payment-gateway-service' + orgId: 'finance-dept' + orgName: '财务部' + ownerName: '王五' + ownerEmail: 'wangwu@company.com' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key:.+}: + get: + summary: getItem + deprecated: false + description: 获取指定配置项的详细信息 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: key + in: path + description: 配置项的键名,用于唯一标识一个配置项 + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + required: false + example: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + example: + dataChangeCreatedBy: 'config-admin' + dataChangeLastModifiedBy: 'developer' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + key: 'database.url' + type: 0 + value: 'jdbc:mysql://localhost:3306/mydb?useSSL=false&serverTimezone=Asia/Shanghai' + comment: '数据库连接URL配置,包含SSL和时区设置' + headers: {} + security: [] + put: + summary: updateItem + deprecated: false + description: 更新指定配置项的值和属性信息 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: key + in: path + description: 配置项的键名,用于唯一标识一个配置项 + required: true + example: '' + schema: + type: string + - name: createIfNotExists + in: query + description: 如果配置项不存在是否创建。当设置为true时,请求体中的dataChangeCreatedBy字段变为必填 + required: true + example: 'false' + schema: + type: boolean + - name: Authorization + in: header + description: '' + required: false + example: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenItemDTO' + description: 配置项信息,包含键名、值、类型和备注等 + responses: + '200': + description: 操作成功 + content: + application/json: + schema: + type: object + properties: {} + headers: {} + security: [] + delete: + summary: deleteItem + deprecated: false + description: 删除指定的配置项 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: key + in: path + description: 配置项的键名,用于唯一标识一个配置项 + required: true + example: '' + schema: + type: string + - name: operator + in: query + description: 执行删除操作的用户名,必须是系统中存在的用户 + required: true + schema: + type: string + - name: Authorization + in: header + description: '' + required: false + example: '' + schema: + type: string + responses: + '200': + description: 操作成功 + content: + application/json: + schema: + type: object + properties: {} + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key:.+}: + get: + summary: getItemByEncodedKey + deprecated: false + description: 通过编码后的键名获取配置项信息 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: key + in: path + description: 配置项的键名,用于唯一标识一个配置项 + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + required: false + example: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + example: + dataChangeCreatedBy: 'config-admin' + dataChangeLastModifiedBy: 'developer' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + key: 'redis.cluster.nodes' + type: 0 + value: '192.168.1.10:7000,192.168.1.11:7001,192.168.1.12:7002' + comment: 'Redis集群节点配置,用于分布式缓存' + headers: {} + security: [] + put: + summary: updateItemByEncodedKey + deprecated: false + description: 通过编码后的键名更新配置项 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: key + in: path + description: 配置项的键名,用于唯一标识一个配置项 + required: true + example: '' + schema: + type: string + - name: createIfNotExists + in: query + description: 如果配置项不存在是否创建。当设置为true时,请求体中的dataChangeCreatedBy字段变为必填 + required: true + example: 'false' + schema: + type: boolean + - name: Authorization + in: header + description: '' + required: false + example: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenItemDTO' + description: 配置项信息,包含键名、值、类型和备注等 + responses: + '200': + description: 操作成功 + content: + application/json: + schema: + type: object + properties: {} + headers: {} + security: [] + delete: + summary: deleteItemByEncodedKey + deprecated: false + description: 通过编码后的键名删除配置项 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: key + in: path + description: 配置项的键名,用于唯一标识一个配置项 + required: true + example: '' + schema: + type: string + - name: operator + in: query + description: 执行删除操作的用户名,必须是系统中存在的用户 + required: true + schema: + type: string + - name: Authorization + in: header + description: '' + required: false + example: '' + schema: + type: string + responses: + '200': + description: 操作成功 + content: + application/json: + schema: + type: object + properties: {} + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: + post: + summary: createItem + deprecated: false + description: 在指定命名空间中创建新的配置项 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenItemDTO' + description: 配置项信息,包含键名、值、类型和备注等 + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + example: + dataChangeCreatedBy: 'config-manager' + dataChangeLastModifiedBy: 'config-manager' + dataChangeCreatedTime: '2024-01-20T15:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T15:30:00.000+0800' + key: 'app.log.level' + type: 0 + value: 'INFO' + comment: '应用日志级别配置,控制日志输出详细程度' + headers: {} + security: [] + get: + summary: findItemsByNamespace + deprecated: false + description: 分页查询指定命名空间下的配置项列表 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: page + in: query + description: 页码,从0开始,用于分页查询配置项列表 + required: true + example: 0 + schema: + type: integer + - name: size + in: query + description: 每页记录数,用于控制分页查询每页返回的配置项数量,建议值为50 + required: true + example: 50 + schema: + type: integer + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenPageDTOOpenItemDTO' + example: + page: 0 + size: 50 + total: 125 + content: + - dataChangeCreatedBy: 'config-admin' + dataChangeLastModifiedBy: 'developer' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + key: 'database.url' + type: 0 + value: 'jdbc:mysql://localhost:3306/mydb' + comment: '数据库连接URL配置' + - dataChangeCreatedBy: 'config-admin' + dataChangeLastModifiedBy: 'ops-user' + dataChangeCreatedTime: '2024-01-15T11:15:00.000+0800' + dataChangeLastModifiedTime: '2024-01-19T16:45:20.000+0800' + key: 'redis.host' + type: 0 + value: '192.168.1.100' + comment: 'Redis服务器地址配置' + - dataChangeCreatedBy: 'config-manager' + dataChangeLastModifiedBy: 'config-manager' + dataChangeCreatedTime: '2024-01-16T09:20:00.000+0800' + dataChangeLastModifiedTime: '2024-01-16T09:20:00.000+0800' + key: 'app.log.level' + type: 0 + value: 'INFO' + comment: '应用日志级别配置' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName:.+}: + get: + summary: getCluster + deprecated: false + description: 获取指定集群的详细信息 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + required: false + example: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenClusterDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenClusterDTO + example: + dataChangeCreatedBy: 'cluster-admin' + dataChangeLastModifiedBy: 'ops-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + name: 'default' + appId: 'user-management-service' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters: + post: + summary: createCluster + deprecated: false + description: 在指定环境下为应用创建新的集群 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenClusterDTO' + description: 集群配置信息,包含集群名称、应用ID和创建者等 + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenClusterDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenClusterDTO + example: + dataChangeCreatedBy: 'cluster-admin' + dataChangeLastModifiedBy: 'cluster-admin' + dataChangeCreatedTime: '2024-01-20T16:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T16:30:00.000+0800' + name: 'beijing-cluster' + appId: 'user-management-service' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: + post: + summary: createRelease + deprecated: false + description: 发布指定命名空间的配置变更 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NamespaceReleaseDTO' + description: 发布配置信息,包含发布标题、发布者和发布备注等 + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO + example: + dataChangeCreatedBy: 'release-manager' + dataChangeLastModifiedBy: 'release-manager' + dataChangeCreatedTime: '2024-01-20T17:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T17:30:00.000+0800' + id: 12345 + appId: 'user-management-service' + clusterName: 'default' + namespaceName: 'application' + name: 'Release-20240120-v1.2.0' + configurations: + 'database.url': 'jdbc:mysql://localhost:3306/mydb' + 'redis.host': '192.168.1.100' + 'app.log.level': 'INFO' + comment: '更新数据库连接配置,修复Redis连接超时问题' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: + get: + summary: loadLatestActiveRelease + deprecated: false + description: 获取指定命名空间的最新有效发布版本 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO + example: + dataChangeCreatedBy: 'release-manager' + dataChangeLastModifiedBy: 'ops-admin' + dataChangeCreatedTime: '2024-01-20T17:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T18:15:25.000+0800' + id: 12345 + appId: 'user-management-service' + clusterName: 'default' + namespaceName: 'application' + name: 'Release-20240120-v1.2.0' + configurations: + 'database.url': 'jdbc:mysql://localhost:3306/mydb' + 'redis.host': '192.168.1.100' + 'app.log.level': 'INFO' + 'server.port': '8080' + comment: '最新生产环境配置发布,包含数据库和缓存配置更新' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: + post: + summary: merge + deprecated: false + description: 将灰度分支的配置合并到主分支并发布 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: branchName + in: path + description: 灰度分支名称,用于标识灰度发布的分支 + required: true + example: '' + schema: + type: string + - name: deleteBranch + in: query + description: 合并完成后是否删除灰度分支 + required: true + example: 'true' + schema: + type: boolean + - name: Authorization + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NamespaceReleaseDTO' + description: 发布配置信息,包含发布标题、发布者和发布备注等 + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: + post: + summary: createGrayRelease + deprecated: false + description: 创建灰度发布,将分支配置发布给特定用户群体 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: branchName + in: path + description: 灰度分支名称,用于标识灰度发布的分支 + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NamespaceReleaseDTO' + description: 发布配置信息,包含发布标题、发布者和发布备注等 + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases: + post: + summary: createGrayDelRelease + deprecated: false + description: 创建灰度删除发布,删除指定的配置项并发布给特定用户群体 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: branchName + in: path + description: 灰度分支名称,用于标识灰度发布的分支 + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NamespaceGrayDelReleaseDTO' + description: 灰度删除发布配置信息,包含要删除的配置项键名列表 + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + security: [] + /openapi/v1/envs/{env}/releases/{releaseId}/rollback: + put: + summary: rollback + deprecated: false + description: 回滚到指定的发布版本 + tags: [] + parameters: + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: releaseId + in: path + description: 发布记录的唯一标识符,用于标识特定的配置发布版本 + required: true + example: 0 + schema: + type: integer + - name: operator + in: query + description: 执行删除操作的用户名,必须是系统中存在的用户 + required: true + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 操作成功 + content: + application/json: + schema: + type: object + properties: {} + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: + get: + summary: getInstanceCountByNamespace + deprecated: false + description: 获取指定命名空间的客户端实例数量 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回统计数据 + content: + application/json: + schema: + type: integer + example: 15 + headers: {} + security: [] + /openapi/v1/apps/{appId}/appnamespaces: + post: + summary: createNamespace + deprecated: false + description: 为指定应用创建新的命名空间 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAppNamespaceDTO' + description: 应用命名空间配置信息,包含命名空间名称、格式类型等 + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAppNamespaceDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenAppNamespaceDTO + example: + dataChangeCreatedBy: 'namespace-admin' + dataChangeLastModifiedBy: 'namespace-admin' + dataChangeCreatedTime: '2024-01-20T18:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T18:30:00.000+0800' + name: 'database-config' + appId: 'user-management-service' + format: 'properties' + isPublic: false + appendNamespacePrefix: true + comment: '数据库相关配置命名空间,包含数据库连接、连接池等配置' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: + get: + summary: findNamespaces + deprecated: false + description: 查询指定集群下的所有命名空间列表 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: fillItemDetail + in: query + description: 是否填充配置项详细信息,true表示返回配置项列表,false表示只返回命名空间基本信息 + required: true + example: 'true' + schema: + type: boolean + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回数据列表 + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenNamespaceDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO + example: + - dataChangeCreatedBy: 'namespace-creator' + dataChangeLastModifiedBy: 'config-editor' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + appId: 'user-management-service' + clusterName: 'default' + namespaceName: 'application' + comment: '应用主配置命名空间,包含核心业务配置' + format: 'properties' + isPublic: false + items: + - dataChangeCreatedBy: 'config-admin' + dataChangeLastModifiedBy: 'developer' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + key: 'database.url' + type: 0 + value: 'jdbc:mysql://localhost:3306/mydb' + comment: '数据库连接URL配置' + - dataChangeCreatedBy: 'namespace-creator' + dataChangeLastModifiedBy: 'config-manager' + dataChangeCreatedTime: '2024-01-16T09:20:00.000+0800' + dataChangeLastModifiedTime: '2024-01-18T15:30:10.000+0800' + appId: 'user-management-service' + clusterName: 'default' + namespaceName: 'database-config' + comment: '数据库专用配置命名空间' + format: 'properties' + isPublic: false + items: + - dataChangeCreatedBy: 'dba-admin' + dataChangeLastModifiedBy: 'dba-admin' + dataChangeCreatedTime: '2024-01-16T09:25:00.000+0800' + dataChangeLastModifiedTime: '2024-01-18T15:30:10.000+0800' + key: 'connection.pool.size' + type: 0 + value: '20' + comment: '数据库连接池大小配置' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName:.+}: + get: + summary: loadNamespace + deprecated: false + description: 获取指定命名空间的详细信息和配置项 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: fillItemDetail + in: query + description: 是否填充配置项详细信息,true表示返回配置项列表,false表示只返回命名空间基本信息 + required: true + example: 'true' + schema: + type: boolean + - name: Authorization + in: header + description: '' + required: false + example: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + appId: '' + clusterName: '' + namespaceName: '' + comment: '' + format: '' + isPublic: false + items: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + key: '' + type: 0 + value: '' + comment: '' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: + get: + summary: getNamespaceLock + deprecated: false + description: 获取指定命名空间的锁定状态信息 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceLockDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceLockDTO + example: + namespaceName: 'application' + isLocked: true + lockedBy: 'config-admin' + headers: {} + security: [] + /openapi/v1/organizations: + get: + summary: getOrganization + deprecated: false + description: 获取系统中所有组织的列表信息 + tags: [] + parameters: + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回数据列表 + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenOrganizationDto' + description: com.ctrip.framework.apollo.openapi.dto.OpenOrganizationDto + example: + - orgId: 'tech-dept' + orgName: '技术部' + - orgId: 'business-dept' + orgName: '业务部' + - orgId: 'finance-dept' + orgName: '财务部' + - orgId: 'ops-dept' + orgName: '运维部' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches: + get: + summary: findBranch + deprecated: false + description: 查找指定命名空间的灰度分支信息 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO + example: + dataChangeCreatedBy: 'gray-release-admin' + dataChangeLastModifiedBy: 'config-editor' + dataChangeCreatedTime: '2024-01-20T19:00:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T20:15:30.000+0800' + appId: 'user-management-service' + clusterName: 'gray-branch-20240120' + namespaceName: 'application' + comment: '灰度发布分支,用于测试新配置' + format: 'properties' + isPublic: false + items: + - dataChangeCreatedBy: 'gray-release-admin' + dataChangeLastModifiedBy: 'config-editor' + dataChangeCreatedTime: '2024-01-20T19:05:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T20:15:30.000+0800' + key: 'feature.new-algorithm.enabled' + type: 0 + value: 'true' + comment: '新算法功能开关,灰度测试用' + - dataChangeCreatedBy: 'gray-release-admin' + dataChangeLastModifiedBy: 'gray-release-admin' + dataChangeCreatedTime: '2024-01-20T19:10:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T19:10:00.000+0800' + key: 'cache.timeout' + type: 0 + value: '300' + comment: '缓存超时时间,灰度环境专用配置' + headers: {} + security: [] + post: + summary: createBranch + deprecated: false + description: 为指定命名空间创建灰度发布分支 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: operator + in: query + description: 执行删除操作的用户名,必须是系统中存在的用户 + required: true + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + appId: '' + clusterName: '' + namespaceName: '' + comment: '' + format: '' + isPublic: false + items: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + key: '' + type: 0 + value: '' + comment: '' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: + delete: + summary: deleteBranch + deprecated: false + description: 删除指定的灰度发布分支 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: branchName + in: path + description: 灰度分支名称,用于标识灰度发布的分支 + required: true + example: '' + schema: + type: string + - name: operator + in: query + description: 执行删除操作的用户名,必须是系统中存在的用户 + required: true + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 操作成功 + content: + application/json: + schema: + type: object + properties: {} + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules: + get: + summary: getBranchGrayRules + deprecated: false + description: 获取灰度分支的发布规则配置 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: branchName + in: path + description: 灰度分支名称,用于标识灰度发布的分支 + required: true + example: '' + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenGrayReleaseRuleDTO + example: + dataChangeCreatedBy: 'gray-release-admin' + dataChangeLastModifiedBy: 'ops-manager' + dataChangeCreatedTime: '2024-01-20T19:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T20:45:15.000+0800' + appId: 'user-management-service' + clusterName: 'default' + namespaceName: 'application' + branchName: 'gray-branch-20240120' + ruleItems: + - clientAppId: 'mobile-app' + clientIpList: + - '192.168.1.100' + - '192.168.1.101' + - '10.0.0.50' + clientLabelList: + - 'beta-user' + - 'internal-test' + - clientAppId: 'web-frontend' + clientIpList: + - '192.168.2.10' + - '192.168.2.11' + clientLabelList: + - 'canary-group' + - 'qa-team' + headers: {} + security: [] + put: + summary: updateBranchRules + deprecated: false + description: 更新灰度分支的发布规则配置 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: branchName + in: path + description: 灰度分支名称,用于标识灰度发布的分支 + required: true + example: '' + schema: + type: string + - name: operator + in: query + description: 执行删除操作的用户名,必须是系统中存在的用户 + required: true + schema: + type: string + - name: Authorization + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' + description: 灰度发布规则配置,包含灰度规则项列表和生效条件 + responses: + '200': + description: 操作成功 + content: + application/json: + schema: + type: object + properties: {} + headers: {} + security: [] +components: + schemas: + OpenAppDTO: + type: object + description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 + required: + - appId + - name + - ownerName + - ownerEmail + properties: + dataChangeCreatedBy: + type: string + description: 数据创建者用户名,记录是谁创建了这个应用 + example: apollo-admin + dataChangeLastModifiedBy: + type: string + description: 数据最后修改者用户名,记录最后一次修改应用信息的用户 + example: john.doe + dataChangeCreatedTime: + type: string + description: 数据创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 + dataChangeLastModifiedTime: + type: string + description: 数据最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 + name: + type: string + description: 应用名称,用于显示的友好名称 + example: 用户管理系统 + appId: + type: string + description: 应用唯一标识符,全局唯一的应用ID + example: user-management-service + orgId: + type: string + description: 组织ID,应用所属组织的唯一标识 + example: tech-dept + orgName: + type: string + description: 组织名称,应用所属组织的显示名称 + example: 技术部 + ownerName: + type: string + description: 应用负责人姓名,应用的主要负责人 + example: 张三 + ownerEmail: + type: string + description: 应用负责人邮箱地址,用于接收应用相关通知 + example: zhangsan@company.com + OpenCreateAppDTO: + type: object + description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 + required: + - app + properties: + assignAppRoleToSelf: + type: boolean + description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 + example: true + admins: + type: array + items: + type: string + description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 + example: + - admin + - john.doe + - jane.smith + app: + $ref: '#/components/schemas/OpenAppDTO' + description: 应用基本信息,包含应用的详细配置数据 + OpenEnvClusterDTO: + type: object + description: 环境集群信息数据传输对象,表示特定环境下的集群列表 + required: + - env + - clusters + properties: + env: + type: string + description: 环境名称,如开发环境、测试环境、生产环境等 + example: DEV + clusters: + type: array + items: + type: string + description: 该环境下的集群名称列表,每个集群代表一个部署单元 + example: + - default + - cluster-1 + - cluster-2 + OpenItemDTO: + type: object + description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + required: + - key + - value + properties: + dataChangeCreatedBy: + type: string + description: 配置项创建者用户名,记录是谁创建了这个配置项 + example: config-admin + dataChangeLastModifiedBy: + type: string + description: 配置项最后修改者用户名,记录最后一次修改配置的用户 + example: developer + dataChangeCreatedTime: + type: string + description: 配置项创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 + dataChangeLastModifiedTime: + type: string + description: 配置项最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 + key: + type: string + description: 配置项的键名,在同一命名空间内唯一标识一个配置项 + example: database.url + type: + type: integer + description: 配置项类型,0表示普通配置项,1表示文件类型配置项 + example: 0 + value: + type: string + description: 配置项的值,可以是字符串、数字、JSON等格式 + example: jdbc:mysql://localhost:3306/mydb + comment: + type: string + description: 配置项的注释说明,用于描述配置项的用途和含义 + example: 数据库连接URL配置 + OpenPageDTOOpenItemDTO: + type: object + description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 + properties: + page: + type: integer + description: 当前页码,从0开始计数 + example: 0 + size: + type: integer + description: 每页显示的记录数量 + example: 20 + total: + type: integer + description: 总记录数,符合查询条件的配置项总数量 + format: int64 + example: 150 + content: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + description: 当前页的配置项列表,包含具体的配置项数据 + OpenClusterDTO: + type: object + description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 + required: + - name + - appId + - dataChangeCreatedBy + properties: + dataChangeCreatedBy: + type: string + description: 集群创建者用户名,记录是谁创建了这个集群 + example: cluster-admin + dataChangeLastModifiedBy: + type: string + description: 集群最后修改者用户名,记录最后一次修改集群信息的用户 + example: ops-user + dataChangeCreatedTime: + type: string + description: 集群创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 + dataChangeLastModifiedTime: + type: string + description: 集群最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 + name: + type: string + description: 集群名称,在同一应用和环境下唯一标识一个集群 + example: default + appId: + type: string + description: 所属应用的唯一标识符 + example: user-management-service + MapString: + type: object + description: 字符串映射对象,用于表示键值对的配置数据结构 + additionalProperties: + type: string + description: 配置项的值,键为配置项名称,值为配置项内容 + example: configuration-value + properties: {} + example: + database.url: jdbc:mysql://localhost:3306/mydb + redis.host: localhost + app.name: MyApplication + OpenReleaseDTO: + type: object + description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 + properties: + dataChangeCreatedBy: + type: string + description: 发布创建者用户名,记录是谁创建了这次发布 + example: release-manager + dataChangeLastModifiedBy: + type: string + description: 发布最后修改者用户名,记录最后一次修改发布信息的用户 + example: ops-admin + dataChangeCreatedTime: + type: string + description: 发布创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 + dataChangeLastModifiedTime: + type: string + description: 发布最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 + id: + type: integer + description: 发布记录的唯一标识符,系统自动生成 + format: int64 + example: 12345 + appId: + type: string + description: 所属应用的唯一标识符 + example: user-management-service + clusterName: + type: string + description: 所属集群的名称 + example: default + namespaceName: + type: string + description: 所属命名空间的名称 + example: application + name: + type: string + description: 发布名称,用于标识这次发布的版本或描述 + example: Release-20240120-v1.2.0 + configurations: + $ref: '#/components/schemas/MapString' + description: 本次发布包含的所有配置项键值对 + comment: + type: string + description: 发布备注,描述本次发布的变更内容和目的 + example: 更新数据库连接配置,修复Redis连接超时问题 + NamespaceReleaseDTO: + type: object + description: 命名空间发布请求数据传输对象,用于创建新的配置发布 + required: + - releaseTitle + - releasedBy + properties: + releaseTitle: + type: string + description: 发布标题,用于标识这次发布的名称或版本号 + example: Release-20240120-v1.2.0 + releaseComment: + type: string + description: 发布备注,详细描述本次发布的变更内容和目的 + example: 更新数据库连接配置,修复Redis连接超时问题,新增日志级别配置 + releasedBy: + type: string + description: 发布操作者用户名,记录是谁执行了这次发布操作 + example: release-manager + isEmergencyPublish: + type: boolean + description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 + example: false + NamespaceGrayDelReleaseDTO: + type: object + description: 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 + required: + - releaseTitle + - releasedBy + - grayDelKeys + properties: + releaseTitle: + type: string + description: 发布标题,用于标识这次灰度删除发布的名称或版本号 + example: GrayDel-20240120-remove-deprecated-configs + releaseComment: + type: string + description: 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 + example: 删除已废弃的旧版本数据库配置项,清理无用的缓存配置 + releasedBy: + type: string + description: 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 + example: config-manager + isEmergencyPublish: + type: boolean + description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 + example: false + grayDelKeys: + type: array + items: + type: string + description: 需要在灰度发布中删除的配置项键名列表 + example: + - old.database.host + - deprecated.cache.config + - legacy.api.endpoint + OpenAppNamespaceDTO: + type: object + description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 + required: + - name + - appId + - format + - dataChangeCreatedBy + properties: + dataChangeCreatedBy: + type: string + description: 命名空间创建者用户名,记录是谁创建了这个应用命名空间 + example: namespace-admin + dataChangeLastModifiedBy: + type: string + description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 + example: config-manager + dataChangeCreatedTime: + type: string + description: 命名空间创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 + dataChangeLastModifiedTime: + type: string + description: 命名空间最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 + name: + type: string + description: 命名空间名称,在同一应用内唯一标识一个命名空间 + example: database-config + appId: + type: string + description: 所属应用的唯一标识符 + example: user-management-service + format: + type: string + description: 命名空间格式类型,如properties、xml、json、yml等 + example: properties + isPublic: + type: boolean + description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 + example: false + appendNamespacePrefix: + type: boolean + description: 对于公共命名空间,是否在命名空间名称前添加前缀 + default: true + example: true + comment: + type: string + description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 + example: 数据库相关配置命名空间,包含数据库连接、连接池等配置 + OpenNamespaceDTO: + type: object + description: Apollo命名空间数据传输对象,表示特定环境和集群下的命名空间及其配置项 + properties: + dataChangeCreatedBy: + type: string + description: 命名空间创建者用户名,记录是谁创建了这个命名空间实例 + example: namespace-creator + dataChangeLastModifiedBy: + type: string + description: 命名空间最后修改者用户名,记录最后一次修改命名空间的用户 + example: config-editor + dataChangeCreatedTime: + type: string + description: 命名空间创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 + dataChangeLastModifiedTime: + type: string + description: 命名空间最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 + appId: + type: string + description: 所属应用的唯一标识符 + example: user-management-service + clusterName: + type: string + description: 所属集群的名称 + example: default + namespaceName: + type: string + description: 命名空间名称,标识配置的分组 + example: application + comment: + type: string + description: 命名空间备注说明,描述命名空间的用途 + example: 应用主配置命名空间,包含核心业务配置 + format: + type: string + description: 命名空间格式类型,如properties、xml、json、yml等 + example: properties + isPublic: + type: boolean + description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 + example: false + items: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + description: 命名空间包含的所有配置项列表 + OpenNamespaceLockDTO: + type: object + description: Apollo命名空间锁状态数据传输对象,表示命名空间的锁定状态信息 + properties: + namespaceName: + type: string + description: 命名空间名称,标识被锁定的命名空间 + example: application + isLocked: + type: boolean + description: 命名空间是否被锁定,锁定状态下不允许修改配置 + example: true + lockedBy: + type: string + description: 锁定操作者用户名,记录是谁锁定了这个命名空间 + example: config-admin + OpenOrganizationDto: + type: object + description: Apollo组织信息数据传输对象,表示系统中的组织架构信息 + required: + - orgId + - orgName + properties: + orgId: + type: string + description: 组织唯一标识符,用于在系统中唯一标识一个组织 + example: tech-dept + orgName: + type: string + description: 组织名称,用于显示的友好名称 + example: 技术部 + OpenGrayReleaseRuleItemDTO: + type: object + description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 + properties: + clientAppId: + type: string + description: 客户端应用ID,指定哪个应用可以获取灰度配置 + example: mobile-app + clientIpList: + type: array + items: + type: string + description: 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 + example: + - 192.168.1.100 + - 192.168.1.101 + - 10.0.0.50 + clientLabelList: + type: array + items: + type: string + description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 + example: + - beta-user + - internal-test + - canary-group + OpenGrayReleaseRuleDTO: + type: object + description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 + properties: + dataChangeCreatedBy: + type: string + description: 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 + example: gray-release-admin + dataChangeLastModifiedBy: + type: string + description: 灰度规则最后修改者用户名,记录最后一次修改规则的用户 + example: ops-manager + dataChangeCreatedTime: + type: string + description: 灰度规则创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 + dataChangeLastModifiedTime: + type: string + description: 灰度规则最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 + appId: + type: string + description: 所属应用的唯一标识符 + example: user-management-service + clusterName: + type: string + description: 所属集群的名称 + example: default + namespaceName: + type: string + description: 所属命名空间的名称 + example: application + branchName: + type: string + description: 灰度分支名称,标识灰度发布的分支 + example: gray-branch-20240120 + ruleItems: + type: array + items: + $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenGrayReleaseRuleItemDTO + description: 灰度发布规则项列表,包含具体的灰度规则条件 + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: Authorization + description: | + Apollo OpenAPI访问令牌,用于身份验证和权限控制。 + + **获取方式:** + 1. 登录Apollo Portal管理界面 + 2. 进入"管理员工具" -> "开放平台授权管理" + 3. 点击"创建Token"按钮 + 4. 填写Token名称和选择授权的应用 + 5. 创建成功后复制生成的Token值 + + **使用方法:** + 在请求头中添加:`Authorization: your-token-value` + + **注意事项:** + - Token具有特定的应用访问权限 + - 请妥善保管Token,避免泄露 + - Token可以在管理界面中禁用或删除 +servers: [] +security: [] From a2f24d74d9022566ee8f62d3dff29560e60d411e Mon Sep 17 00:00:00 2001 From: Bond <71333413+tacklequestions@users.noreply.github.com> Date: Tue, 12 Aug 2025 11:27:50 +0800 Subject: [PATCH 2/6] feat(openapi): initial OpenAPI 3.0 spec + docs Co-authored-by: arrow2020 <316166287@qq.com> --- Apollo-OpenAPI.yaml | 8213 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 6646 insertions(+), 1567 deletions(-) diff --git a/Apollo-OpenAPI.yaml b/Apollo-OpenAPI.yaml index c24b1ed2..5d5f9e4a 100644 --- a/Apollo-OpenAPI.yaml +++ b/Apollo-OpenAPI.yaml @@ -1,622 +1,1059 @@ openapi: 3.0.1 info: - title: Apollo + title: Apollo-OpenAPI description: '' version: 1.0.0 -tags: [] +tags: + - name: Apps + - name: Commit + - name: Configs + - name: Env + - name: Fav + - name: Item + - name: Instance + - name: Branch + - name: NameSpace + - name: Namespace + - name: Permission + - name: App + - name: Clusters + - name: Release paths: - /openapi/v1/apps: + /apps: post: - summary: createApp + summary: 创建App deprecated: false - description: 创建新的Apollo应用,包括应用基本信息设置和管理员权限分配 - tags: [] + description: 创建一个新的 App + operationId: createApp + tags: + - Apps parameters: - - name: Authorization + - name: X-Auth-Token in: header description: '' + required: true + example: '' schema: type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenCreateAppDTO' - description: 创建应用的请求参数,包含应用基本信息和管理员配置 + type: object + properties: + req: + $ref: '#/components/schemas/OpenCreateAppDTO' + required: + - req + examples: {} responses: '200': - description: 操作成功 - content: - application/json: - schema: - type: object - properties: {} + description: OK headers: {} security: [] get: - summary: findApps + summary: 根据appId查找App deprecated: false - description: 查询应用列表,支持根据应用ID列表进行筛选查询 - tags: [] + description: '' + operationId: findApps + tags: + - Apps parameters: - name: appIds in: query - description: 应用ID列表,多个ID用逗号分隔,用于批量查询指定的应用信息 + description: 若appIds为空则返回全部所有App required: false + example: tian-app,100,66,100004458,11232131,1000001 schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' schema: type: string responses: '200': - description: 查询成功,返回数据列表 + description: '' content: application/json: schema: type: array items: - $ref: '#/components/schemas/OpenAppDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenAppDTO + type: object + properties: + name: + type: string + appId: + type: string + orgId: + type: string + orgName: + type: string + ownerName: + type: string + ownerEmail: + type: string + id: + type: integer + isDeleted: + type: boolean + deletedAt: + type: integer + dataChangeCreatedBy: + type: string + dataChangeCreatedTime: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeLastModifiedTime: + type: string + required: + - name + - appId + - orgId + - orgName + - ownerName + - ownerEmail + - id + - isDeleted + - deletedAt + - dataChangeCreatedBy + - dataChangeCreatedTime + - dataChangeLastModifiedBy + - dataChangeLastModifiedTime example: - - dataChangeCreatedBy: 'apollo-admin' - dataChangeLastModifiedBy: 'john.doe' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - name: '用户管理系统' - appId: 'user-management-service' - orgId: 'tech-dept' - orgName: '技术部' - ownerName: '张三' - ownerEmail: 'zhangsan@company.com' - - dataChangeCreatedBy: 'apollo-admin' - dataChangeLastModifiedBy: 'jane.smith' - dataChangeCreatedTime: '2024-01-10T09:15:00.000+0800' - dataChangeLastModifiedTime: '2024-01-18T16:40:15.000+0800' - name: '订单处理系统' - appId: 'order-processing-service' - orgId: 'business-dept' - orgName: '业务部' - ownerName: '李四' - ownerEmail: 'lisi@company.com' - headers: {} - security: [] - /openapi/v1/apps/{appId}/envclusters: - get: - summary: getEnvClusterInfo - deprecated: false - description: 获取指定应用在各个环境下的集群信息列表 - tags: [] + - name: liveService + appId: '1000001' + orgId: micro_service + orgName: 微服务部门 + ownerName: apollo + ownerEmail: apollo@acme.com + id: 3288 + isDeleted: false + deletedAt: 0 + dataChangeCreatedBy: apollo + dataChangeCreatedTime: 2025-06-18T19:33:27.000+0800 + dataChangeLastModifiedBy: apollo + dataChangeLastModifiedTime: 2025-06-18T19:33:27.000+0800 + - name: apollo-demo + appId: '100004458' + orgId: TEST1 + orgName: 测试部门 + ownerName: apollo + ownerEmail: apollo@acme.com + id: 2762 + isDeleted: false + deletedAt: 0 + dataChangeCreatedBy: apollo + dataChangeCreatedTime: 2024-11-23T10:22:49.000+0800 + dataChangeLastModifiedBy: apollo + dataChangeLastModifiedTime: 2024-11-23T10:22:49.000+0800 + - name: '1312312' + appId: '11232131' + orgId: micro_service + orgName: 微服务部门 + ownerName: apollo + ownerEmail: apollo@acme.com + id: 3255 + isDeleted: false + deletedAt: 0 + dataChangeCreatedBy: apollo + dataChangeCreatedTime: 2025-06-02T20:14:49.000+0800 + dataChangeLastModifiedBy: apollo + dataChangeLastModifiedTime: 2025-06-02T20:14:49.000+0800 + - name: '111' + appId: '66' + orgId: micro_service + orgName: 大数据部门 + ownerName: apollo + ownerEmail: apollo@acme.com + id: 3220 + isDeleted: false + deletedAt: 0 + dataChangeCreatedBy: apollo + dataChangeCreatedTime: 2025-05-25T12:51:07.000+0800 + dataChangeLastModifiedBy: apollo + dataChangeLastModifiedTime: 2025-05-25T12:51:07.000+0800 + - name: tian示例应用 + appId: tian-app + orgId: '111' + orgName: 互联网研发部 + ownerName: test2 + ownerEmail: aaa + id: 208 + isDeleted: false + deletedAt: 0 + dataChangeCreatedBy: TianLX + dataChangeCreatedTime: 2023-02-01T13:45:23.000+0800 + dataChangeLastModifiedBy: apollo + dataChangeLastModifiedTime: 2024-09-27T05:05:29.000+0800 + headers: {} + security: [] + /apps/{appId}/envclusters: + get: + summary: 根据appId获取Envs&Clusters + deprecated: false + description: '' + operationId: getEnvClusterInfo + tags: + - Apps parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' + example: '1000001' schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' schema: type: string responses: '200': - description: 查询成功,返回数据列表 + description: '' content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/OpenEnvClusterDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO + type: object + properties: + entities: + type: array + items: + type: object + properties: + code: + type: integer + message: + type: string + body: + type: object + properties: + env: + type: string + clusters: + type: array + items: + type: object + properties: + id: + type: integer + name: + type: string + appId: + type: string + parentClusterId: + type: integer + dataChangeCreatedBy: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + dataChangeLastModifiedTime: + type: string + comment: + type: string + required: + - id + - name + - appId + - parentClusterId + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + - comment + required: + - env + - clusters + required: + - entities example: - - env: 'DEV' - clusters: - - 'default' - - 'beijing' - - 'shanghai' - - env: 'TEST' - clusters: - - 'default' - - 'integration-test' - - env: 'PRO' - clusters: - - 'default' - - 'cluster-1' - - 'cluster-2' - headers: {} - security: [] - /openapi/v1/apps/authorized: - get: - summary: findAppsAuthorized - deprecated: false - description: 查询当前Token有权限操作的应用列表 - tags: [] + entities: + - code: 200 + message: OK + body: + env: DEV + clusters: + - id: 5824 + name: default + appId: '1000001' + parentClusterId: 0 + dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2025-06-18T19:33:27.000+0800 + dataChangeLastModifiedTime: 2025-06-18T19:33:27.000+0800 + - id: 5849 + name: '123' + appId: '1000001' + parentClusterId: 0 + comment: '' + dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2025-06-24T15:25:37.000+0800 + dataChangeLastModifiedTime: 2025-06-24T15:25:37.000+0800 + - id: 5892 + name: '1234' + appId: '1000001' + parentClusterId: 0 + comment: 添加的新集群 + dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2025-07-02T09:14:58.000+0800 + dataChangeLastModifiedTime: 2025-07-02T09:14:58.000+0800 + headers: {} + security: [] + /apps/authorized: + get: + summary: 查询有权操作的所有App + deprecated: false + description: '' + operationId: findAppsAuthorized + tags: + - Apps parameters: - - name: Authorization + - name: X-Auth-Token in: header description: '' + required: false + example: '' schema: type: string responses: '200': - description: 查询成功,返回数据列表 + description: '' content: application/json: schema: type: array items: - $ref: '#/components/schemas/OpenAppDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenAppDTO - description: which apps can be operated by open api + type: object + properties: + name: + type: string + appId: + type: string + orgId: + type: string + orgName: + type: string + ownerName: + type: string + ownerEmail: + type: string + id: + type: integer + isDeleted: + type: boolean + deletedAt: + type: integer + dataChangeCreatedBy: + type: string + dataChangeCreatedTime: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeLastModifiedTime: + type: string + required: + - name + - appId + - orgId + - orgName + - ownerName + - ownerEmail + - id + - isDeleted + - deletedAt + - dataChangeCreatedBy + - dataChangeCreatedTime + - dataChangeLastModifiedBy + - dataChangeLastModifiedTime example: - - dataChangeCreatedBy: 'apollo-admin' - dataChangeLastModifiedBy: 'config-manager' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - name: '用户管理系统' - appId: 'user-management-service' - orgId: 'tech-dept' - orgName: '技术部' - ownerName: '张三' - ownerEmail: 'zhangsan@company.com' - - dataChangeCreatedBy: 'apollo-admin' - dataChangeLastModifiedBy: 'ops-user' - dataChangeCreatedTime: '2024-01-12T11:20:00.000+0800' - dataChangeLastModifiedTime: '2024-01-19T13:15:45.000+0800' - name: '支付网关服务' - appId: 'payment-gateway-service' - orgId: 'finance-dept' - orgName: '财务部' - ownerName: '王五' - ownerEmail: 'wangwu@company.com' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key:.+}: - get: - summary: getItem - deprecated: false - description: 获取指定配置项的详细信息 - tags: [] + - name: liveService + appId: '1000001' + orgId: micro_service + orgName: 微服务部门 + ownerName: apollo + ownerEmail: apollo@acme.com + id: 3288 + isDeleted: false + deletedAt: 0 + dataChangeCreatedBy: apollo + dataChangeCreatedTime: 2025-06-18T19:33:27.000+0800 + dataChangeLastModifiedBy: apollo + dataChangeLastModifiedTime: 2025-06-18T19:33:27.000+0800 + - name: user-service + appId: '100001' + orgId: minecreaft + orgName: MinecreaftPaperPlugin + ownerName: apollo + ownerEmail: apollo@acme.com + id: 2968 + isDeleted: false + deletedAt: 0 + dataChangeCreatedBy: apollo + dataChangeCreatedTime: 2025-02-09T21:58:22.000+0800 + dataChangeLastModifiedBy: apollo + dataChangeLastModifiedTime: 2025-05-05T22:07:02.000+0800 + - name: shop-service + appId: '100002' + orgId: micro_service + orgName: 微服务部门 + ownerName: apollo + ownerEmail: apollo@acme.com + id: 2969 + isDeleted: false + deletedAt: 0 + dataChangeCreatedBy: apollo + dataChangeCreatedTime: 2025-02-09T22:04:53.000+0800 + dataChangeLastModifiedBy: apollo + dataChangeLastModifiedTime: 2025-06-09T13:36:48.000+0800 + headers: {} + security: [] + /{appId}: + put: + summary: 根据appId更新App + deprecated: false + description: '' + tags: + - Apps parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' + - name: X-Auth-Token + in: header + description: '' schema: type: string - - name: clusterName + requestBody: + content: + application/json: + schema: + type: object + properties: + '': + $ref: '#/components/schemas/OpenAppDTO' + required: + - '' + examples: {} + responses: + '200': + description: OK + headers: {} + security: [] + /apps/{appId}: + delete: + summary: 根据appId删除App + deprecated: false + description: '' + operationId: deleteApp + tags: + - Apps + parameters: + - name: appId in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' + - name: X-Auth-Token + in: header + description: '' schema: type: string - - name: key + responses: + '200': + description: OK + headers: {} + security: [] + /apps/{appId}/miss_envs: + get: + summary: 根据appId查询app缺失的环境 + deprecated: false + description: '' + tags: [] + parameters: + - name: appId in: path - description: 配置项的键名,用于唯一标识一个配置项 + description: '' required: true - example: '' schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' - required: false - example: '' schema: type: string responses: '200': - description: 查询成功,返回详细数据 + description: '' content: application/json: schema: - $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + type: object + properties: + code: + type: integer + entities: + type: array + items: + type: string + required: + - code + - entities example: - dataChangeCreatedBy: 'config-admin' - dataChangeLastModifiedBy: 'developer' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - key: 'database.url' - type: 0 - value: 'jdbc:mysql://localhost:3306/mydb?useSSL=false&serverTimezone=Asia/Shanghai' - comment: '数据库连接URL配置,包含SSL和时区设置' + code: 200 + entities: + - - DEV + - FAT headers: {} security: [] - put: - summary: updateItem + /apps/{appId}/navtree: + get: + summary: 根据appId获取navtree deprecated: false - description: 更新指定配置项的值和属性信息 - tags: [] + description: '' + operationId: nav + tags: + - Apps parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' + - name: X-Auth-Token + in: header + description: '' schema: type: string - - name: namespaceName + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: integer + entities: + type: array + items: + type: object + properties: + code: + type: integer + message: + type: string + body: + type: object + properties: + env: + type: string + clusters: + type: array + items: + type: object + properties: + id: + type: integer + name: + type: string + appId: + type: string + parentClusterId: + type: integer + dataChangeCreatedBy: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + dataChangeLastModifiedTime: + type: string + comment: + type: string + required: + - id + - name + - appId + - parentClusterId + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + - comment + required: + - env + - clusters + required: + - code + - entities + example: + code: 200 + entities: + - code: 200 + message: OK + body: + env: DEV + clusters: + - id: 420 + name: default + appId: app-test01 + parentClusterId: 0 + dataChangeCreatedBy: sjh + dataChangeLastModifiedBy: sjh + dataChangeCreatedTime: 2023-02-02T15:31:44.000+0800 + dataChangeLastModifiedTime: 2023-02-02T15:31:44.000+0800 + - id: 4539 + name: jk + appId: app-test01 + parentClusterId: 0 + comment: '' + dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2024-10-13T18:41:56.000+0800 + dataChangeLastModifiedTime: 2024-10-13T18:41:56.000+0800 + - id: 5430 + name: test + appId: app-test01 + parentClusterId: 0 + comment: test + dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2025-03-30T19:21:20.000+0800 + dataChangeLastModifiedTime: 2025-03-30T19:21:20.000+0800 + - id: 5711 + name: test1 + appId: app-test01 + parentClusterId: 0 + dataChangeCreatedBy: oliver + dataChangeCreatedTime: 2025-05-26T17:52:09.000+0800 + dataChangeLastModifiedTime: 2025-05-26T17:52:09.000+0800 + - id: 5894 + name: cluster-1751449572 + appId: app-test01 + parentClusterId: 0 + dataChangeCreatedBy: apollo + dataChangeCreatedTime: 2025-07-02T17:46:12.000+0800 + dataChangeLastModifiedTime: 2025-07-02T17:46:12.000+0800 + - id: 5895 + name: cluster-1751451847 + appId: app-test01 + parentClusterId: 0 + dataChangeCreatedBy: apollo + dataChangeCreatedTime: 2025-07-02T18:24:08.000+0800 + dataChangeLastModifiedTime: 2025-07-02T18:24:08.000+0800 + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters: + post: + summary: 基于appId&env创建cluster + deprecated: false + description: '' + operationId: createCluster + tags: + - Apps + parameters: + - name: appId in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' required: true - example: '' schema: type: string - - name: key + - name: env in: path - description: 配置项的键名,用于唯一标识一个配置项 + description: '' required: true - example: '' schema: type: string - - name: createIfNotExists - in: query - description: 如果配置项不存在是否创建。当设置为true时,请求体中的dataChangeCreatedBy字段变为必填 - required: true - example: 'false' - schema: - type: boolean - - name: Authorization + - name: X-Auth-Token in: header description: '' - required: false - example: '' schema: type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 配置项信息,包含键名、值、类型和备注等 + $ref: '#/components/schemas/OpenClusterDTO' + examples: {} responses: '200': - description: 操作成功 + description: '' content: application/json: schema: type: object - properties: {} + properties: + Result: + $ref: '#/components/schemas/OpenClusterDTO' + description: 名称待确定 + required: + - Result headers: {} security: [] - delete: - summary: deleteItem + /apps/{appId}/envs/{env}/clusters/{clusterName:.+}: + get: + summary: 查询cluster相关信息 deprecated: false - description: 删除指定的配置项 - tags: [] + description: 根据appId&env&clusterName查询app的cluster相关信息 + operationId: loadCluster + tags: + - Apps parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - - name: clusterName + - name: clusterName:.+ in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - - name: namespaceName + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenClusterDTO' + headers: {} + security: [] + delete: + summary: 删除Cluster + deprecated: false + description: 根据appId&env&clusterName删除cluster + tags: [] + parameters: + - name: appId in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' required: true - example: '' schema: type: string - - name: key + - name: env in: path - description: 配置项的键名,用于唯一标识一个配置项 + description: '' required: true - example: '' schema: type: string - - name: operator - in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 + - name: clusterName:.+ + in: path + description: '' required: true schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' - required: false - example: '' schema: type: string responses: '200': - description: 操作成功 - content: - application/json: - schema: - type: object - properties: {} + description: OK headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key:.+}: + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits: get: - summary: getItemByEncodedKey + summary: 查询commit信息 deprecated: false - description: 通过编码后的键名获取配置项信息 - tags: [] + description: '' + operationId: loadCommits + tags: + - Commit parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' required: true - example: '' schema: type: string - - name: key - in: path - description: 配置项的键名,用于唯一标识一个配置项 - required: true - example: '' + - name: page + in: query + description: '' + required: false schema: - type: string - - name: Authorization - in: header + type: integer + minimum: 0 + default: 0 + - name: size + in: query description: '' required: false - example: '' + schema: + type: integer + format: int32 + default: 10 + minimum: 0 + exclusiveMinimum: true + - name: X-Auth-Token + in: header + description: '' schema: type: string responses: '200': - description: 查询成功,返回详细数据 + description: OK content: application/json: schema: - $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO - example: - dataChangeCreatedBy: 'config-admin' - dataChangeLastModifiedBy: 'developer' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - key: 'redis.cluster.nodes' - type: 0 - value: '192.168.1.10:7000,192.168.1.11:7001,192.168.1.12:7002' - comment: 'Redis集群节点配置,用于分布式缓存' + type: object + properties: + commits: + type: array + items: + $ref: '#/components/schemas/OpenCommitDTO' + required: + - commits headers: {} security: [] - put: - summary: updateItemByEncodedKey + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export: + get: + summary: 导出指定配置项 deprecated: false - description: 通过编码后的键名更新配置项 - tags: [] + description: '' + operationId: exportItems + tags: + - Configs parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' required: true - example: '' schema: type: string - - name: key - in: path - description: 配置项的键名,用于唯一标识一个配置项 - required: true - example: '' + - name: X-Auth-Token + in: header + description: '' schema: type: string - - name: createIfNotExists - in: query - description: 如果配置项不存在是否创建。当设置为true时,请求体中的dataChangeCreatedBy字段变为必填 - required: true - example: 'false' - schema: - type: boolean - - name: Authorization + responses: + '200': + description: '' + headers: + Content-Disposition: + example: '' + required: false + description: 返回文件下载位置 + schema: + type: string + security: [] + /configs/export: + get: + summary: 导出全部配置项 + deprecated: false + description: 必须要有SuperAdmin权限 + operationId: exportAll + tags: + - Configs + parameters: + - name: X-Auth-Token in: header description: '' - required: false - example: '' schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 配置项信息,包含键名、值、类型和备注等 responses: '200': - description: 操作成功 - content: - application/json: + description: '' + headers: + Content-Disposition: + example: '' + required: false + description: 下载文件位置 schema: - type: object - properties: {} - headers: {} + type: string security: [] - delete: - summary: deleteItemByEncodedKey + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import: + get: + summary: 导入配置项 deprecated: false - description: 通过编码后的键名删除配置项 - tags: [] + description: |- + 导入配置项 + * Yml 文件的名称必须以 {@code.yml} 结尾。 + * Properties 文件的名称必须以 {@code.properties} 结尾。 + * 以此类推。 + operationId: importConfigFile + tags: + - Configs parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' required: true - example: '' schema: type: string - - name: key - in: path - description: 配置项的键名,用于唯一标识一个配置项 - required: true - example: '' + - name: X-Auth-Token + in: header + description: '' schema: type: string - - name: operator + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + format: binary + type: string + example: '' + examples: {} + responses: + '200': + description: OK + headers: {} + security: [] + /configs/import: + get: + summary: 从文件中导入配置项(Ignore策略) + deprecated: false + description: | + 必须要有SuperAdmin权限 + Ignore策略: + 1. 保留现有配置:当导入的配置与现有配置冲突时,会保留现有的配置,忽略导入文件中的冲突项 + 2. 仅添加新项:只会添加那些在现有配置中不存在的新配置项 + 3. 适用场景: + - 当你希望保留现有的已配置好的设置 + - 只想补充添加新的配置项 + - 进行配置合并而非替换时 + operationId: importConfigByZipWithIgnoreConflictNamespace + tags: + - Configs + parameters: + - name: conflictAction in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 + description: must be ignore required: true + example: '' schema: type: string - - name: Authorization + default: ignore + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: OK + headers: {} + security: [] + /envs: + get: + summary: 获取环境 + deprecated: false + description: 根据token获取app的环境 + operationId: envs + tags: + - Env + parameters: + - name: X-Auth-Token in: header description: '' - required: false - example: '' schema: type: string responses: '200': - description: 操作成功 + description: OK content: application/json: schema: type: object - properties: {} + properties: + envs: + type: array + items: + type: string + required: + - envs headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: + /favorites: post: - summary: createItem + summary: 新增收藏App deprecated: false - description: 在指定命名空间中创建新的配置项 + description: '' tags: [] parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' schema: @@ -625,558 +1062,433 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 配置项信息,包含键名、值、类型和备注等 + type: object + properties: + favorite: + $ref: '#/components/schemas/OpenFavoriteDTO' + description: 暂未填充 + required: + - favorite + examples: {} responses: '200': - description: 查询成功,返回详细数据 + description: OK content: application/json: schema: - $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO - example: - dataChangeCreatedBy: 'config-manager' - dataChangeLastModifiedBy: 'config-manager' - dataChangeCreatedTime: '2024-01-20T15:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T15:30:00.000+0800' - key: 'app.log.level' - type: 0 - value: 'INFO' - comment: '应用日志级别配置,控制日志输出详细程度' + type: object + properties: + fav: + $ref: '#/components/schemas/OpenFavoriteDTO' + required: + - fav headers: {} security: [] get: - summary: findItemsByNamespace + summary: 查找收藏 deprecated: false - description: 分页查询指定命名空间下的配置项列表 - tags: [] + description: '' + operationId: findFavorites + tags: + - Fav parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: page + - name: userId in: query - description: 页码,从0开始,用于分页查询配置项列表 - required: true - example: 0 + description: '' + required: false schema: - type: integer - - name: size + type: string + - name: appId in: query - description: 每页记录数,用于控制分页查询每页返回的配置项数量,建议值为50 - required: true - example: 50 + description: '' + required: false schema: - type: integer - - name: Authorization + type: string + - name: X-Auth-Token in: header description: '' schema: type: string responses: '200': - description: 查询成功,返回详细数据 + description: '' content: application/json: schema: - $ref: '#/components/schemas/OpenPageDTOOpenItemDTO' - example: - page: 0 - size: 50 - total: 125 - content: - - dataChangeCreatedBy: 'config-admin' - dataChangeLastModifiedBy: 'developer' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - key: 'database.url' - type: 0 - value: 'jdbc:mysql://localhost:3306/mydb' - comment: '数据库连接URL配置' - - dataChangeCreatedBy: 'config-admin' - dataChangeLastModifiedBy: 'ops-user' - dataChangeCreatedTime: '2024-01-15T11:15:00.000+0800' - dataChangeLastModifiedTime: '2024-01-19T16:45:20.000+0800' - key: 'redis.host' - type: 0 - value: '192.168.1.100' - comment: 'Redis服务器地址配置' - - dataChangeCreatedBy: 'config-manager' - dataChangeLastModifiedBy: 'config-manager' - dataChangeCreatedTime: '2024-01-16T09:20:00.000+0800' - dataChangeLastModifiedTime: '2024-01-16T09:20:00.000+0800' - key: 'app.log.level' - type: 0 - value: 'INFO' - comment: '应用日志级别配置' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName:.+}: - get: - summary: getCluster - deprecated: false - description: 获取指定集群的详细信息 - tags: [] + type: object + properties: + favs: + type: array + items: + $ref: '#/components/schemas/OpenFavoriteDTO' + required: + - favs + headers: {} + security: [] + /favorites/{favoriteId}: + delete: + summary: 删除收藏 + deprecated: false + description: '' + operationId: deleteFavorite + tags: + - Fav parameters: - - name: appId + - name: favoriteId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' + - name: X-Auth-Token + in: header + description: '' schema: type: string - - name: clusterName + responses: + '200': + description: '' + headers: {} + security: [] + put: + summary: 置顶收藏 + deprecated: false + description: '' + operationId: toTop + tags: + - Fav + parameters: + - name: favoriteId in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' - required: false - example: '' schema: type: string responses: '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenClusterDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenClusterDTO - example: - dataChangeCreatedBy: 'cluster-admin' - dataChangeLastModifiedBy: 'ops-user' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - name: 'default' - appId: 'user-management-service' + description: OK headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters: - post: - summary: createCluster + /global-search/item-info/by-key-or-value: + get: + summary: 根据key&value搜索配置项 deprecated: false - description: 在指定环境下为应用创建新的集群 - tags: [] + description: 必须要有superAdmin权限 + operationId: getItemInfoBySearch + tags: + - Item parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' + - name: key + in: query + description: '' + required: false schema: type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' + default: '""' + - name: value + in: query + description: '' + required: false schema: type: string - - name: Authorization + default: '""' + - name: X-Auth-Token in: header description: '' schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenClusterDTO' - description: 集群配置信息,包含集群名称、应用ID和创建者等 responses: '200': - description: 查询成功,返回详细数据 + description: OK content: application/json: schema: - $ref: '#/components/schemas/OpenClusterDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenClusterDTO - example: - dataChangeCreatedBy: 'cluster-admin' - dataChangeLastModifiedBy: 'cluster-admin' - dataChangeCreatedTime: '2024-01-20T16:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T16:30:00.000+0800' - name: 'beijing-cluster' - appId: 'user-management-service' + type: object + properties: + items: + type: array + items: + $ref: '#/components/schemas/OpenItemInfo' + required: + - items headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: - post: - summary: createRelease + /envs/{env}/instances/by-release: + get: + summary: 根据env&releaseId查询instance deprecated: false - description: 发布指定命名空间的配置变更 - tags: [] + description: '' + operationId: getByRelease + tags: + - Instance parameters: - - name: appId + - name: env in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + - name: releaseId + in: query + description: '' required: true - example: '' schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + type: integer + format: long + - name: page + in: query + description: '' required: true - example: '' schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + type: integer + format: int32 + default: 0 + - name: size + in: query + description: '' required: true - example: '' schema: - type: string - - name: Authorization + type: integer + format: int32 + default: 20 + - name: X-Auth-Token in: header description: '' schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - description: 发布配置信息,包含发布标题、发布者和发布备注等 responses: '200': - description: 查询成功,返回详细数据 + description: OK content: application/json: schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO - example: - dataChangeCreatedBy: 'release-manager' - dataChangeLastModifiedBy: 'release-manager' - dataChangeCreatedTime: '2024-01-20T17:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T17:30:00.000+0800' - id: 12345 - appId: 'user-management-service' - clusterName: 'default' - namespaceName: 'application' - name: 'Release-20240120-v1.2.0' - configurations: - 'database.url': 'jdbc:mysql://localhost:3306/mydb' - 'redis.host': '192.168.1.100' - 'app.log.level': 'INFO' - comment: '更新数据库连接配置,修复Redis连接超时问题' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: - get: - summary: loadLatestActiveRelease - deprecated: false - description: 获取指定命名空间的最新有效发布版本 - tags: [] + type: object + properties: + result: + $ref: '#/components/schemas/OpenPageDTO%3CT%3E' + required: + - result + headers: {} + security: [] + /envs/{env}/instances/by-namespace: + get: + summary: 根据namespace获取instance + deprecated: false + description: '' + operationId: getByNamespace + tags: + - Instance parameters: - - name: appId + - name: env in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + - name: appId + in: query + description: '' required: true - example: '' schema: type: string - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + in: query + description: '' required: true - example: '' schema: type: string - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + in: query + description: '' required: true - example: '' schema: type: string - - name: Authorization + - name: instanceAppId + in: query + description: '' + required: false + schema: + type: string + - name: page + in: query + description: '' + required: true + schema: + type: integer + format: int32 + default: 0 + minimum: 0 + - name: size + in: query + description: '' + required: true + schema: + type: integer + format: int32 + default: 20 + minimum: 0 + exclusiveMinimum: true + - name: X-Auth-Token in: header description: '' schema: type: string responses: '200': - description: 查询成功,返回详细数据 + description: OK content: application/json: schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO - example: - dataChangeCreatedBy: 'release-manager' - dataChangeLastModifiedBy: 'ops-admin' - dataChangeCreatedTime: '2024-01-20T17:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T18:15:25.000+0800' - id: 12345 - appId: 'user-management-service' - clusterName: 'default' - namespaceName: 'application' - name: 'Release-20240120-v1.2.0' - configurations: - 'database.url': 'jdbc:mysql://localhost:3306/mydb' - 'redis.host': '192.168.1.100' - 'app.log.level': 'INFO' - 'server.port': '8080' - comment: '最新生产环境配置发布,包含数据库和缓存配置更新' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: - post: - summary: merge + $ref: '#/components/schemas/OpenPageDTO%3CT%3E' + headers: {} + security: [] + /envs/{env}/instances/by-namespace/count: + get: + summary: 根据namespace获取instance数量 deprecated: false - description: 将灰度分支的配置合并到主分支并发布 + description: '' tags: [] parameters: - - name: appId + - name: env in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + - name: appId + in: query + description: '' required: true - example: '' schema: type: string - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + in: query + description: '' required: true - example: '' schema: type: string - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: branchName - in: path - description: 灰度分支名称,用于标识灰度发布的分支 - required: true - example: '' - schema: - type: string - - name: deleteBranch in: query - description: 合并完成后是否删除灰度分支 + description: '' required: true - example: 'true' schema: - type: boolean - - name: Authorization + type: string + - name: X-Auth-Token in: header description: '' schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - description: 发布配置信息,包含发布标题、发布者和发布备注等 responses: '200': - description: 查询成功,返回详细数据 + description: OK content: application/json: schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - id: 0 - appId: '' - clusterName: '' - namespaceName: '' - name: '' - configurations: - '': '' - comment: '' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: - post: - summary: createGrayRelease + type: object + properties: + count: + type: integer + required: + - count + headers: {} + security: [] + /envs/{env}/instances/by-namespace-and-releases-not-in: + get: + summary: 根据namespace&releaseId获取不在env中的instance deprecated: false - description: 创建灰度发布,将分支配置发布给特定用户群体 + description: '' tags: [] parameters: - - name: appId + - name: env in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + - name: appId + in: query + description: '' required: true - example: '' schema: type: string - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + in: query + description: '' required: true - example: '' schema: type: string - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + in: query + description: '' required: true - example: '' schema: type: string - - name: branchName - in: path - description: 灰度分支名称,用于标识灰度发布的分支 + - name: releaseIds + in: query + description: '' required: true - example: '' schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - description: 发布配置信息,包含发布标题、发布者和发布备注等 responses: '200': - description: 查询成功,返回详细数据 + description: OK content: application/json: schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - id: 0 - appId: '' - clusterName: '' - namespaceName: '' - name: '' - configurations: - '': '' - comment: '' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases: - post: - summary: createGrayDelRelease + type: object + properties: + result: + type: array + items: + $ref: '#/components/schemas/OpenInstanceDTO' + required: + - result + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items: + put: + summary: 基于文本修改item deprecated: false - description: 创建灰度删除发布,删除指定的配置项并发布给特定用户群体 - tags: [] + description: 具有修改item的权限 + operationId: modifyItemsByText + tags: + - Item parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: branchName - in: path - description: 灰度分支名称,用于标识灰度发布的分支 + description: '' required: true - example: '' schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' schema: @@ -1185,138 +1497,112 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/NamespaceGrayDelReleaseDTO' - description: 灰度删除发布配置信息,包含要删除的配置项键名列表 + type: object + properties: + model: + $ref: '#/components/schemas/OpenNamespaceTextModel' + required: + - model + examples: {} responses: '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - id: 0 - appId: '' - clusterName: '' - namespaceName: '' - name: '' - configurations: - '': '' - comment: '' - headers: {} - security: [] - /openapi/v1/envs/{env}/releases/{releaseId}/rollback: - put: - summary: rollback + description: OK + headers: {} + security: [] + get: + summary: 查询item deprecated: false - description: 回滚到指定的发布版本 - tags: [] + description: '' + operationId: findItems + tags: + - Item parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - - name: releaseId + - name: clusterName in: path - description: 发布记录的唯一标识符,用于标识特定的配置发布版本 + description: '' required: true - example: 0 schema: - type: integer - - name: operator + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: orderBy in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 + description: '' required: true schema: type: string - - name: Authorization + default: lineNum + - name: X-Auth-Token in: header description: '' schema: type: string responses: '200': - description: 操作成功 + description: OK content: application/json: schema: type: object - properties: {} + properties: + items: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + required: + - items headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: - get: - summary: getInstanceCountByNamespace + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/item: + post: + summary: 创建item deprecated: false - description: 获取指定命名空间的客户端实例数量 - tags: [] + description: '' + operationId: createItem + tags: + - Item parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: Authorization - in: header description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回统计数据 - content: - application/json: - schema: - type: integer - example: 15 - headers: {} - security: [] - /openapi/v1/apps/{appId}/appnamespaces: - post: - summary: createNamespace - deprecated: false - description: 为指定应用创建新的命名空间 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 required: true - example: '' schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' schema: @@ -1325,632 +1611,496 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - description: 应用命名空间配置信息,包含命名空间名称、格式类型等 + type: object + properties: + item: + $ref: '#/components/schemas/OpenItemDTO' + required: + - item + examples: {} responses: '200': - description: 查询成功,返回详细数据 + description: OK content: application/json: schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenAppNamespaceDTO - example: - dataChangeCreatedBy: 'namespace-admin' - dataChangeLastModifiedBy: 'namespace-admin' - dataChangeCreatedTime: '2024-01-20T18:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T18:30:00.000+0800' - name: 'database-config' - appId: 'user-management-service' - format: 'properties' - isPublic: false - appendNamespacePrefix: true - comment: '数据库相关配置命名空间,包含数据库连接、连接池等配置' + type: object + properties: + result: + $ref: '#/components/schemas/OpenItemDTO' + required: + - result headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: get: - summary: findNamespaces + summary: 修改item deprecated: false - description: 查询指定集群下的所有命名空间列表 - tags: [] + description: 需要具有修改item的权限 + operationId: updateItem + tags: + - Item parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - - name: fillItemDetail - in: query - description: 是否填充配置项详细信息,true表示返回配置项列表,false表示只返回命名空间基本信息 + - name: namespaceName + in: path + description: '' required: true - example: 'true' schema: - type: boolean - - name: Authorization + type: string + - name: X-Auth-Token in: header description: '' schema: type: string responses: '200': - description: 查询成功,返回数据列表 - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO - example: - - dataChangeCreatedBy: 'namespace-creator' - dataChangeLastModifiedBy: 'config-editor' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - appId: 'user-management-service' - clusterName: 'default' - namespaceName: 'application' - comment: '应用主配置命名空间,包含核心业务配置' - format: 'properties' - isPublic: false - items: - - dataChangeCreatedBy: 'config-admin' - dataChangeLastModifiedBy: 'developer' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - key: 'database.url' - type: 0 - value: 'jdbc:mysql://localhost:3306/mydb' - comment: '数据库连接URL配置' - - dataChangeCreatedBy: 'namespace-creator' - dataChangeLastModifiedBy: 'config-manager' - dataChangeCreatedTime: '2024-01-16T09:20:00.000+0800' - dataChangeLastModifiedTime: '2024-01-18T15:30:10.000+0800' - appId: 'user-management-service' - clusterName: 'default' - namespaceName: 'database-config' - comment: '数据库专用配置命名空间' - format: 'properties' - isPublic: false - items: - - dataChangeCreatedBy: 'dba-admin' - dataChangeLastModifiedBy: 'dba-admin' - dataChangeCreatedTime: '2024-01-16T09:25:00.000+0800' - dataChangeLastModifiedTime: '2024-01-18T15:30:10.000+0800' - key: 'connection.pool.size' - type: 0 - value: '20' - comment: '数据库连接池大小配置' + description: '' headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName:.+}: + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{itemId}: get: - summary: loadNamespace + summary: 删除item deprecated: false - description: 获取指定命名空间的详细信息和配置项 - tags: [] + description: 需要具有修改item的权限 + operationId: deleteItem + tags: + - Item parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' required: true - example: '' schema: type: string - - name: fillItemDetail - in: query - description: 是否填充配置项详细信息,true表示返回配置项列表,false表示只返回命名空间基本信息 + - name: itemId + in: path + description: '' required: true - example: 'true' schema: - type: boolean - - name: Authorization + type: string + - name: X-Auth-Token in: header description: '' - required: false - example: '' schema: type: string responses: '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - appId: '' - clusterName: '' - namespaceName: '' - comment: '' - format: '' - isPublic: false - items: - - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - key: '' - type: 0 - value: '' - comment: '' + description: '' headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: get: - summary: getNamespaceLock + summary: 查询具体branch的item deprecated: false - description: 获取指定命名空间的锁定状态信息 + description: '' tags: [] parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' required: true - example: '' schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' schema: type: string responses: '200': - description: 查询成功,返回详细数据 + description: '' content: application/json: schema: - $ref: '#/components/schemas/OpenNamespaceLockDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceLockDTO - example: - namespaceName: 'application' - isLocked: true - lockedBy: 'config-admin' + type: object + properties: + items: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + required: + - items headers: {} security: [] - /openapi/v1/organizations: + /namespaces/{namespaceName}/diff: get: - summary: getOrganization + summary: 根据namespace比较item的差异 deprecated: false - description: 获取系统中所有组织的列表信息 + description: '' + operationId: diff tags: [] parameters: - - name: Authorization + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token in: header description: '' schema: type: string responses: '200': - description: 查询成功,返回数据列表 + description: OK content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/OpenOrganizationDto' - description: com.ctrip.framework.apollo.openapi.dto.OpenOrganizationDto - example: - - orgId: 'tech-dept' - orgName: '技术部' - - orgId: 'business-dept' - orgName: '业务部' - - orgId: 'finance-dept' - orgName: '财务部' - - orgId: 'ops-dept' - orgName: '运维部' + type: object + properties: + diffs: + type: array + items: + $ref: '#/components/schemas/OpenItemDiffs' + required: + - diffs headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches: + /apps/{appId}/namespaces/{namespaceName}/items: get: - summary: findBranch + summary: 根据appId&namespace更新item deprecated: false - description: 查找指定命名空间的灰度分支信息 + description: '' tags: [] parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' required: true - example: '' schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' schema: type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + model: + $ref: '#/components/schemas/OpenNamespaceSyncModel' + required: + - model + examples: {} responses: '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO - example: - dataChangeCreatedBy: 'gray-release-admin' - dataChangeLastModifiedBy: 'config-editor' - dataChangeCreatedTime: '2024-01-20T19:00:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T20:15:30.000+0800' - appId: 'user-management-service' - clusterName: 'gray-branch-20240120' - namespaceName: 'application' - comment: '灰度发布分支,用于测试新配置' - format: 'properties' - isPublic: false - items: - - dataChangeCreatedBy: 'gray-release-admin' - dataChangeLastModifiedBy: 'config-editor' - dataChangeCreatedTime: '2024-01-20T19:05:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T20:15:30.000+0800' - key: 'feature.new-algorithm.enabled' - type: 0 - value: 'true' - comment: '新算法功能开关,灰度测试用' - - dataChangeCreatedBy: 'gray-release-admin' - dataChangeLastModifiedBy: 'gray-release-admin' - dataChangeCreatedTime: '2024-01-20T19:10:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T19:10:00.000+0800' - key: 'cache.timeout' - type: 0 - value: '300' - comment: '缓存超时时间,灰度环境专用配置' + description: OK headers: {} security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/syntax-check: post: - summary: createBranch + summary: item配置语法检查 deprecated: false - description: 为指定命名空间创建灰度发布分支 - tags: [] + description: '' + operationId: syntaxCheckText + tags: + - Item parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: operator - in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 + description: '' required: true schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' schema: type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + model: + $ref: '#/components/schemas/OpenNamespaceTextModel' + required: + - model + examples: {} responses: '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - appId: '' - clusterName: '' - namespaceName: '' - comment: '' - format: '' - isPublic: false - items: - - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - key: '' - type: 0 - value: '' - comment: '' + description: OK headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: - delete: - summary: deleteBranch + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/revoke-items: + put: + summary: 撤回item配置 deprecated: false - description: 删除指定的灰度发布分支 - tags: [] + description: '' + operationId: revokeItems + tags: + - Item parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' required: true - example: '' schema: type: string - - name: branchName + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: OK + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches: + get: + summary: 创建灰度Branch + deprecated: false + description: '' + operationId: createBranch + tags: + - Branch + parameters: + - name: appId in: path - description: 灰度分支名称,用于标识灰度发布的分支 + description: '' required: true - example: '' schema: type: string - - name: operator - in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' required: true schema: type: string - - name: Authorization + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token in: header description: '' schema: type: string responses: '200': - description: 操作成功 + description: OK content: application/json: schema: type: object - properties: {} + properties: + result: + $ref: '#/components/schemas/OpenNamespaceDTO' + required: + - result headers: {} security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules: - get: - summary: getBranchGrayRules + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: + delete: + summary: 删除灰度分支 deprecated: false - description: 获取灰度分支的发布规则配置 - tags: [] + description: '' + operationId: deleteBranch + tags: + - Branch parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' required: true - example: '' schema: type: string - name: branchName in: path - description: 灰度分支名称,用于标识灰度发布的分支 + description: '' required: true - example: '' schema: type: string - - name: Authorization + - name: X-Auth-Token in: header description: '' schema: type: string responses: '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenGrayReleaseRuleDTO - example: - dataChangeCreatedBy: 'gray-release-admin' - dataChangeLastModifiedBy: 'ops-manager' - dataChangeCreatedTime: '2024-01-20T19:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T20:45:15.000+0800' - appId: 'user-management-service' - clusterName: 'default' - namespaceName: 'application' - branchName: 'gray-branch-20240120' - ruleItems: - - clientAppId: 'mobile-app' - clientIpList: - - '192.168.1.100' - - '192.168.1.101' - - '10.0.0.50' - clientLabelList: - - 'beta-user' - - 'internal-test' - - clientAppId: 'web-frontend' - clientIpList: - - '192.168.2.10' - - '192.168.2.11' - clientLabelList: - - 'canary-group' - - 'qa-team' + description: OK headers: {} security: [] - put: - summary: updateBranchRules + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: + post: + summary: 合并分支 deprecated: false - description: 更新灰度分支的发布规则配置 - tags: [] + description: '' + operationId: merge + tags: + - Branch parameters: - name: appId in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 + description: '' required: true - example: '' schema: type: string - name: env in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + description: '' required: true - example: '' schema: type: string - name: clusterName in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default + description: '' required: true - example: '' schema: type: string - name: namespaceName in: path - description: 命名空间名称,用于组织和管理配置项,默认为application + description: '' required: true - example: '' schema: type: string - name: branchName in: path - description: 灰度分支名称,用于标识灰度发布的分支 + description: '' required: true - example: '' schema: type: string - - name: operator + - name: deleteBranch in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 + description: '' required: true schema: - type: string - - name: Authorization + type: boolean + default: true + - name: X-Auth-Token in: header description: '' schema: @@ -1959,541 +2109,5470 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' - description: 灰度发布规则配置,包含灰度规则项列表和生效条件 + type: object + properties: + model: + $ref: '#/components/schemas/OpenNamespaceReleaseModel' + required: + - model + examples: {} responses: '200': - description: 操作成功 + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + headers: {} + '400': + description: '' content: application/json: schema: type: object - properties: {} + properties: + status: + type: integer + message: + type: string + timestamp: + type: string + exception: + type: string + required: + - status + - message + - timestamp + - exception + example: + status: 400 + message: 'Env: dev is not supported emergency publish now' + timestamp: '2024-05-29T09:00:00' + exception: >- + com.ctrip.framework.apollo.common.exception.BadRequestException headers: {} security: [] -components: - schemas: - OpenAppDTO: - type: object - description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - required: - - appId - - name - - ownerName - - ownerEmail - properties: - dataChangeCreatedBy: - type: string - description: 数据创建者用户名,记录是谁创建了这个应用 - example: apollo-admin - dataChangeLastModifiedBy: - type: string - description: 数据最后修改者用户名,记录最后一次修改应用信息的用户 - example: john.doe - dataChangeCreatedTime: - type: string - description: 数据创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 数据最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - name: - type: string - description: 应用名称,用于显示的友好名称 - example: 用户管理系统 - appId: - type: string - description: 应用唯一标识符,全局唯一的应用ID - example: user-management-service - orgId: - type: string - description: 组织ID,应用所属组织的唯一标识 - example: tech-dept - orgName: - type: string - description: 组织名称,应用所属组织的显示名称 - example: 技术部 - ownerName: - type: string - description: 应用负责人姓名,应用的主要负责人 - example: 张三 - ownerEmail: - type: string - description: 应用负责人邮箱地址,用于接收应用相关通知 - example: zhangsan@company.com - OpenCreateAppDTO: - type: object - description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - required: - - app - properties: - assignAppRoleToSelf: - type: boolean - description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - example: true - admins: - type: array - items: + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules: + get: + summary: 更新分支规则 + deprecated: false + description: 需要有操作namespace的权限 + operationId: updateBranchRules + tags: + - Branch + parameters: + - name: appId + in: path + description: '' + required: true + schema: type: string - description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - example: - - admin - - john.doe - - jane.smith - app: - $ref: '#/components/schemas/OpenAppDTO' - description: 应用基本信息,包含应用的详细配置数据 - OpenEnvClusterDTO: - type: object - description: 环境集群信息数据传输对象,表示特定环境下的集群列表 - required: - - env - - clusters - properties: - env: - type: string - description: 环境名称,如开发环境、测试环境、生产环境等 - example: DEV - clusters: - type: array - items: + - name: env + in: path + description: '' + required: true + schema: type: string - description: 该环境下的集群名称列表,每个集群代表一个部署单元 - example: - - default - - cluster-1 - - cluster-2 - OpenItemDTO: - type: object - description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - required: - - key - - value - properties: - dataChangeCreatedBy: - type: string - description: 配置项创建者用户名,记录是谁创建了这个配置项 - example: config-admin - dataChangeLastModifiedBy: - type: string - description: 配置项最后修改者用户名,记录最后一次修改配置的用户 - example: developer - dataChangeCreatedTime: - type: string - description: 配置项创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 配置项最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - key: - type: string - description: 配置项的键名,在同一命名空间内唯一标识一个配置项 - example: database.url - type: - type: integer - description: 配置项类型,0表示普通配置项,1表示文件类型配置项 - example: 0 - value: - type: string - description: 配置项的值,可以是字符串、数字、JSON等格式 - example: jdbc:mysql://localhost:3306/mydb - comment: - type: string - description: 配置项的注释说明,用于描述配置项的用途和含义 - example: 数据库连接URL配置 - OpenPageDTOOpenItemDTO: - type: object - description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - properties: - page: - type: integer - description: 当前页码,从0开始计数 - example: 0 - size: - type: integer - description: 每页显示的记录数量 - example: 20 - total: - type: integer - description: 总记录数,符合查询条件的配置项总数量 - format: int64 - example: 150 + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: content: - type: array - items: - $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO - description: 当前页的配置项列表,包含具体的配置项数据 - OpenClusterDTO: - type: object - description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - required: - - name - - appId - - dataChangeCreatedBy - properties: - dataChangeCreatedBy: - type: string - description: 集群创建者用户名,记录是谁创建了这个集群 - example: cluster-admin - dataChangeLastModifiedBy: - type: string - description: 集群最后修改者用户名,记录最后一次修改集群信息的用户 - example: ops-user - dataChangeCreatedTime: - type: string - description: 集群创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 集群最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - name: - type: string - description: 集群名称,在同一应用和环境下唯一标识一个集群 - example: default - appId: - type: string - description: 所属应用的唯一标识符 - example: user-management-service - MapString: - type: object - description: 字符串映射对象,用于表示键值对的配置数据结构 - additionalProperties: - type: string - description: 配置项的值,键为配置项名称,值为配置项内容 - example: configuration-value - properties: {} - example: - database.url: jdbc:mysql://localhost:3306/mydb - redis.host: localhost - app.name: MyApplication - OpenReleaseDTO: - type: object - description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - properties: - dataChangeCreatedBy: - type: string - description: 发布创建者用户名,记录是谁创建了这次发布 - example: release-manager - dataChangeLastModifiedBy: - type: string - description: 发布最后修改者用户名,记录最后一次修改发布信息的用户 - example: ops-admin - dataChangeCreatedTime: - type: string - description: 发布创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 发布最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - id: - type: integer - description: 发布记录的唯一标识符,系统自动生成 - format: int64 - example: 12345 - appId: - type: string - description: 所属应用的唯一标识符 - example: user-management-service - clusterName: - type: string - description: 所属集群的名称 - example: default - namespaceName: - type: string - description: 所属命名空间的名称 - example: application - name: - type: string - description: 发布名称,用于标识这次发布的版本或描述 - example: Release-20240120-v1.2.0 - configurations: - $ref: '#/components/schemas/MapString' - description: 本次发布包含的所有配置项键值对 - comment: - type: string - description: 发布备注,描述本次发布的变更内容和目的 - example: 更新数据库连接配置,修复Redis连接超时问题 + application/json: + schema: + type: object + properties: + rules: + $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' + required: + - rules + examples: {} + responses: + '200': + description: OK + headers: {} + '403': + description: '' + content: + application/json: + schema: + type: object + properties: + status: + type: integer + message: + type: string + timestamp: + type: string + exception: + type: string + required: + - status + - message + - timestamp + - exception + example: + status: 403 + message: Access is denied + timestamp: '2024-05-29T09:00:00' + exception: org.springframework.security.access.AccessDeniedException + headers: {} + security: [] + /appnamespaces/public: + get: + summary: 查询公开的AppNamespace + deprecated: false + description: '' + operationId: findPublicAppNamespaces + tags: + - NameSpace + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AppNamespace' + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces: + get: + summary: 查询Namespace + deprecated: false + description: 基于appId、env、cluster查询namespace + operationId: findNamespaces + tags: + - NameSpace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenNamespaceBO' + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}: + get: + summary: 根据appId&env&cluster&namespaceName查询Namespaces + deprecated: false + description: '' + operationId: findNamespace + tags: + - NameSpace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceBO' + headers: {} + security: [] + /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace: + get: + summary: 查询与namespace相关的公开namespace + deprecated: false + description: '' + operationId: findPublicNamespaceForAssociatedNamespace + tags: + - Namespace + - Env + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + headers: {} + security: [] + /apps/{appId}/namespaces: + post: + summary: 根据AppID创建App的namespace + deprecated: false + description: 需要有创建某app的namespace的权限 + operationId: createNamespace + tags: + - NameSpace + - Apps + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenNamespaceCreationModel' + examples: {} + responses: + '200': + description: OK + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + const: '403' + message: + type: string + timestamp: + type: string + format: time + exception: + type: string + description: AccessDeniedException.class + required: + - status + - message + - exception + - timestamp + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/linked-namespaces/{namespaceName:.+}: + delete: + summary: 删除Namespace + deprecated: false + description: '' + operationId: deleteLinkedNamespace + tags: + - Apps + - Env + - Namespace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName:.+ + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/linked-namespaces/{namespaceName}/usage: + get: + summary: 查询Namespace的用量 + deprecated: false + description: '' + tags: [] + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NamespaceUsage' + headers: {} + security: [] + /apps/{appId}/appnamespaces/{namespaceName:.+}: + delete: + summary: 删除AppNamespace + deprecated: false + description: '' + operationId: deleteAppNamespace + tags: + - Apps + - Namespace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName:.+ + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + security: [] + /apps/{appId}/namespaces/publish_info: + get: + summary: 获取namespace的publish相关信息 + deprecated: false + description: 根据appid查询namespace的发布信息 + operationId: getNamespacesPublishInfo + tags: + - NameSpace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + additionalProperties: + type: object + properties: + env_name: + type: object + properties: {} + additionalProperties: + type: object + properties: + String: + type: boolean + required: + - String + required: + - env_name + headers: {} + security: [] + /apps/{appId}/appnamespaces: + post: + summary: 创建AppNamespace(疑似重复接口) + deprecated: false + description: '' + operationId: createAppNamespace + tags: + - Apps + - Namespace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: appendNamespacePrefix + in: query + description: '' + required: false + schema: + type: boolean + default: true + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AppNamespace' + examples: {} + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AppNamespace' + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + security: [] + /envs/{env}/appnamespaces/{publicNamespaceName}/namespaces: + get: + summary: 获取publicNamespace的全部namespace + deprecated: false + description: '' + tags: + - NameSpace + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: publicNamespaceName + in: path + description: '' + required: true + schema: + type: string + - name: page + in: query + description: '' + required: true + schema: + type: integer + format: int32 + default: 0 + minimum: 0 + - name: size + in: query + description: '' + required: true + schema: + type: integer + format: int32 + minimum: 1 + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenNamespaceDTO' + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces: + get: + summary: 创建缺失的namespace + deprecated: false + description: 根据appId&env&cluster,创建缺失的namespace(e.g 创建新env) + tags: [] + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: OK + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/lock-info: + get: + summary: 查询namespace的lock信息 + deprecated: false + description: '' + operationId: getNamespaceLockInfo + tags: + - NameSpace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OpenLockInfo' + headers: {} + security: [] + /apps/{appId}/initPermission: + post: + summary: 初始化权限许可 + deprecated: false + description: >- + 补齐某个 Namespace + 在各环境(或集群)中的默认“编辑”和“发布”权限角色。当历史数据或新环境缺少这些角色时,通过该接口即可一键创建,以保证权限体系完整。 + operationId: initAppPermission + tags: [] + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + namespaceName: + example: '' + type: string + examples: {} + responses: + '200': + description: OK + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/initNsPermission: + post: + summary: 初始化clusterNamespace的权限许可 + deprecated: false + description: '' + operationId: initClusterNamespacePermission + tags: + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: OK + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + security: [] + /apps/{appId}/permissions/{permissionType}: + get: + summary: 应用级权限检查 + deprecated: false + description: 判断当前用户在指定应用上的权限,比如能否创建 Namespace、创建集群、分配权限 + operationId: hasPermission + tags: + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: permissionType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OpenPermissionCondition' + headers: {} + security: [] + /apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType}: + get: + summary: Namespace(不含环境)权限检查 + deprecated: false + description: 构造目标 ID,检查用户对某个 Namespace 的权限,通常用于默认集群或多环境通用的场景。 + operationId: hasPermission + tags: + - Permission + - App + - Namespace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: permissionType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OpenPermissionCondition' + headers: {} + security: [] + /apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType}: + get: + summary: 带环境的 Namespace 权限检查 + deprecated: false + description: 针对具体环境的 Namespace,根据目标ID判断 + tags: [] + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: permissionType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OpenPermissionCondition' + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/ns_permissions/{permissionType}: + get: + summary: 根据appId&env&clusterName&permissionType查询是否具有Permission + deprecated: false + description: '' + operationId: hasClusterNamespacePermission + tags: + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: permissionType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + headers: {} + security: [] + /permissions/root: + get: + summary: root权限检查 + deprecated: false + description: '' + operationId: hasRootPermission + tags: + - Namespace + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenPermissionCondition' + headers: {} + security: [] + /apps/{appId}/envs/{env}/namespaces/{namespaceName}/role_users: + get: + summary: 获得指定环境下的namespace权限角色 + deprecated: false + description: '' + operationId: getNamespaceEnvRoles + tags: + - Namespace + - Env + - Apps + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceEnvRolesAssignedUsers' + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 状态 + example: '400' + message: + type: string + description: 错误信息 + example: invalid env format:YOUR ENV + timestamp: + type: string + format: date-time + exception: + type: string + example: BadRequestion + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType}: + post: + summary: 给用户分配NamespaceEnv角色 + deprecated: false + description: '' + operationId: assignNamespaceEnvRoleToUser + tags: + - Apps + - Env + - NameSpace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: roleType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 状态 + example: '400' + message: + type: string + example: user not exists for userName:YOUR USER NAME + timestamp: + type: string + format: date-time + exception: + type: string + example: BadRequestExeception + required: + - status + - message + - timestamp + - exception + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + message: + type: string + example: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:请求体为空: + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + example: '400' + message: + type: string + example: request payload should not be contain empty. + timestamp: + type: string + format: date-time + exception: + type: string + example: BadRequestionException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:roleType格式错误: + description: '' + content: + application/json: + schema: + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + example: invalid roleType format:YOUR ROLE TYPE + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:Env格式错误: + description: '' + content: + application/json: + schema: + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + example: invalid env format:YOUR ENV + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:用户已授权: + description: '' + content: + application/json: + schema: + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + example: YOUR USERNAME already authorized + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + delete: + summary: 移除用户的NamespaceEnv角色 + deprecated: false + description: '' + operationId: removeNamespaceEnvRoleFromUser + tags: + - Apps + - Env + - NameSpace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: roleType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: {} + examples: {} + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: roleType格式无效 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^invalid roleType format:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:Env格式无效: + description: '' + content: + application/json: + schema: + title: Env格式无效 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^invalid env format:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:请求体为空: + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + example: '400' + message: + type: string + example: request payload should not be contain empty. + timestamp: + type: string + format: date-time + exception: + type: string + example: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/ns_role_users: + get: + summary: 获取集群条件下的Namespace角色 + deprecated: false + description: '' + operationId: getClusterNamespaceRoles + tags: + - Apps + - Env + - Namespace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ClusterNamespaceRolesAssignedUsers' + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: Env格式无效 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^invalid env format:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/ns_roles/{roleType}: + post: + summary: 给用户分配ClusterNamespace角色 + deprecated: false + description: '' + operationId: assignClusterNamespaceRoleToUser + tags: + - Apps + - Clusters + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: roleType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + user: + example: '' + type: string + examples: {} + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: Env格式无效 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^invalid env format:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:用户不存在: + description: '' + content: + application/json: + schema: + title: 用户不存在 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^user not exists for userName:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:请求体为空: + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + example: '400' + message: + type: string + example: request payload should not be contain empty. + timestamp: + type: string + format: date-time + exception: + type: string + example: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + delete: + summary: 移除用户的ClusterNamespace角色 + deprecated: false + description: '' + operationId: removeClusterNamespaceRoleFromUser + tags: + - Apps + - Clusters + - Env + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: roleType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + user: + example: '' + type: string + examples: {} + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: roleType格式无效 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^invalid roleType format:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:Env格式无效: + description: '' + content: + application/json: + schema: + title: Env格式无效 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^invalid env format:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:请求体为空: + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + example: '400' + message: + type: string + example: request payload should not be contain empty. + timestamp: + type: string + format: date-time + exception: + type: string + example: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /apps/{appId}/namespaces/{namespaceName}/role_users: + get: + summary: 获取Namespace角色 + deprecated: false + description: '' + tags: + - Apps + - Namespace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/NamespaceRolesAssignedUsers' + headers: {} + security: [] + /apps/{appId}/namespaces/{namespaceName}/roles/{roleType}: + post: + summary: 给用户分配namespace角色 + deprecated: false + description: '' + operationId: assignNamespaceRoleToUser + tags: + - Apps + - NameSpace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: roleType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + user: + example: '' + type: string + examples: {} + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: roleType格式无效 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^invalid roleType format:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + x-400:用户不存在: + description: '' + content: + application/json: + schema: + title: 用户不存在 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^user not exists for userName:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:用户已被授权: + description: '' + content: + application/json: + schema: + title: 用户已被授权 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^(.+) already authorized$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + delete: + summary: 移除用户的Namespace角色 + deprecated: false + description: '' + tags: + - Apps + - Namespace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: roleType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: roleType格式无效 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^invalid roleType format:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + x-400:请求体为空: + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + example: '400' + message: + type: string + example: request payload should not be contain empty. + timestamp: + type: string + format: date-time + exception: + type: string + example: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /apps/{appId}/role_users: + get: + summary: 获取App角色 + deprecated: false + description: '' + operationId: getAppRoles + tags: + - Apps + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AppRolesAssignedUsers' + headers: {} + security: [] + /apps/{appId}/roles/{roleType}: + post: + summary: 给用户分配App角色 + deprecated: false + description: '' + operationId: assignAppRoleToUser + tags: + - Apps + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: roleType + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + user: + example: '' + type: string + examples: {} + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: roleType格式无效 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^invalid roleType format:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:用户不存在: + description: '' + content: + application/json: + schema: + title: 用户不存在 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^user not exists for userName:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:用户已被授权: + description: '' + content: + application/json: + schema: + title: 用户已被授权 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^(.+) already authorized$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:请求体为空: + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + example: '400' + message: + type: string + example: request payload should not be contain empty. + timestamp: + type: string + format: date-time + exception: + type: string + example: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + delete: + summary: 移除用户的App角色 + deprecated: false + description: '' + operationId: removeAppRoleFromUser + tags: + - Apps + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: roleType + in: path + description: '' + required: true + schema: + type: string + - name: user + in: query + description: '' + required: false + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: roleType格式无效 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^invalid roleType format:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + x-400:用户不存在: + description: '' + content: + application/json: + schema: + title: 用户不存在 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^user not exists for userName:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:请求体为空: + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + example: '400' + message: + type: string + example: request payload should not be contain empty. + timestamp: + type: string + format: date-time + exception: + type: string + example: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /system/role/createApplication: + get: + summary: 获取具有创建App角色的用户 + deprecated: false + description: '' + operationId: getCreateApplicationRoleUsers + tags: + - Apps + - Permission + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + type: string + headers: {} + security: [] + post: + summary: 为用户分配 创建App角色 + deprecated: false + description: '' + operationId: addCreateApplicationRoleToUser + tags: + - Apps + - Permission + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + userIds: + type: array + items: + type: string + required: + - userIds + examples: {} + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: 用户不存在 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^user not exists for userName:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + security: [] + /system/role/createApplication/{userId}: + get: + summary: 查询用户是否具有创建App的权限 + deprecated: false + description: '' + operationId: hasCreateApplicationPermission + tags: + - Apps + - Permission + parameters: + - name: userId + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + hasCreateApplicationPermission: + type: boolean + required: + - hasCreateApplicationPermission + headers: {} + security: [] + delete: + summary: 删除用户的创建App的角色 + deprecated: false + description: '' + operationId: deleteCreateApplicationRoleFromUser + tags: + - Apps + - Permission + parameters: + - name: userId + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: 用户不存在 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^user not exists for userName:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + security: [] + /apps/{appId}/system/master/{userId}: + post: + summary: 为用户分配管理App的权限 + deprecated: false + description: '' + operationId: addManageAppMasterRoleToUser + tags: + - Apps + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: userId + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: 用户不存在 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^user not exists for userName:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + security: [] + delete: + summary: 移除用户的管理App的权限 + deprecated: false + description: '' + operationId: forbidManageAppMaster + tags: + - Apps + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: userId + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: 用户不存在 + type: object + properties: + status: + type: string + description: 错误代码 + example: '400' + message: + type: string + pattern: ^user not exists for userName:(.+)$ + timestamp: + type: string + description: 错误出现时间 + exception: + type: string + description: 错误类型 + default: BadRequestException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /system/role/manageAppMaster: + get: + summary: 查询管理App权限是否打开 + deprecated: false + description: '' + operationId: isManageAppMasterPermissionEnabled + tags: + - Apps + - Permission + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + isManageAppMasterPermissionEnabled: + type: boolean + required: + - isManageAppMasterPermissionEnabled + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories: + get: + summary: 根据namespace查询发布历史 + deprecated: false + description: '' + operationId: findReleaseHistoriesByNamespace + tags: + - Apps + - Env + - Namespace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: page + in: query + description: '' + required: false + schema: + type: integer + format: int32 + default: 0 + - name: size + in: query + description: '' + required: false + schema: + type: integer + format: int32 + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ReleaseHistoryBO' + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases: + post: + summary: 创建发布 + deprecated: false + description: '' + operationId: createRelease + tags: + - Apps + - Permission + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: + post: + summary: 创建灰度发布 + deprecated: false + description: '' + operationId: createGrayRelease + tags: + - Apps + - Env + - Namespace + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + model: + $ref: '#/components/schemas/OpenNamespaceReleaseModel' + required: + - model + examples: {} + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + headers: {} + security: [] + /envs/{env}/releases/{releaseId}: + get: + summary: 获取发布 + deprecated: false + description: '' + operationId: get + tags: + - Apps + - Env + - Release + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: releaseId + in: path + description: '' + required: true + schema: + type: integer + format: long + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Access is denied + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + '404': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 状态 + default: '404' + message: + type: string + pattern: ^release not found for releaseId:(.+)$ + timestamp: + type: string + format: date-time + exception: + type: string + default: NotFoundException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all: + get: + summary: 查找所有的发布 + deprecated: false + description: '' + operationId: findAllReleases + tags: + - Apps + - Permission + - Namespace + - Env + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: page + in: query + description: '' + required: true + schema: + type: integer + format: int32 + default: 0 + minimum: 0 + - name: size + in: query + description: '' + required: true + schema: + type: integer + format: int32 + default: 5 + minimum: 0 + exclusiveMinimum: true + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ReleaseBO' + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 状态 + default: '400' + message: + type: string + default: page should be positive or 0 + timestamp: + type: string + format: date-time + exception: + type: string + default: ConstraintViolationException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:size不符合要求: + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 状态 + default: '400' + message: + type: string + default: size should be positive number + timestamp: + type: string + format: date-time + exception: + type: string + default: ConstraintViolationException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active: + get: + summary: 查找活跃的发布 + deprecated: false + description: '' + operationId: findActiveReleases + tags: + - Apps + - Env + - Namespace + - Release + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: page + in: query + description: '' + required: true + schema: + type: integer + format: int32 + minimum: 0 + default: 0 + - name: size + in: query + description: '' + required: true + schema: + type: integer + format: int32 + minimum: 0 + exclusiveMinimum: true + default: 5 + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenReleaseDTO' + headers: {} + '400': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 状态 + default: '400' + message: + type: string + default: page should be positive or 0 + timestamp: + type: string + format: date-time + exception: + type: string + default: ConstraintViolationException + required: + - status + - message + - timestamp + - exception + headers: {} + x-400:size不符合要求: + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 状态 + default: '400' + message: + type: string + default: size should be positive number + timestamp: + type: string + format: date-time + exception: + type: string + default: ConstraintViolationException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /envs/{env}/releases/compare: + get: + summary: 比较发布 + deprecated: false + description: '' + operationId: compareRelease + tags: + - Apps + - Env + - Namespace + - Release + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: baseReleaseId + in: query + description: '' + required: true + schema: + type: integer + format: long + - name: toCompareReleaseId + in: query + description: '' + required: true + schema: + type: integer + format: long + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ReleaseCompareResult' + headers: {} + security: [] + /envs/{env}/releases/{releaseId}/rollback: + put: + summary: 回滚配置 + deprecated: false + description: >- + 回滚到上一版本: 如果不提供 toReleaseId 参数,接口会将当前指定的 releaseId + 所代表的版本回滚到它的上一个已发布版本。回滚到指定版本: 如果提供了 toReleaseId 参数,接口会将配置回滚到 toReleaseId + 所代表的特定历史版本。 + tags: [] + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: releaseId + in: path + description: '' + required: true + schema: + type: integer + format: long + - name: toReleaseId + in: query + description: '' + required: false + schema: + type: integer + format: long + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: 'null' + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Access is denied + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + '404': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 状态 + default: '404' + message: + type: string + pattern: ^release not found for releaseId:(.+)$ + timestamp: + type: string + format: date-time + exception: + type: string + default: NotFoundException + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /apps/search/by-appid-or-name: + get: + summary: 根据appid或者名字搜索app + deprecated: false + description: '' + operationId: search + tags: + - Apps + parameters: + - name: query + in: query + description: '' + required: false + schema: + type: string + - name: pageable + in: query + description: Pageable and to be defined + required: false + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: {} + examples: {} + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + page: + type: integer + size: + type: integer + total: + type: integer + description: long + content: + type: array + items: + description: T + $ref: '#/components/schemas/OpenAppDTO' + description: List + required: + - page + - size + - total + - content + headers: {} + security: [] + /server/portal-db/config: + post: + summary: 创建/更新portal数据库中的配置 + deprecated: false + description: '' + operationId: createOrUpdatePortalDBConfig + tags: + - Configs + - Apps + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + serverConfig: + $ref: '#/components/schemas/ServerConfig' + required: + - serverConfig + examples: {} + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ServerConfig' + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + security: [] + /server/envs/{env}/config-db/config: + post: + summary: 创建/更新Config数据库中的配置 + deprecated: false + description: '' + operationId: createOrUpdateConfigDBConfig + tags: + - Configs + - Apps + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + serverConfig: + $ref: '#/components/schemas/ServerConfig' + required: + - serverConfig + examples: {} + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ServerConfig' + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + security: [] + /server/portal-db/config/find-all-config: + get: + summary: 查找portal数据库中所有的设置 + deprecated: false + description: '' + operationId: findAllPortalDBServerConfig + tags: + - Apps + - Configs + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ServerConfig' + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + security: [] + /server/envs/{env}/config-db/config/find-all-config: + get: + summary: 查找config数据库中所有的设置 + deprecated: false + description: '' + operationId: findAllConfigDBServerConfig + tags: + - Env + - Configs + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ServerConfig' + headers: {} + '403': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 错误代码 + default: '403' + message: + type: string + default: Forbidden + timestamp: + type: string + format: date-time + description: 时间 + exception: + type: string + description: 错误类型 + example: AccessDeniedException + required: + - status + - timestamp + - exception + - message + headers: {} + security: [] + /users: + get: + summary: 根据关键字搜索获得多个用户信息 + deprecated: false + description: '' + operationId: searchUsersByKeyword + tags: [] + parameters: + - name: keyword + in: query + description: '' + required: true + schema: + type: string + - name: includeInactiveUsers + in: query + description: '' + required: true + schema: + type: boolean + default: false + - name: offset + in: query + description: should be changed to page + required: true + schema: + type: integer + format: int32 + default: 0 + - name: limit + in: query + description: should be changed to size + required: true + schema: + type: integer + format: int32 + default: 10 + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserInfo' + headers: {} + security: [] + /users/enabled: + put: + summary: 修改用户的enable字段 + deprecated: false + description: '' + operationId: changeUserEnabled + tags: [] + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + user: + type: object + properties: {} + description: userPO but to be modified + required: + - user + examples: {} + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + '500': + description: '' + content: + application/json: + schema: + title: '' + type: object + properties: + status: + type: string + description: 状态 + default: '500' + message: + type: string + example: change user enabled is unsupported + timestamp: + type: string + format: date-time + exception: + type: string + example: UnsupportedOperationException.class + required: + - status + - message + - timestamp + - exception + headers: {} + security: [] + /user: + get: + summary: 获取当前用户名 + deprecated: false + description: '' + operationId: getCurrentUserName + tags: [] + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfo' + headers: {} + security: [] + /user/logout: + get: + summary: 登出操作 + deprecated: false + description: '' + operationId: logout + tags: [] + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + security: [] + /users/{userId}: + get: + summary: 根据用户id获取用户信息 + deprecated: false + description: '' + operationId: getUserByUserId + tags: [] + parameters: + - name: userId + in: path + description: '' + required: true + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfo' + headers: {} + security: [] + /organizations: + get: + summary: loadOrganization + deprecated: false + description: 获取部门信息 + operationId: loadOrganization + tags: + - Apps + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenOrganization' + headers: {} + security: [] + /prefix-path: + get: + summary: 获取prefix路径 + deprecated: false + description: '' + operationId: getPrefixPath + tags: [] + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: string + headers: {} + security: [] + /signin: + get: + summary: login + deprecated: false + description: '' + operationId: login + tags: [] + parameters: + - name: error + in: query + description: '' + required: false + schema: + type: string + - name: logout + in: query + description: '' + required: false + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: string + default: login.html + headers: {} + security: [] + /sso_heartbeat: + get: + summary: Sso心跳 + deprecated: false + description: '' + operationId: heartbeat + tags: [] + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + '*/*': + schema: + type: object + properties: {} + headers: {} + security: [] + /system-info: + get: + summary: 查询系统信息 + deprecated: false + description: '' + operationId: getSystemInfo + tags: [] + parameters: + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentInfo' + headers: {} + security: [] + /system-info/health: + get: + summary: 查询系统是否健康 + deprecated: false + description: '' + operationId: checkHealth + tags: [] + parameters: + - name: instanceId + in: query + description: '' + required: false + schema: + type: string + - name: X-Auth-Token + in: header + description: '' + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + description: Spring Health + headers: {} + security: [] +components: + schemas: + BaseEntity: + type: object + properties: + id: + type: integer + description: ID 编号 + format: long + isDeleted: + type: boolean + default: false + deletedAt: + type: integer + format: long + dataChangeCreatedBy: + type: string + dataChangeLastModifiedTime: + type: string + format: date + required: + - id + - isDeleted + - deletedAt + - dataChangeCreatedBy + - dataChangeLastModifiedTime + EntityPair: + type: object + properties: + firstEntity: + type: object + properties: {} + description: ID 编号 + title: E + secondEntity: + type: object + properties: {} + title: E + required: + - firstEntity + - secondEntity + ServerConfig: + type: object + properties: + id: + type: integer + description: ID 编号 + format: long + isDeleted: + type: boolean + default: false + deletedAt: + type: integer + format: long + dataChangeCreatedBy: + type: string + dataChangeLastModifiedTime: + type: string + format: date + key: + type: string + value: + type: string + comment: + type: string + required: + - key + - value + - comment + - id + - isDeleted + - deletedAt + - dataChangeCreatedBy + - dataChangeLastModifiedTime + UserInfo: + type: object + properties: + userId: + type: string + name: + type: string + email: + type: string + enabled: + type: integer + format: int32 + required: + - userId + - name + - email + - enabled + KVEntity: + type: object + properties: + key: + type: string + value: + type: string + required: + - key + - value + ReleaseBO: + type: object + properties: + baseInfo: + $ref: '#/components/schemas/OpenReleaseDTO' + items: + type: array + items: + $ref: '#/components/schemas/KVEntity' + uniqueItems: true + required: + - baseInfo + - items + ReleaseHistoryBO: + type: object + properties: + id: + type: integer + format: long + appId: + type: string + clusterName: + type: string + namespaceName: + type: string + branchName: + type: string + operator: + type: string + operatorDisplayName: + type: string + releaseId: + type: integer + format: long + releaseTitle: + type: string + releaseComment: + type: string + releaseTime: + type: string + format: date + releaseTimeFormatted: + type: string + configuration: + type: array + items: + type: object + properties: + firstEntity: + type: string + title: E + description: ID 编号 + secondEntity: + type: string + title: E + required: + - firstEntity + - secondEntity + isReleaseAbandoned: + type: boolean + previousReleaseId: + type: integer + format: long + operation: + type: integer + operationContext: + type: object + properties: {} + additionalProperties: + type: object + properties: + 01K0601PYCZM8QCPSF5S9A1QP7: + x-tmp-pending-properties: true + required: + - 01K0601PYCZM8QCPSF5S9A1QP7 + required: + - id + - appId + - clusterName + - namespaceName + - branchName + - operator + - operatorDisplayName + - releaseId + - releaseTitle + - releaseComment + - releaseTime + - releaseTimeFormatted + - configuration + - previousReleaseId + - isReleaseAbandoned + - operation + - operationContext + ClusterNamespaceRolesAssignedUsers: + type: object + properties: + appId: + type: string + env: + type: string + cluster: + type: string + modifyRoleUsers: + type: array + items: + $ref: '#/components/schemas/UserInfo' + uniqueItems: true + releaseRoleUsers: + type: array + items: + $ref: '#/components/schemas/UserInfo' + uniqueItems: true + required: + - appId + - env + - cluster + - modifyRoleUsers + - releaseRoleUsers + NamespaceRolesAssignedUsers: + type: object + properties: + appId: + type: string + namespaceName: + type: string + modifyRoleUsers: + type: array + items: + $ref: '#/components/schemas/UserInfo' + uniqueItems: true + releaseRoleUsers: + type: array + items: + $ref: '#/components/schemas/UserInfo' + required: + - appId + - namespaceName + - modifyRoleUsers + - releaseRoleUsers + AppRolesAssignedUsers: + type: object + properties: + appId: + type: string + masterUsers: + type: array + items: + $ref: '#/components/schemas/UserInfo' + uniqueItems: true + required: + - appId + - masterUsers + NamespaceUsage: + type: object + properties: + namespaceName: + type: string + appId: + type: string + clusterName: + type: string + envName: + type: string + instanceCount: + type: integer + format: int32 + branchInstanceCount: + type: integer + format: int32 + linkedNamespaceCount: + type: integer + format: int32 + required: + - namespaceName + - appId + - clusterName + - envName + - instanceCount + - branchInstanceCount + - linkedNamespaceCount + Change: + type: object + properties: + type: + type: string + enum: + - ADDED + - MODIFIED + - DELETED + entity: + type: object + properties: + firstEntity: + title: E + description: ID 编号 + $ref: '#/components/schemas/KVEntity' + secondEntity: + title: E + $ref: '#/components/schemas/KVEntity' + required: + - firstEntity + - secondEntity + required: + - type + - entity + ReleaseCompareResult: + type: object + properties: + changes: + type: array + items: + $ref: '#/components/schemas/Change' + required: + - changes + SystemInfo: + type: object + properties: + version: + type: string + environments: + type: array + items: + $ref: '#/components/schemas/EnvironmentInfo' + required: + - version + - environments + EnvironmentInfo: + type: object + properties: + env: + type: string + active: + type: boolean + metaServerAddress: + type: array + items: + $ref: '#/components/schemas/ServiceDTO' + configServerices: + type: array + items: + $ref: '#/components/schemas/ServiceDTO' + errorMessage: + type: string + required: + - env + - active + - metaServerAddress + - configServerices + - errorMessage + BaseDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + format: date + dataChangeLastModifiedTime: + type: string + format: date + required: + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + OpenAppDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + format: date + dataChangeLastModifiedTime: + type: string + format: date + name: + type: string + appId: + type: string + orgId: + type: string + orgName: + type: string + ownerName: + type: string + ownerEmail: + type: string + required: + - name + - appId + - orgId + - orgName + - ownerName + - ownerEmail + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime NamespaceReleaseDTO: type: object - description: 命名空间发布请求数据传输对象,用于创建新的配置发布 + properties: + releaseTitle: + type: string + releaseComment: + type: string + releasedBy: + type: string + isEmergencyPublish: + type: boolean required: - releaseTitle + - releaseComment - releasedBy + - isEmergencyPublish + NamespaceGrayDelReleaseDTO: + type: object properties: releaseTitle: type: string - description: 发布标题,用于标识这次发布的名称或版本号 - example: Release-20240120-v1.2.0 - releaseComment: + releaseComment: + type: string + releasedBy: + type: string + isEmergencyPublish: + type: boolean + grayDelKeys: + type: array + items: + type: string + uniqueItems: true + description: Set + required: + - grayDelKeys + - releaseTitle + - releaseComment + - releasedBy + - isEmergencyPublish + OpenAppNamespaceDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + format: date + dataChangeLastModifiedTime: + type: string + format: date + name: + type: string + appId: + type: string + format: + type: string + isPublic: + type: boolean + appendNamespacePrefix: + type: boolean + description: whether to append namespace prefix for public namespace name + default: true + comment: + type: string + required: + - name + - appId + - format + - isPublic + - appendNamespacePrefix + - comment + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + OpenClusterDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + format: date + dataChangeLastModifiedTime: + type: string + format: date + name: + type: string + appId: + type: string + required: + - name + - appId + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + OpenCreateAppDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + format: date + dataChangeLastModifiedTime: + type: string + format: date + assignAppRoleToSelf: + type: boolean + description: >- + when assignAppRoleToSelf is true, you can do anything with the app + by current token! + admins: + type: array + items: + type: string + uniqueItems: true + description: | + Set + app: + $ref: '#/components/schemas/OpenAppDTO' + required: + - assignAppRoleToSelf + - admins + - app + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + OpenEnvClusterDTO: + type: object + properties: + env: + type: string + clusters: + type: array + items: + type: string + uniqueItems: true + description: Set + required: + - env + - clusters + OpenItemDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + format: date + dataChangeLastModifiedTime: + type: string + format: date + key: + type: string + type: + type: integer + value: + type: string + comment: + type: string + required: + - key + - type + - value + - comment + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + OpenNamespaceDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + format: date + dataChangeLastModifiedTime: + type: string + format: date + id: + type: integer + format: long + appId: + type: string + clusterName: + type: string + namespaceName: + type: string + pattern: '[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*' + required: + - appId + - clusterName + - id + - namespaceName + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + OpenNamespaceLockDTO: + type: object + properties: + namespaceName: + type: string + isLocked: + type: boolean + lockedBy: + type: string + required: + - namespaceName + - isLocked + - lockedBy + OpenOrganizationDto: &ref_0 + type: object + properties: + orgId: + type: string + orgName: + type: string + required: + - orgId + - orgName + OpenPageDTO: + type: object + properties: + page: + type: integer + size: + type: integer + total: + type: integer + description: long + content: + type: array + items: + type: object + properties: {} + description: T + description: List + required: + - page + - size + - total + - content + OpenClusterDTO1: + type: object + properties: + clusters: + type: array + items: + type: string + required: + - clusters + OpenCommitDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + format: date + dataChangeLastModifiedTime: + type: string + format: date + changeSets: + type: string + appId: type: string - description: 发布备注,详细描述本次发布的变更内容和目的 - example: 更新数据库连接配置,修复Redis连接超时问题,新增日志级别配置 - releasedBy: + clusterName: + type: string + namespaceName: + type: string + comment: type: string - description: 发布操作者用户名,记录是谁执行了这次发布操作 - example: release-manager - isEmergencyPublish: - type: boolean - description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 - example: false - NamespaceGrayDelReleaseDTO: - type: object - description: 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 required: - - releaseTitle - - releasedBy - - grayDelKeys + - changeSets + - appId + - clusterName + - namespaceName + - comment + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + OpenFavoriteDTO: + type: object + properties: {} + OpenItemInfo: + type: object properties: - releaseTitle: + appId: type: string - description: 发布标题,用于标识这次灰度删除发布的名称或版本号 - example: GrayDel-20240120-remove-deprecated-configs - releaseComment: + envName: type: string - description: 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - example: 删除已废弃的旧版本数据库配置项,清理无用的缓存配置 - releasedBy: + clusterName: + type: string + namespaceName: + type: string + key: + type: string + value: type: string - description: 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - example: config-manager - isEmergencyPublish: - type: boolean - description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 - example: false - grayDelKeys: - type: array - items: - type: string - description: 需要在灰度发布中删除的配置项键名列表 - example: - - old.database.host - - deprecated.cache.config - - legacy.api.endpoint - OpenAppNamespaceDTO: - type: object - description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 required: - - name - appId - - format - - dataChangeCreatedBy + - envName + - clusterName + - namespaceName + - key + - value + OpenReleaseDTO: + type: object properties: dataChangeCreatedBy: type: string - description: 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - example: namespace-admin dataChangeLastModifiedBy: type: string - description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - example: config-manager dataChangeCreatedTime: type: string - description: 命名空间创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 + format: date dataChangeLastModifiedTime: type: string - description: 命名空间最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 + format: date + id: + type: string + releaseKey: + type: string name: type: string - description: 命名空间名称,在同一应用内唯一标识一个命名空间 - example: database-config appId: type: string - description: 所属应用的唯一标识符 - example: user-management-service - format: + clusterName: + type: string + namespaceName: + type: string + configurations: type: string - description: 命名空间格式类型,如properties、xml、json、yml等 - example: properties - isPublic: - type: boolean - description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - example: false - appendNamespacePrefix: - type: boolean - description: 对于公共命名空间,是否在命名空间名称前添加前缀 - default: true - example: true comment: type: string - description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 - example: 数据库相关配置命名空间,包含数据库连接、连接池等配置 - OpenNamespaceDTO: + isAbandoned: + type: boolean + required: + - id + - releaseKey + - name + - appId + - clusterName + - namespaceName + - configurations + - comment + - isAbandoned + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + OpenInstanceConfigDTO: type: object - description: Apollo命名空间数据传输对象,表示特定环境和集群下的命名空间及其配置项 properties: - dataChangeCreatedBy: + release: + $ref: '#/components/schemas/OpenReleaseDTO' + releaseDeliveryTime: type: string - description: 命名空间创建者用户名,记录是谁创建了这个命名空间实例 - example: namespace-creator - dataChangeLastModifiedBy: + format: date + dataChangeLastModifiedTime: type: string - description: 命名空间最后修改者用户名,记录最后一次修改命名空间的用户 - example: config-editor - dataChangeCreatedTime: + format: date + required: + - release + - releaseDeliveryTime + - dataChangeLastModifiedTime + OpenInstanceDTO: + type: object + properties: + id: + type: integer + appId: type: string - description: 命名空间创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: + clusterName: + type: string + dataCenter: + type: string + ip: type: string - description: 命名空间最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 + configs: + type: array + items: + type: object + properties: + release: + $ref: '#/components/schemas/OpenReleaseDTO' + releaseDeliveryTime: + type: string + format: date + dataChangeLastModifiedTime: + type: string + format: date + required: + - release + - releaseDeliveryTime + - dataChangeLastModifiedTime + dataChangeCreatedTime: + type: string + format: date + required: + - appId + - id + - clusterName + - dataCenter + - ip + - configs + - dataChangeCreatedTime + OpenVerifiable: + type: object + properties: + isInvalid: + type: boolean + required: + - isInvalid + OpenNamespaceTextModel: + type: object + properties: + isInvalid: + type: boolean appId: type: string - description: 所属应用的唯一标识符 - example: user-management-service + env: + type: string clusterName: type: string - description: 所属集群的名称 - example: default namespaceName: type: string - description: 命名空间名称,标识配置的分组 - example: application - comment: - type: string - description: 命名空间备注说明,描述命名空间的用途 - example: 应用主配置命名空间,包含核心业务配置 + namespaceId: + type: integer + format: long format: type: string - description: 命名空间格式类型,如properties、xml、json、yml等 - example: properties - isPublic: + configText: + type: string + operator: + type: string + required: + - appId + - env + - clusterName + - namespaceName + - namespaceId + - format + - configText + - operator + - isInvalid + OpenNamespaceIdentifier: + type: object + properties: + isInvalid: type: boolean - description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - example: false - items: + appId: + type: string + env: + type: string + clusterName: + type: string + namespaceName: + type: string + required: + - appId + - env + - clusterName + - namespaceName + - isInvalid + OpenNamespaceSyncModel: + type: object + properties: + isInvalid: + type: boolean + syncToNamespaces: + type: array + items: + $ref: '#/components/schemas/OpenNamespaceIdentifier' + syncItems: type: array items: $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO - description: 命名空间包含的所有配置项列表 - OpenNamespaceLockDTO: + required: + - syncToNamespaces + - syncItems + - isInvalid + OpenItemChangeSets: type: object - description: Apollo命名空间锁状态数据传输对象,表示命名空间的锁定状态信息 properties: - namespaceName: + dataChangeCreatedBy: type: string - description: 命名空间名称,标识被锁定的命名空间 - example: application - isLocked: + dataChangeLastModifiedBy: + type: string + dataChangeCreatedTime: + type: string + format: date + dataChangeLastModifiedTime: + type: string + format: date + createItems: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + updateItems: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + deleteItems: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + required: + - createItems + - updateItems + - deleteItems + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + OpenItemDiffs: + type: object + properties: + namespace: + $ref: '#/components/schemas/OpenNamespaceIdentifier' + diffs: + $ref: '#/components/schemas/OpenItemChangeSets' + extInfo: + type: string + required: + - namespace + - diffs + - extInfo + OpenItemBO: + type: object + properties: + item: + $ref: '#/components/schemas/OpenItemDTO' + isModified: type: boolean - description: 命名空间是否被锁定,锁定状态下不允许修改配置 - example: true - lockedBy: + isDeleted: + type: boolean + oldValue: + type: string + newValue: type: string - description: 锁定操作者用户名,记录是谁锁定了这个命名空间 - example: config-admin - OpenOrganizationDto: + required: + - item + - isModified + - isDeleted + - oldValue + - newValue + OpenNamespaceBO: type: object - description: Apollo组织信息数据传输对象,表示系统中的组织架构信息 + properties: + baseInfo: + $ref: '#/components/schemas/OpenNamespaceDTO' + itemModifiedCnt: + type: integer + format: int32 + items: + type: array + items: + $ref: '#/components/schemas/OpenItemBO' + format: + type: string + isPublic: + type: boolean + parentAppId: + type: string + comment: + type: string + isConfigHidden: + type: boolean required: - - orgId - - orgName + - baseInfo + - itemModifiedCnt + - items + - format + - isPublic + - parentAppId + - comment + - isConfigHidden + OpenNamespaceReleaseModel: + type: object properties: - orgId: + isInvalid: + type: boolean + appId: type: string - description: 组织唯一标识符,用于在系统中唯一标识一个组织 - example: tech-dept - orgName: + env: + type: string + clusterName: + type: string + namespaceName: + type: string + releaseTitle: + type: string + releaseComment: + type: string + releasedBy: type: string - description: 组织名称,用于显示的友好名称 - example: 技术部 + isEmergencyPublish: + type: boolean + required: + - appId + - env + - clusterName + - namespaceName + - releaseTitle + - releaseComment + - releasedBy + - isEmergencyPublish + - isInvalid OpenGrayReleaseRuleItemDTO: type: object - description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 properties: + ALL_IP: + type: string + const: '*' + ALL_Label: + type: string + const: '*' clientAppId: type: string - description: 客户端应用ID,指定哪个应用可以获取灰度配置 - example: mobile-app clientIpList: type: array items: type: string - description: 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - example: - - 192.168.1.100 - - 192.168.1.101 - - 10.0.0.50 + uniqueItems: true clientLabelList: type: array items: type: string - description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - example: - - beta-user - - internal-test - - canary-group + uniqueItems: true + required: + - ALL_IP + - ALL_Label + - clientAppId + - clientIpList + - clientLabelList OpenGrayReleaseRuleDTO: type: object - description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 properties: dataChangeCreatedBy: type: string - description: 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - example: gray-release-admin dataChangeLastModifiedBy: type: string - description: 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - example: ops-manager dataChangeCreatedTime: type: string - description: 灰度规则创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 + format: date dataChangeLastModifiedTime: type: string - description: 灰度规则最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 + format: date appId: type: string - description: 所属应用的唯一标识符 - example: user-management-service clusterName: type: string - description: 所属集群的名称 - example: default namespaceName: type: string - description: 所属命名空间的名称 - example: application branchName: type: string - description: 灰度分支名称,标识灰度发布的分支 - example: gray-branch-20240120 ruleItems: type: array items: $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenGrayReleaseRuleItemDTO - description: 灰度发布规则项列表,包含具体的灰度规则条件 - securitySchemes: - ApiKeyAuth: - type: apiKey - in: header - name: Authorization - description: | - Apollo OpenAPI访问令牌,用于身份验证和权限控制。 - - **获取方式:** - 1. 登录Apollo Portal管理界面 - 2. 进入"管理员工具" -> "开放平台授权管理" - 3. 点击"创建Token"按钮 - 4. 填写Token名称和选择授权的应用 - 5. 创建成功后复制生成的Token值 - - **使用方法:** - 在请求头中添加:`Authorization: your-token-value` - - **注意事项:** - - Token具有特定的应用访问权限 - - 请妥善保管Token,避免泄露 - - Token可以在管理界面中禁用或删除 + uniqueItems: true + releaseId: + type: integer + format: long + required: + - appId + - clusterName + - namespaceName + - branchName + - ruleItems + - releaseId + - dataChangeCreatedBy + - dataChangeLastModifiedBy + - dataChangeCreatedTime + - dataChangeLastModifiedTime + AppNamespace: + type: object + properties: + id: + type: integer + description: ID 编号 + format: long + isDeleted: + type: boolean + default: false + deletedAt: + type: integer + format: long + dataChangeCreatedBy: + type: string + dataChangeLastModifiedTime: + type: string + format: date + name: + type: string + appId: + type: string + format: + type: string + isPublic: + type: string + comment: + type: string + required: + - name + - appId + - format + - isPublic + - comment + - id + - isDeleted + - deletedAt + - dataChangeCreatedBy + - dataChangeLastModifiedTime + OpenNamespaceCreationModel: + type: object + properties: + env: + type: string + namespace: + $ref: '#/components/schemas/OpenNamespaceDTO' + required: + - env + - namespace + OpenLockInfo: + type: object + properties: + lockOwner: + type: string + isEmergencyPublishAllowed: + type: boolean + required: + - lockOwner + - isEmergencyPublishAllowed + OpenOrganization: *ref_0 + OpenPermissionCondition: + type: object + properties: + hasPermission: + type: boolean + required: + - hasPermission + OpenNamespaceEnvRolesAssignedUsers: + type: object + properties: + env: + type: string + required: + - env + ServiceDTO: + type: object + properties: + appName: + type: string + instanceId: + type: string + homepageUrl: + type: string + required: + - appName + - instanceId + - homepageUrl + securitySchemes: {} servers: [] security: [] From 6a3206f30c2f27e27a987682b2acbc7031f9b85c Mon Sep 17 00:00:00 2001 From: tacklequestions Date: Sun, 24 Aug 2025 17:01:04 +0800 Subject: [PATCH 3/6] =?UTF-8?q?docs(openapi):=20=E8=A1=A5=E5=85=85=20OpenA?= =?UTF-8?q?PI=20=E8=AF=B4=E6=98=8E=E4=B8=8E=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: arrow2020 <316166287@qq.com> --- Apollo-OpenAPI.yaml | 8023 ++++++++----------------------------------- 1 file changed, 1472 insertions(+), 6551 deletions(-) diff --git a/Apollo-OpenAPI.yaml b/Apollo-OpenAPI.yaml index 5d5f9e4a..c24b1ed2 100644 --- a/Apollo-OpenAPI.yaml +++ b/Apollo-OpenAPI.yaml @@ -1,1059 +1,622 @@ openapi: 3.0.1 info: - title: Apollo-OpenAPI + title: Apollo description: '' version: 1.0.0 -tags: - - name: Apps - - name: Commit - - name: Configs - - name: Env - - name: Fav - - name: Item - - name: Instance - - name: Branch - - name: NameSpace - - name: Namespace - - name: Permission - - name: App - - name: Clusters - - name: Release +tags: [] paths: - /apps: + /openapi/v1/apps: post: - summary: 创建App + summary: createApp deprecated: false - description: 创建一个新的 App - operationId: createApp - tags: - - Apps + description: 创建新的Apollo应用,包括应用基本信息设置和管理员权限分配 + tags: [] parameters: - - name: X-Auth-Token + - name: Authorization in: header description: '' - required: true - example: '' schema: type: string requestBody: content: application/json: schema: - type: object - properties: - req: - $ref: '#/components/schemas/OpenCreateAppDTO' - required: - - req - examples: {} + $ref: '#/components/schemas/OpenCreateAppDTO' + description: 创建应用的请求参数,包含应用基本信息和管理员配置 responses: '200': - description: OK + description: 操作成功 + content: + application/json: + schema: + type: object + properties: {} headers: {} security: [] get: - summary: 根据appId查找App + summary: findApps deprecated: false - description: '' - operationId: findApps - tags: - - Apps + description: 查询应用列表,支持根据应用ID列表进行筛选查询 + tags: [] parameters: - name: appIds in: query - description: 若appIds为空则返回全部所有App + description: 应用ID列表,多个ID用逗号分隔,用于批量查询指定的应用信息 required: false - example: tian-app,100,66,100004458,11232131,1000001 schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string responses: '200': - description: '' + description: 查询成功,返回数据列表 content: application/json: schema: type: array items: - type: object - properties: - name: - type: string - appId: - type: string - orgId: - type: string - orgName: - type: string - ownerName: - type: string - ownerEmail: - type: string - id: - type: integer - isDeleted: - type: boolean - deletedAt: - type: integer - dataChangeCreatedBy: - type: string - dataChangeCreatedTime: - type: string - dataChangeLastModifiedBy: - type: string - dataChangeLastModifiedTime: - type: string - required: - - name - - appId - - orgId - - orgName - - ownerName - - ownerEmail - - id - - isDeleted - - deletedAt - - dataChangeCreatedBy - - dataChangeCreatedTime - - dataChangeLastModifiedBy - - dataChangeLastModifiedTime + $ref: '#/components/schemas/OpenAppDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenAppDTO example: - - name: liveService - appId: '1000001' - orgId: micro_service - orgName: 微服务部门 - ownerName: apollo - ownerEmail: apollo@acme.com - id: 3288 - isDeleted: false - deletedAt: 0 - dataChangeCreatedBy: apollo - dataChangeCreatedTime: 2025-06-18T19:33:27.000+0800 - dataChangeLastModifiedBy: apollo - dataChangeLastModifiedTime: 2025-06-18T19:33:27.000+0800 - - name: apollo-demo - appId: '100004458' - orgId: TEST1 - orgName: 测试部门 - ownerName: apollo - ownerEmail: apollo@acme.com - id: 2762 - isDeleted: false - deletedAt: 0 - dataChangeCreatedBy: apollo - dataChangeCreatedTime: 2024-11-23T10:22:49.000+0800 - dataChangeLastModifiedBy: apollo - dataChangeLastModifiedTime: 2024-11-23T10:22:49.000+0800 - - name: '1312312' - appId: '11232131' - orgId: micro_service - orgName: 微服务部门 - ownerName: apollo - ownerEmail: apollo@acme.com - id: 3255 - isDeleted: false - deletedAt: 0 - dataChangeCreatedBy: apollo - dataChangeCreatedTime: 2025-06-02T20:14:49.000+0800 - dataChangeLastModifiedBy: apollo - dataChangeLastModifiedTime: 2025-06-02T20:14:49.000+0800 - - name: '111' - appId: '66' - orgId: micro_service - orgName: 大数据部门 - ownerName: apollo - ownerEmail: apollo@acme.com - id: 3220 - isDeleted: false - deletedAt: 0 - dataChangeCreatedBy: apollo - dataChangeCreatedTime: 2025-05-25T12:51:07.000+0800 - dataChangeLastModifiedBy: apollo - dataChangeLastModifiedTime: 2025-05-25T12:51:07.000+0800 - - name: tian示例应用 - appId: tian-app - orgId: '111' - orgName: 互联网研发部 - ownerName: test2 - ownerEmail: aaa - id: 208 - isDeleted: false - deletedAt: 0 - dataChangeCreatedBy: TianLX - dataChangeCreatedTime: 2023-02-01T13:45:23.000+0800 - dataChangeLastModifiedBy: apollo - dataChangeLastModifiedTime: 2024-09-27T05:05:29.000+0800 - headers: {} - security: [] - /apps/{appId}/envclusters: - get: - summary: 根据appId获取Envs&Clusters - deprecated: false - description: '' - operationId: getEnvClusterInfo - tags: - - Apps + - dataChangeCreatedBy: 'apollo-admin' + dataChangeLastModifiedBy: 'john.doe' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + name: '用户管理系统' + appId: 'user-management-service' + orgId: 'tech-dept' + orgName: '技术部' + ownerName: '张三' + ownerEmail: 'zhangsan@company.com' + - dataChangeCreatedBy: 'apollo-admin' + dataChangeLastModifiedBy: 'jane.smith' + dataChangeCreatedTime: '2024-01-10T09:15:00.000+0800' + dataChangeLastModifiedTime: '2024-01-18T16:40:15.000+0800' + name: '订单处理系统' + appId: 'order-processing-service' + orgId: 'business-dept' + orgName: '业务部' + ownerName: '李四' + ownerEmail: 'lisi@company.com' + headers: {} + security: [] + /openapi/v1/apps/{appId}/envclusters: + get: + summary: getEnvClusterInfo + deprecated: false + description: 获取指定应用在各个环境下的集群信息列表 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true - example: '1000001' + example: '' schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string responses: '200': - description: '' + description: 查询成功,返回数据列表 content: application/json: schema: - type: object - properties: - entities: - type: array - items: - type: object - properties: - code: - type: integer - message: - type: string - body: - type: object - properties: - env: - type: string - clusters: - type: array - items: - type: object - properties: - id: - type: integer - name: - type: string - appId: - type: string - parentClusterId: - type: integer - dataChangeCreatedBy: - type: string - dataChangeLastModifiedBy: - type: string - dataChangeCreatedTime: - type: string - dataChangeLastModifiedTime: - type: string - comment: - type: string - required: - - id - - name - - appId - - parentClusterId - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - - comment - required: - - env - - clusters - required: - - entities + type: array + items: + $ref: '#/components/schemas/OpenEnvClusterDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO example: - entities: - - code: 200 - message: OK - body: - env: DEV - clusters: - - id: 5824 - name: default - appId: '1000001' - parentClusterId: 0 - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2025-06-18T19:33:27.000+0800 - dataChangeLastModifiedTime: 2025-06-18T19:33:27.000+0800 - - id: 5849 - name: '123' - appId: '1000001' - parentClusterId: 0 - comment: '' - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2025-06-24T15:25:37.000+0800 - dataChangeLastModifiedTime: 2025-06-24T15:25:37.000+0800 - - id: 5892 - name: '1234' - appId: '1000001' - parentClusterId: 0 - comment: 添加的新集群 - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2025-07-02T09:14:58.000+0800 - dataChangeLastModifiedTime: 2025-07-02T09:14:58.000+0800 - headers: {} - security: [] - /apps/authorized: - get: - summary: 查询有权操作的所有App - deprecated: false - description: '' - operationId: findAppsAuthorized - tags: - - Apps + - env: 'DEV' + clusters: + - 'default' + - 'beijing' + - 'shanghai' + - env: 'TEST' + clusters: + - 'default' + - 'integration-test' + - env: 'PRO' + clusters: + - 'default' + - 'cluster-1' + - 'cluster-2' + headers: {} + security: [] + /openapi/v1/apps/authorized: + get: + summary: findAppsAuthorized + deprecated: false + description: 查询当前Token有权限操作的应用列表 + tags: [] parameters: - - name: X-Auth-Token + - name: Authorization in: header description: '' - required: false - example: '' schema: type: string responses: '200': - description: '' + description: 查询成功,返回数据列表 content: application/json: schema: type: array items: - type: object - properties: - name: - type: string - appId: - type: string - orgId: - type: string - orgName: - type: string - ownerName: - type: string - ownerEmail: - type: string - id: - type: integer - isDeleted: - type: boolean - deletedAt: - type: integer - dataChangeCreatedBy: - type: string - dataChangeCreatedTime: - type: string - dataChangeLastModifiedBy: - type: string - dataChangeLastModifiedTime: - type: string - required: - - name - - appId - - orgId - - orgName - - ownerName - - ownerEmail - - id - - isDeleted - - deletedAt - - dataChangeCreatedBy - - dataChangeCreatedTime - - dataChangeLastModifiedBy - - dataChangeLastModifiedTime + $ref: '#/components/schemas/OpenAppDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenAppDTO + description: which apps can be operated by open api example: - - name: liveService - appId: '1000001' - orgId: micro_service - orgName: 微服务部门 - ownerName: apollo - ownerEmail: apollo@acme.com - id: 3288 - isDeleted: false - deletedAt: 0 - dataChangeCreatedBy: apollo - dataChangeCreatedTime: 2025-06-18T19:33:27.000+0800 - dataChangeLastModifiedBy: apollo - dataChangeLastModifiedTime: 2025-06-18T19:33:27.000+0800 - - name: user-service - appId: '100001' - orgId: minecreaft - orgName: MinecreaftPaperPlugin - ownerName: apollo - ownerEmail: apollo@acme.com - id: 2968 - isDeleted: false - deletedAt: 0 - dataChangeCreatedBy: apollo - dataChangeCreatedTime: 2025-02-09T21:58:22.000+0800 - dataChangeLastModifiedBy: apollo - dataChangeLastModifiedTime: 2025-05-05T22:07:02.000+0800 - - name: shop-service - appId: '100002' - orgId: micro_service - orgName: 微服务部门 - ownerName: apollo - ownerEmail: apollo@acme.com - id: 2969 - isDeleted: false - deletedAt: 0 - dataChangeCreatedBy: apollo - dataChangeCreatedTime: 2025-02-09T22:04:53.000+0800 - dataChangeLastModifiedBy: apollo - dataChangeLastModifiedTime: 2025-06-09T13:36:48.000+0800 - headers: {} - security: [] - /{appId}: - put: - summary: 根据appId更新App - deprecated: false - description: '' - tags: - - Apps + - dataChangeCreatedBy: 'apollo-admin' + dataChangeLastModifiedBy: 'config-manager' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + name: '用户管理系统' + appId: 'user-management-service' + orgId: 'tech-dept' + orgName: '技术部' + ownerName: '张三' + ownerEmail: 'zhangsan@company.com' + - dataChangeCreatedBy: 'apollo-admin' + dataChangeLastModifiedBy: 'ops-user' + dataChangeCreatedTime: '2024-01-12T11:20:00.000+0800' + dataChangeLastModifiedTime: '2024-01-19T13:15:45.000+0800' + name: '支付网关服务' + appId: 'payment-gateway-service' + orgId: 'finance-dept' + orgName: '财务部' + ownerName: '王五' + ownerEmail: 'wangwu@company.com' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key:.+}: + get: + summary: getItem + deprecated: false + description: 获取指定配置项的详细信息 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - - name: X-Auth-Token - in: header - description: '' + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' schema: type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - '': - $ref: '#/components/schemas/OpenAppDTO' - required: - - '' - examples: {} - responses: - '200': - description: OK - headers: {} - security: [] - /apps/{appId}: - delete: - summary: 根据appId删除App - deprecated: false - description: '' - operationId: deleteApp - tags: - - Apps - parameters: - - name: appId + - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - - name: X-Auth-Token - in: header - description: '' + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' schema: type: string - responses: - '200': - description: OK - headers: {} - security: [] - /apps/{appId}/miss_envs: - get: - summary: 根据appId查询app缺失的环境 - deprecated: false - description: '' - tags: [] - parameters: - - name: appId + - name: key in: path - description: '' + description: 配置项的键名,用于唯一标识一个配置项 required: true + example: '' schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' + required: false + example: '' schema: type: string responses: '200': - description: '' + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - code: - type: integer - entities: - type: array - items: - type: string - required: - - code - - entities + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO example: - code: 200 - entities: - - - DEV - - FAT + dataChangeCreatedBy: 'config-admin' + dataChangeLastModifiedBy: 'developer' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + key: 'database.url' + type: 0 + value: 'jdbc:mysql://localhost:3306/mydb?useSSL=false&serverTimezone=Asia/Shanghai' + comment: '数据库连接URL配置,包含SSL和时区设置' headers: {} security: [] - /apps/{appId}/navtree: - get: - summary: 根据appId获取navtree + put: + summary: updateItem deprecated: false - description: '' - operationId: nav - tags: - - Apps + description: 更新指定配置项的值和属性信息 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - - name: X-Auth-Token - in: header - description: '' + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' schema: type: string - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - code: - type: integer - entities: - type: array - items: - type: object - properties: - code: - type: integer - message: - type: string - body: - type: object - properties: - env: - type: string - clusters: - type: array - items: - type: object - properties: - id: - type: integer - name: - type: string - appId: - type: string - parentClusterId: - type: integer - dataChangeCreatedBy: - type: string - dataChangeLastModifiedBy: - type: string - dataChangeCreatedTime: - type: string - dataChangeLastModifiedTime: - type: string - comment: - type: string - required: - - id - - name - - appId - - parentClusterId - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - - comment - required: - - env - - clusters - required: - - code - - entities - example: - code: 200 - entities: - - code: 200 - message: OK - body: - env: DEV - clusters: - - id: 420 - name: default - appId: app-test01 - parentClusterId: 0 - dataChangeCreatedBy: sjh - dataChangeLastModifiedBy: sjh - dataChangeCreatedTime: 2023-02-02T15:31:44.000+0800 - dataChangeLastModifiedTime: 2023-02-02T15:31:44.000+0800 - - id: 4539 - name: jk - appId: app-test01 - parentClusterId: 0 - comment: '' - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-10-13T18:41:56.000+0800 - dataChangeLastModifiedTime: 2024-10-13T18:41:56.000+0800 - - id: 5430 - name: test - appId: app-test01 - parentClusterId: 0 - comment: test - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2025-03-30T19:21:20.000+0800 - dataChangeLastModifiedTime: 2025-03-30T19:21:20.000+0800 - - id: 5711 - name: test1 - appId: app-test01 - parentClusterId: 0 - dataChangeCreatedBy: oliver - dataChangeCreatedTime: 2025-05-26T17:52:09.000+0800 - dataChangeLastModifiedTime: 2025-05-26T17:52:09.000+0800 - - id: 5894 - name: cluster-1751449572 - appId: app-test01 - parentClusterId: 0 - dataChangeCreatedBy: apollo - dataChangeCreatedTime: 2025-07-02T17:46:12.000+0800 - dataChangeLastModifiedTime: 2025-07-02T17:46:12.000+0800 - - id: 5895 - name: cluster-1751451847 - appId: app-test01 - parentClusterId: 0 - dataChangeCreatedBy: apollo - dataChangeCreatedTime: 2025-07-02T18:24:08.000+0800 - dataChangeLastModifiedTime: 2025-07-02T18:24:08.000+0800 - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters: - post: - summary: 基于appId&env创建cluster - deprecated: false - description: '' - operationId: createCluster - tags: - - Apps - parameters: - - name: appId + - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - - name: env + - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' + schema: + type: string + - name: key + in: path + description: 配置项的键名,用于唯一标识一个配置项 + required: true + example: '' schema: type: string - - name: X-Auth-Token + - name: createIfNotExists + in: query + description: 如果配置项不存在是否创建。当设置为true时,请求体中的dataChangeCreatedBy字段变为必填 + required: true + example: 'false' + schema: + type: boolean + - name: Authorization in: header description: '' + required: false + example: '' schema: type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenClusterDTO' - examples: {} + $ref: '#/components/schemas/OpenItemDTO' + description: 配置项信息,包含键名、值、类型和备注等 responses: '200': - description: '' + description: 操作成功 content: application/json: schema: type: object - properties: - Result: - $ref: '#/components/schemas/OpenClusterDTO' - description: 名称待确定 - required: - - Result + properties: {} headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName:.+}: - get: - summary: 查询cluster相关信息 + delete: + summary: deleteItem deprecated: false - description: 根据appId&env&clusterName查询app的cluster相关信息 - operationId: loadCluster - tags: - - Apps + description: 删除指定的配置项 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - - name: clusterName:.+ + - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/OpenClusterDTO' - headers: {} - security: [] - delete: - summary: 删除Cluster - deprecated: false - description: 根据appId&env&clusterName删除cluster - tags: [] - parameters: - - name: appId + - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: env + - name: key in: path - description: '' + description: 配置项的键名,用于唯一标识一个配置项 required: true + example: '' schema: type: string - - name: clusterName:.+ - in: path - description: '' + - name: operator + in: query + description: 执行删除操作的用户名,必须是系统中存在的用户 required: true schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' + required: false + example: '' schema: type: string responses: '200': - description: OK + description: 操作成功 + content: + application/json: + schema: + type: object + properties: {} headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key:.+}: get: - summary: 查询commit信息 + summary: getItemByEncodedKey deprecated: false - description: '' - operationId: loadCommits - tags: - - Commit + description: 通过编码后的键名获取配置项信息 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: page - in: query - description: '' - required: false - schema: - type: integer - minimum: 0 - default: 0 - - name: size - in: query - description: '' - required: false + - name: key + in: path + description: 配置项的键名,用于唯一标识一个配置项 + required: true + example: '' schema: - type: integer - format: int32 - default: 10 - minimum: 0 - exclusiveMinimum: true - - name: X-Auth-Token + type: string + - name: Authorization in: header description: '' + required: false + example: '' schema: type: string responses: '200': - description: OK + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - commits: - type: array - items: - $ref: '#/components/schemas/OpenCommitDTO' - required: - - commits + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + example: + dataChangeCreatedBy: 'config-admin' + dataChangeLastModifiedBy: 'developer' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + key: 'redis.cluster.nodes' + type: 0 + value: '192.168.1.10:7000,192.168.1.11:7001,192.168.1.12:7002' + comment: 'Redis集群节点配置,用于分布式缓存' headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export: - get: - summary: 导出指定配置项 + put: + summary: updateItemByEncodedKey deprecated: false - description: '' - operationId: exportItems - tags: - - Configs + description: 通过编码后的键名更新配置项 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: X-Auth-Token - in: header - description: '' + - name: key + in: path + description: 配置项的键名,用于唯一标识一个配置项 + required: true + example: '' schema: type: string - responses: - '200': - description: '' - headers: - Content-Disposition: - example: '' - required: false - description: 返回文件下载位置 - schema: - type: string - security: [] - /configs/export: - get: - summary: 导出全部配置项 - deprecated: false - description: 必须要有SuperAdmin权限 - operationId: exportAll - tags: - - Configs - parameters: - - name: X-Auth-Token + - name: createIfNotExists + in: query + description: 如果配置项不存在是否创建。当设置为true时,请求体中的dataChangeCreatedBy字段变为必填 + required: true + example: 'false' + schema: + type: boolean + - name: Authorization in: header description: '' + required: false + example: '' schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenItemDTO' + description: 配置项信息,包含键名、值、类型和备注等 responses: '200': - description: '' - headers: - Content-Disposition: - example: '' - required: false - description: 下载文件位置 + description: 操作成功 + content: + application/json: schema: - type: string + type: object + properties: {} + headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import: - get: - summary: 导入配置项 + delete: + summary: deleteItemByEncodedKey deprecated: false - description: |- - 导入配置项 - * Yml 文件的名称必须以 {@code.yml} 结尾。 - * Properties 文件的名称必须以 {@code.properties} 结尾。 - * 以此类推。 - operationId: importConfigFile - tags: - - Configs + description: 通过编码后的键名删除配置项 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - file: - format: binary - type: string - example: '' - examples: {} - responses: - '200': - description: OK - headers: {} - security: [] - /configs/import: - get: - summary: 从文件中导入配置项(Ignore策略) - deprecated: false - description: | - 必须要有SuperAdmin权限 - Ignore策略: - 1. 保留现有配置:当导入的配置与现有配置冲突时,会保留现有的配置,忽略导入文件中的冲突项 - 2. 仅添加新项:只会添加那些在现有配置中不存在的新配置项 - 3. 适用场景: - - 当你希望保留现有的已配置好的设置 - - 只想补充添加新的配置项 - - 进行配置合并而非替换时 - operationId: importConfigByZipWithIgnoreConflictNamespace - tags: - - Configs - parameters: - - name: conflictAction - in: query - description: must be ignore + - name: key + in: path + description: 配置项的键名,用于唯一标识一个配置项 required: true example: '' schema: type: string - default: ignore - - name: X-Auth-Token - in: header - description: '' + - name: operator + in: query + description: 执行删除操作的用户名,必须是系统中存在的用户 + required: true schema: type: string - responses: - '200': - description: OK - headers: {} - security: [] - /envs: - get: - summary: 获取环境 - deprecated: false - description: 根据token获取app的环境 - operationId: envs - tags: - - Env - parameters: - - name: X-Auth-Token + - name: Authorization in: header description: '' + required: false + example: '' schema: type: string responses: '200': - description: OK + description: 操作成功 content: application/json: schema: type: object - properties: - envs: - type: array - items: - type: string - required: - - envs + properties: {} headers: {} security: [] - /favorites: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: post: - summary: 新增收藏App + summary: createItem deprecated: false - description: '' + description: 在指定命名空间中创建新的配置项 tags: [] parameters: - - name: X-Auth-Token + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' + schema: + type: string + - name: namespaceName + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: Authorization in: header description: '' schema: @@ -1062,433 +625,482 @@ paths: content: application/json: schema: - type: object - properties: - favorite: - $ref: '#/components/schemas/OpenFavoriteDTO' - description: 暂未填充 - required: - - favorite - examples: {} + $ref: '#/components/schemas/OpenItemDTO' + description: 配置项信息,包含键名、值、类型和备注等 responses: '200': - description: OK + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - fav: - $ref: '#/components/schemas/OpenFavoriteDTO' - required: - - fav + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + example: + dataChangeCreatedBy: 'config-manager' + dataChangeLastModifiedBy: 'config-manager' + dataChangeCreatedTime: '2024-01-20T15:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T15:30:00.000+0800' + key: 'app.log.level' + type: 0 + value: 'INFO' + comment: '应用日志级别配置,控制日志输出详细程度' headers: {} security: [] get: - summary: 查找收藏 + summary: findItemsByNamespace deprecated: false - description: '' - operationId: findFavorites - tags: - - Fav + description: 分页查询指定命名空间下的配置项列表 + tags: [] parameters: - - name: userId - in: query - description: '' - required: false + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' schema: type: string - - name: appId - in: query - description: '' - required: false + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' schema: type: string - - name: X-Auth-Token - in: header - description: '' + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' schema: type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: - favs: - type: array - items: - $ref: '#/components/schemas/OpenFavoriteDTO' - required: - - favs - headers: {} - security: [] - /favorites/{favoriteId}: - delete: - summary: 删除收藏 - deprecated: false - description: '' - operationId: deleteFavorite - tags: - - Fav - parameters: - - name: favoriteId + - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: X-Auth-Token + - name: page + in: query + description: 页码,从0开始,用于分页查询配置项列表 + required: true + example: 0 + schema: + type: integer + - name: size + in: query + description: 每页记录数,用于控制分页查询每页返回的配置项数量,建议值为50 + required: true + example: 50 + schema: + type: integer + - name: Authorization in: header description: '' schema: type: string responses: '200': - description: '' - headers: {} - security: [] - put: - summary: 置顶收藏 - deprecated: false - description: '' - operationId: toTop - tags: - - Fav + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenPageDTOOpenItemDTO' + example: + page: 0 + size: 50 + total: 125 + content: + - dataChangeCreatedBy: 'config-admin' + dataChangeLastModifiedBy: 'developer' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + key: 'database.url' + type: 0 + value: 'jdbc:mysql://localhost:3306/mydb' + comment: '数据库连接URL配置' + - dataChangeCreatedBy: 'config-admin' + dataChangeLastModifiedBy: 'ops-user' + dataChangeCreatedTime: '2024-01-15T11:15:00.000+0800' + dataChangeLastModifiedTime: '2024-01-19T16:45:20.000+0800' + key: 'redis.host' + type: 0 + value: '192.168.1.100' + comment: 'Redis服务器地址配置' + - dataChangeCreatedBy: 'config-manager' + dataChangeLastModifiedBy: 'config-manager' + dataChangeCreatedTime: '2024-01-16T09:20:00.000+0800' + dataChangeLastModifiedTime: '2024-01-16T09:20:00.000+0800' + key: 'app.log.level' + type: 0 + value: 'INFO' + comment: '应用日志级别配置' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName:.+}: + get: + summary: getCluster + deprecated: false + description: 获取指定集群的详细信息 + tags: [] parameters: - - name: favoriteId + - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - headers: {} - security: [] - /global-search/item-info/by-key-or-value: - get: - summary: 根据key&value搜索配置项 - deprecated: false - description: 必须要有superAdmin权限 - operationId: getItemInfoBySearch - tags: - - Item - parameters: - - name: key - in: query - description: '' - required: false + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' schema: type: string - default: '""' - - name: value - in: query - description: '' - required: false + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default + required: true + example: '' schema: type: string - default: '""' - - name: X-Auth-Token + - name: Authorization in: header description: '' + required: false + example: '' schema: type: string responses: '200': - description: OK + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - items: - type: array - items: - $ref: '#/components/schemas/OpenItemInfo' - required: - - items + $ref: '#/components/schemas/OpenClusterDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenClusterDTO + example: + dataChangeCreatedBy: 'cluster-admin' + dataChangeLastModifiedBy: 'ops-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + name: 'default' + appId: 'user-management-service' headers: {} security: [] - /envs/{env}/instances/by-release: - get: - summary: 根据env&releaseId查询instance + /openapi/v1/envs/{env}/apps/{appId}/clusters: + post: + summary: createCluster deprecated: false - description: '' - operationId: getByRelease - tags: - - Instance + description: 在指定环境下为应用创建新的集群 + tags: [] parameters: - - name: env + - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - - name: releaseId - in: query - description: '' - required: true - schema: - type: integer - format: long - - name: page - in: query - description: '' - required: true - schema: - type: integer - format: int32 - default: 0 - - name: size - in: query - description: '' + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: - type: integer - format: int32 - default: 20 - - name: X-Auth-Token + type: string + - name: Authorization in: header description: '' schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenClusterDTO' + description: 集群配置信息,包含集群名称、应用ID和创建者等 responses: '200': - description: OK + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - result: - $ref: '#/components/schemas/OpenPageDTO%3CT%3E' - required: - - result + $ref: '#/components/schemas/OpenClusterDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenClusterDTO + example: + dataChangeCreatedBy: 'cluster-admin' + dataChangeLastModifiedBy: 'cluster-admin' + dataChangeCreatedTime: '2024-01-20T16:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T16:30:00.000+0800' + name: 'beijing-cluster' + appId: 'user-management-service' headers: {} security: [] - /envs/{env}/instances/by-namespace: - get: - summary: 根据namespace获取instance + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: + post: + summary: createRelease deprecated: false - description: '' - operationId: getByNamespace - tags: - - Instance + description: 发布指定命名空间的配置变更 + tags: [] parameters: - - name: env + - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - - name: appId - in: query - description: '' + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName - in: query - description: '' + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName - in: query - description: '' + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: instanceAppId - in: query - description: '' - required: false - schema: - type: string - - name: page - in: query - description: '' - required: true - schema: - type: integer - format: int32 - default: 0 - minimum: 0 - - name: size - in: query - description: '' - required: true - schema: - type: integer - format: int32 - default: 20 - minimum: 0 - exclusiveMinimum: true - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NamespaceReleaseDTO' + description: 发布配置信息,包含发布标题、发布者和发布备注等 responses: '200': - description: OK + description: 查询成功,返回详细数据 content: application/json: schema: - $ref: '#/components/schemas/OpenPageDTO%3CT%3E' - headers: {} - security: [] - /envs/{env}/instances/by-namespace/count: - get: - summary: 根据namespace获取instance数量 - deprecated: false - description: '' + $ref: '#/components/schemas/OpenReleaseDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO + example: + dataChangeCreatedBy: 'release-manager' + dataChangeLastModifiedBy: 'release-manager' + dataChangeCreatedTime: '2024-01-20T17:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T17:30:00.000+0800' + id: 12345 + appId: 'user-management-service' + clusterName: 'default' + namespaceName: 'application' + name: 'Release-20240120-v1.2.0' + configurations: + 'database.url': 'jdbc:mysql://localhost:3306/mydb' + 'redis.host': '192.168.1.100' + 'app.log.level': 'INFO' + comment: '更新数据库连接配置,修复Redis连接超时问题' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: + get: + summary: loadLatestActiveRelease + deprecated: false + description: 获取指定命名空间的最新有效发布版本 tags: [] parameters: - - name: env + - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - - name: appId - in: query - description: '' + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName - in: query - description: '' + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName - in: query - description: '' + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string responses: '200': - description: OK + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - count: - type: integer - required: - - count - headers: {} - security: [] - /envs/{env}/instances/by-namespace-and-releases-not-in: - get: - summary: 根据namespace&releaseId获取不在env中的instance + $ref: '#/components/schemas/OpenReleaseDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO + example: + dataChangeCreatedBy: 'release-manager' + dataChangeLastModifiedBy: 'ops-admin' + dataChangeCreatedTime: '2024-01-20T17:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T18:15:25.000+0800' + id: 12345 + appId: 'user-management-service' + clusterName: 'default' + namespaceName: 'application' + name: 'Release-20240120-v1.2.0' + configurations: + 'database.url': 'jdbc:mysql://localhost:3306/mydb' + 'redis.host': '192.168.1.100' + 'app.log.level': 'INFO' + 'server.port': '8080' + comment: '最新生产环境配置发布,包含数据库和缓存配置更新' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: + post: + summary: merge deprecated: false - description: '' + description: 将灰度分支的配置合并到主分支并发布 tags: [] parameters: - - name: env + - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - - name: appId - in: query - description: '' + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName - in: query - description: '' + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName - in: query - description: '' + in: path + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: releaseIds - in: query - description: '' + - name: branchName + in: path + description: 灰度分支名称,用于标识灰度发布的分支 required: true + example: '' schema: type: string - - name: X-Auth-Token + - name: deleteBranch + in: query + description: 合并完成后是否删除灰度分支 + required: true + example: 'true' + schema: + type: boolean + - name: Authorization in: header description: '' schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NamespaceReleaseDTO' + description: 发布配置信息,包含发布标题、发布者和发布备注等 responses: '200': - description: OK + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - result: - type: array - items: - $ref: '#/components/schemas/OpenInstanceDTO' - required: - - result - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items: - put: - summary: 基于文本修改item + $ref: '#/components/schemas/OpenReleaseDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: + post: + summary: createGrayRelease deprecated: false - description: 具有修改item的权限 - operationId: modifyItemsByText - tags: - - Item + description: 创建灰度发布,将分支配置发布给特定用户群体 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: branchName + in: path + description: 灰度分支名称,用于标识灰度发布的分支 required: true + example: '' schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: @@ -1497,112 +1109,214 @@ paths: content: application/json: schema: - type: object - properties: - model: - $ref: '#/components/schemas/OpenNamespaceTextModel' - required: - - model - examples: {} + $ref: '#/components/schemas/NamespaceReleaseDTO' + description: 发布配置信息,包含发布标题、发布者和发布备注等 responses: '200': - description: OK - headers: {} - security: [] - get: - summary: 查询item + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases: + post: + summary: createGrayDelRelease deprecated: false - description: '' - operationId: findItems - tags: - - Item + description: 创建灰度删除发布,删除指定的配置项并发布给特定用户群体 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: branchName + in: path + description: 灰度分支名称,用于标识灰度发布的分支 + required: true + example: '' + schema: + type: string + - name: Authorization + in: header description: '' + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NamespaceGrayDelReleaseDTO' + description: 灰度删除发布配置信息,包含要删除的配置项键名列表 + responses: + '200': + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + security: [] + /openapi/v1/envs/{env}/releases/{releaseId}/rollback: + put: + summary: rollback + deprecated: false + description: 回滚到指定的发布版本 + tags: [] + parameters: + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - - name: orderBy + - name: releaseId + in: path + description: 发布记录的唯一标识符,用于标识特定的配置发布版本 + required: true + example: 0 + schema: + type: integer + - name: operator in: query - description: '' + description: 执行删除操作的用户名,必须是系统中存在的用户 required: true schema: type: string - default: lineNum - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string responses: '200': - description: OK + description: 操作成功 content: application/json: schema: type: object - properties: - items: - type: array - items: - $ref: '#/components/schemas/OpenItemDTO' - required: - - items + properties: {} headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/item: - post: - summary: 创建item + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: + get: + summary: getInstanceCountByNamespace deprecated: false - description: '' - operationId: createItem - tags: - - Item + description: 获取指定命名空间的客户端实例数量 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: Authorization + in: header description: '' + schema: + type: string + responses: + '200': + description: 查询成功,返回统计数据 + content: + application/json: + schema: + type: integer + example: 15 + headers: {} + security: [] + /openapi/v1/apps/{appId}/appnamespaces: + post: + summary: createNamespace + deprecated: false + description: 为指定应用创建新的命名空间 + tags: [] + parameters: + - name: appId + in: path + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: @@ -1611,5968 +1325,1175 @@ paths: content: application/json: schema: - type: object - properties: - item: - $ref: '#/components/schemas/OpenItemDTO' - required: - - item - examples: {} + $ref: '#/components/schemas/OpenAppNamespaceDTO' + description: 应用命名空间配置信息,包含命名空间名称、格式类型等 responses: '200': - description: OK + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - result: - $ref: '#/components/schemas/OpenItemDTO' - required: - - result + $ref: '#/components/schemas/OpenAppNamespaceDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenAppNamespaceDTO + example: + dataChangeCreatedBy: 'namespace-admin' + dataChangeLastModifiedBy: 'namespace-admin' + dataChangeCreatedTime: '2024-01-20T18:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T18:30:00.000+0800' + name: 'database-config' + appId: 'user-management-service' + format: 'properties' + isPublic: false + appendNamespacePrefix: true + comment: '数据库相关配置命名空间,包含数据库连接、连接池等配置' headers: {} security: [] + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: get: - summary: 修改item + summary: findNamespaces deprecated: false - description: 需要具有修改item的权限 - operationId: updateItem - tags: - - Item + description: 查询指定集群下的所有命名空间列表 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - - name: namespaceName - in: path - description: '' + - name: fillItemDetail + in: query + description: 是否填充配置项详细信息,true表示返回配置项列表,false表示只返回命名空间基本信息 required: true + example: 'true' schema: - type: string - - name: X-Auth-Token + type: boolean + - name: Authorization in: header description: '' schema: type: string responses: '200': - description: '' + description: 查询成功,返回数据列表 + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenNamespaceDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO + example: + - dataChangeCreatedBy: 'namespace-creator' + dataChangeLastModifiedBy: 'config-editor' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + appId: 'user-management-service' + clusterName: 'default' + namespaceName: 'application' + comment: '应用主配置命名空间,包含核心业务配置' + format: 'properties' + isPublic: false + items: + - dataChangeCreatedBy: 'config-admin' + dataChangeLastModifiedBy: 'developer' + dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' + key: 'database.url' + type: 0 + value: 'jdbc:mysql://localhost:3306/mydb' + comment: '数据库连接URL配置' + - dataChangeCreatedBy: 'namespace-creator' + dataChangeLastModifiedBy: 'config-manager' + dataChangeCreatedTime: '2024-01-16T09:20:00.000+0800' + dataChangeLastModifiedTime: '2024-01-18T15:30:10.000+0800' + appId: 'user-management-service' + clusterName: 'default' + namespaceName: 'database-config' + comment: '数据库专用配置命名空间' + format: 'properties' + isPublic: false + items: + - dataChangeCreatedBy: 'dba-admin' + dataChangeLastModifiedBy: 'dba-admin' + dataChangeCreatedTime: '2024-01-16T09:25:00.000+0800' + dataChangeLastModifiedTime: '2024-01-18T15:30:10.000+0800' + key: 'connection.pool.size' + type: 0 + value: '20' + comment: '数据库连接池大小配置' headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{itemId}: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName:.+}: get: - summary: 删除item + summary: loadNamespace deprecated: false - description: 需要具有修改item的权限 - operationId: deleteItem - tags: - - Item + description: 获取指定命名空间的详细信息和配置项 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: itemId - in: path - description: '' + - name: fillItemDetail + in: query + description: 是否填充配置项详细信息,true表示返回配置项列表,false表示只返回命名空间基本信息 required: true + example: 'true' schema: - type: string - - name: X-Auth-Token + type: boolean + - name: Authorization in: header description: '' + required: false + example: '' schema: type: string responses: '200': - description: '' + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + appId: '' + clusterName: '' + namespaceName: '' + comment: '' + format: '' + isPublic: false + items: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + key: '' + type: 0 + value: '' + comment: '' headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: get: - summary: 查询具体branch的item + summary: getNamespaceLock deprecated: false - description: '' + description: 获取指定命名空间的锁定状态信息 tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path - description: '' - required: true - schema: - type: string - - name: branchName - in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string responses: '200': - description: '' + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - items: - type: array - items: - $ref: '#/components/schemas/OpenItemDTO' - required: - - items + $ref: '#/components/schemas/OpenNamespaceLockDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceLockDTO + example: + namespaceName: 'application' + isLocked: true + lockedBy: 'config-admin' headers: {} security: [] - /namespaces/{namespaceName}/diff: + /openapi/v1/organizations: get: - summary: 根据namespace比较item的差异 + summary: getOrganization deprecated: false - description: '' - operationId: diff + description: 获取系统中所有组织的列表信息 tags: [] parameters: - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string responses: '200': - description: OK + description: 查询成功,返回数据列表 content: application/json: schema: - type: object - properties: - diffs: - type: array - items: - $ref: '#/components/schemas/OpenItemDiffs' - required: - - diffs + type: array + items: + $ref: '#/components/schemas/OpenOrganizationDto' + description: com.ctrip.framework.apollo.openapi.dto.OpenOrganizationDto + example: + - orgId: 'tech-dept' + orgName: '技术部' + - orgId: 'business-dept' + orgName: '业务部' + - orgId: 'finance-dept' + orgName: '财务部' + - orgId: 'ops-dept' + orgName: '运维部' headers: {} security: [] - /apps/{appId}/namespaces/{namespaceName}/items: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches: get: - summary: 根据appId&namespace更新item + summary: findBranch deprecated: false - description: '' + description: 查找指定命名空间的灰度分支信息 tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 + required: true + example: '' + schema: + type: string + - name: env + in: path + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 + required: true + example: '' + schema: + type: string + - name: clusterName + in: path + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - model: - $ref: '#/components/schemas/OpenNamespaceSyncModel' - required: - - model - examples: {} responses: '200': - description: OK + description: 查询成功,返回详细数据 + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO + example: + dataChangeCreatedBy: 'gray-release-admin' + dataChangeLastModifiedBy: 'config-editor' + dataChangeCreatedTime: '2024-01-20T19:00:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T20:15:30.000+0800' + appId: 'user-management-service' + clusterName: 'gray-branch-20240120' + namespaceName: 'application' + comment: '灰度发布分支,用于测试新配置' + format: 'properties' + isPublic: false + items: + - dataChangeCreatedBy: 'gray-release-admin' + dataChangeLastModifiedBy: 'config-editor' + dataChangeCreatedTime: '2024-01-20T19:05:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T20:15:30.000+0800' + key: 'feature.new-algorithm.enabled' + type: 0 + value: 'true' + comment: '新算法功能开关,灰度测试用' + - dataChangeCreatedBy: 'gray-release-admin' + dataChangeLastModifiedBy: 'gray-release-admin' + dataChangeCreatedTime: '2024-01-20T19:10:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T19:10:00.000+0800' + key: 'cache.timeout' + type: 0 + value: '300' + comment: '缓存超时时间,灰度环境专用配置' headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/syntax-check: post: - summary: item配置语法检查 + summary: createBranch deprecated: false - description: '' - operationId: syntaxCheckText - tags: - - Item + description: 为指定命名空间创建灰度发布分支 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application + required: true + example: '' + schema: + type: string + - name: operator + in: query + description: 执行删除操作的用户名,必须是系统中存在的用户 required: true schema: type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - model: - $ref: '#/components/schemas/OpenNamespaceTextModel' - required: - - model - examples: {} - responses: - '200': - description: OK - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/revoke-items: - put: - summary: 撤回item配置 - deprecated: false - description: '' - operationId: revokeItems - tags: - - Item - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches: - get: - summary: 创建灰度Branch - deprecated: false - description: '' - operationId: createBranch - tags: - - Branch - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string responses: '200': - description: OK + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - result: - $ref: '#/components/schemas/OpenNamespaceDTO' - required: - - result + $ref: '#/components/schemas/OpenNamespaceDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + appId: '' + clusterName: '' + namespaceName: '' + comment: '' + format: '' + isPublic: false + items: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + key: '' + type: 0 + value: '' + comment: '' headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: delete: - summary: 删除灰度分支 - deprecated: false - description: '' - operationId: deleteBranch - tags: - - Branch - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: branchName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: - post: - summary: 合并分支 + summary: deleteBranch deprecated: false - description: '' - operationId: merge - tags: - - Branch + description: 删除指定的灰度发布分支 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - name: branchName in: path - description: '' + description: 灰度分支名称,用于标识灰度发布的分支 required: true + example: '' schema: type: string - - name: deleteBranch + - name: operator in: query - description: '' + description: 执行删除操作的用户名,必须是系统中存在的用户 required: true schema: - type: boolean - default: true - - name: X-Auth-Token + type: string + - name: Authorization in: header description: '' schema: type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - model: - $ref: '#/components/schemas/OpenNamespaceReleaseModel' - required: - - model - examples: {} responses: '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - headers: {} - '400': - description: '' + description: 操作成功 content: application/json: schema: type: object - properties: - status: - type: integer - message: - type: string - timestamp: - type: string - exception: - type: string - required: - - status - - message - - timestamp - - exception - example: - status: 400 - message: 'Env: dev is not supported emergency publish now' - timestamp: '2024-05-29T09:00:00' - exception: >- - com.ctrip.framework.apollo.common.exception.BadRequestException + properties: {} headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules: get: - summary: 更新分支规则 + summary: getBranchGrayRules deprecated: false - description: 需要有操作namespace的权限 - operationId: updateBranchRules - tags: - - Branch + description: 获取灰度分支的发布规则配置 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - name: branchName in: path - description: '' + description: 灰度分支名称,用于标识灰度发布的分支 required: true + example: '' schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - rules: - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' - required: - - rules - examples: {} responses: '200': - description: OK - headers: {} - '403': - description: '' + description: 查询成功,返回详细数据 content: application/json: schema: - type: object - properties: - status: - type: integer - message: - type: string - timestamp: - type: string - exception: - type: string - required: - - status - - message - - timestamp - - exception + $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenGrayReleaseRuleDTO example: - status: 403 - message: Access is denied - timestamp: '2024-05-29T09:00:00' - exception: org.springframework.security.access.AccessDeniedException - headers: {} - security: [] - /appnamespaces/public: - get: - summary: 查询公开的AppNamespace - deprecated: false - description: '' - operationId: findPublicAppNamespaces - tags: - - NameSpace - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/AppNamespace' + dataChangeCreatedBy: 'gray-release-admin' + dataChangeLastModifiedBy: 'ops-manager' + dataChangeCreatedTime: '2024-01-20T19:30:00.000+0800' + dataChangeLastModifiedTime: '2024-01-20T20:45:15.000+0800' + appId: 'user-management-service' + clusterName: 'default' + namespaceName: 'application' + branchName: 'gray-branch-20240120' + ruleItems: + - clientAppId: 'mobile-app' + clientIpList: + - '192.168.1.100' + - '192.168.1.101' + - '10.0.0.50' + clientLabelList: + - 'beta-user' + - 'internal-test' + - clientAppId: 'web-frontend' + clientIpList: + - '192.168.2.10' + - '192.168.2.11' + clientLabelList: + - 'canary-group' + - 'qa-team' headers: {} security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces: - get: - summary: 查询Namespace + put: + summary: updateBranchRules deprecated: false - description: 基于appId、env、cluster查询namespace - operationId: findNamespaces - tags: - - NameSpace + description: 更新灰度分支的发布规则配置 + tags: [] parameters: - name: appId in: path - description: '' + description: 应用唯一标识符,用于标识特定的Apollo应用 required: true + example: '' schema: type: string - name: env in: path - description: '' + description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 required: true + example: '' schema: type: string - name: clusterName in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenNamespaceBO' - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}: - get: - summary: 根据appId&env&cluster&namespaceName查询Namespaces - deprecated: false - description: '' - operationId: findNamespace - tags: - - NameSpace - parameters: - - name: appId - in: path - description: '' + description: 集群名称,用于标识应用在特定环境下的集群,默认为default required: true + example: '' schema: type: string - - name: env + - name: namespaceName in: path - description: '' + description: 命名空间名称,用于组织和管理配置项,默认为application required: true + example: '' schema: type: string - - name: clusterName + - name: branchName in: path - description: '' + description: 灰度分支名称,用于标识灰度发布的分支 required: true + example: '' schema: type: string - - name: namespaceName - in: path - description: '' + - name: operator + in: query + description: 执行删除操作的用户名,必须是系统中存在的用户 required: true schema: type: string - - name: X-Auth-Token + - name: Authorization in: header description: '' schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' + description: 灰度发布规则配置,包含灰度规则项列表和生效条件 responses: '200': - description: '' + description: 操作成功 content: application/json: schema: - $ref: '#/components/schemas/OpenNamespaceBO' + type: object + properties: {} headers: {} security: [] - /envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace: - get: - summary: 查询与namespace相关的公开namespace - deprecated: false - description: '' - operationId: findPublicNamespaceForAssociatedNamespace - tags: - - Namespace - - Env - parameters: - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - headers: {} - security: [] - /apps/{appId}/namespaces: - post: - summary: 根据AppID创建App的namespace - deprecated: false - description: 需要有创建某app的namespace的权限 - operationId: createNamespace - tags: - - NameSpace - - Apps - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenNamespaceCreationModel' - examples: {} - responses: - '200': - description: OK - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - const: '403' - message: - type: string - timestamp: - type: string - format: time - exception: - type: string - description: AccessDeniedException.class - required: - - status - - message - - exception - - timestamp - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/linked-namespaces/{namespaceName:.+}: - delete: - summary: 删除Namespace - deprecated: false - description: '' - operationId: deleteLinkedNamespace - tags: - - Apps - - Env - - Namespace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName:.+ - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/linked-namespaces/{namespaceName}/usage: - get: - summary: 查询Namespace的用量 - deprecated: false - description: '' - tags: [] - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/NamespaceUsage' - headers: {} - security: [] - /apps/{appId}/appnamespaces/{namespaceName:.+}: - delete: - summary: 删除AppNamespace - deprecated: false - description: '' - operationId: deleteAppNamespace - tags: - - Apps - - Namespace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName:.+ - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - security: [] - /apps/{appId}/namespaces/publish_info: - get: - summary: 获取namespace的publish相关信息 - deprecated: false - description: 根据appid查询namespace的发布信息 - operationId: getNamespacesPublishInfo - tags: - - NameSpace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: {} - additionalProperties: - type: object - properties: - env_name: - type: object - properties: {} - additionalProperties: - type: object - properties: - String: - type: boolean - required: - - String - required: - - env_name - headers: {} - security: [] - /apps/{appId}/appnamespaces: - post: - summary: 创建AppNamespace(疑似重复接口) - deprecated: false - description: '' - operationId: createAppNamespace - tags: - - Apps - - Namespace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: appendNamespacePrefix - in: query - description: '' - required: false - schema: - type: boolean - default: true - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AppNamespace' - examples: {} - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AppNamespace' - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - security: [] - /envs/{env}/appnamespaces/{publicNamespaceName}/namespaces: - get: - summary: 获取publicNamespace的全部namespace - deprecated: false - description: '' - tags: - - NameSpace - parameters: - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: publicNamespaceName - in: path - description: '' - required: true - schema: - type: string - - name: page - in: query - description: '' - required: true - schema: - type: integer - format: int32 - default: 0 - minimum: 0 - - name: size - in: query - description: '' - required: true - schema: - type: integer - format: int32 - minimum: 1 - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenNamespaceDTO' - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces: - get: - summary: 创建缺失的namespace - deprecated: false - description: 根据appId&env&cluster,创建缺失的namespace(e.g 创建新env) - tags: [] - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/lock-info: - get: - summary: 查询namespace的lock信息 - deprecated: false - description: '' - operationId: getNamespaceLockInfo - tags: - - NameSpace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/OpenLockInfo' - headers: {} - security: [] - /apps/{appId}/initPermission: - post: - summary: 初始化权限许可 - deprecated: false - description: >- - 补齐某个 Namespace - 在各环境(或集群)中的默认“编辑”和“发布”权限角色。当历史数据或新环境缺少这些角色时,通过该接口即可一键创建,以保证权限体系完整。 - operationId: initAppPermission - tags: [] - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - namespaceName: - example: '' - type: string - examples: {} - responses: - '200': - description: OK - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/initNsPermission: - post: - summary: 初始化clusterNamespace的权限许可 - deprecated: false - description: '' - operationId: initClusterNamespacePermission - tags: - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - security: [] - /apps/{appId}/permissions/{permissionType}: - get: - summary: 应用级权限检查 - deprecated: false - description: 判断当前用户在指定应用上的权限,比如能否创建 Namespace、创建集群、分配权限 - operationId: hasPermission - tags: - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: permissionType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/OpenPermissionCondition' - headers: {} - security: [] - /apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType}: - get: - summary: Namespace(不含环境)权限检查 - deprecated: false - description: 构造目标 ID,检查用户对某个 Namespace 的权限,通常用于默认集群或多环境通用的场景。 - operationId: hasPermission - tags: - - Permission - - App - - Namespace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: permissionType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/OpenPermissionCondition' - headers: {} - security: [] - /apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType}: - get: - summary: 带环境的 Namespace 权限检查 - deprecated: false - description: 针对具体环境的 Namespace,根据目标ID判断 - tags: [] - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: permissionType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/OpenPermissionCondition' - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/ns_permissions/{permissionType}: - get: - summary: 根据appId&env&clusterName&permissionType查询是否具有Permission - deprecated: false - description: '' - operationId: hasClusterNamespacePermission - tags: - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: permissionType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: {} - headers: {} - security: [] - /permissions/root: - get: - summary: root权限检查 - deprecated: false - description: '' - operationId: hasRootPermission - tags: - - Namespace - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/OpenPermissionCondition' - headers: {} - security: [] - /apps/{appId}/envs/{env}/namespaces/{namespaceName}/role_users: - get: - summary: 获得指定环境下的namespace权限角色 - deprecated: false - description: '' - operationId: getNamespaceEnvRoles - tags: - - Namespace - - Env - - Apps - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceEnvRolesAssignedUsers' - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 状态 - example: '400' - message: - type: string - description: 错误信息 - example: invalid env format:YOUR ENV - timestamp: - type: string - format: date-time - exception: - type: string - example: BadRequestion - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType}: - post: - summary: 给用户分配NamespaceEnv角色 - deprecated: false - description: '' - operationId: assignNamespaceEnvRoleToUser - tags: - - Apps - - Env - - NameSpace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: roleType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 状态 - example: '400' - message: - type: string - example: user not exists for userName:YOUR USER NAME - timestamp: - type: string - format: date-time - exception: - type: string - example: BadRequestExeception - required: - - status - - message - - timestamp - - exception - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - message: - type: string - example: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:请求体为空: - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - example: '400' - message: - type: string - example: request payload should not be contain empty. - timestamp: - type: string - format: date-time - exception: - type: string - example: BadRequestionException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:roleType格式错误: - description: '' - content: - application/json: - schema: - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - example: invalid roleType format:YOUR ROLE TYPE - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:Env格式错误: - description: '' - content: - application/json: - schema: - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - example: invalid env format:YOUR ENV - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:用户已授权: - description: '' - content: - application/json: - schema: - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - example: YOUR USERNAME already authorized - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - delete: - summary: 移除用户的NamespaceEnv角色 - deprecated: false - description: '' - operationId: removeNamespaceEnvRoleFromUser - tags: - - Apps - - Env - - NameSpace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: roleType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: {} - examples: {} - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: roleType格式无效 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^invalid roleType format:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:Env格式无效: - description: '' - content: - application/json: - schema: - title: Env格式无效 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^invalid env format:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:请求体为空: - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - example: '400' - message: - type: string - example: request payload should not be contain empty. - timestamp: - type: string - format: date-time - exception: - type: string - example: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/ns_role_users: - get: - summary: 获取集群条件下的Namespace角色 - deprecated: false - description: '' - operationId: getClusterNamespaceRoles - tags: - - Apps - - Env - - Namespace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ClusterNamespaceRolesAssignedUsers' - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: Env格式无效 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^invalid env format:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/ns_roles/{roleType}: - post: - summary: 给用户分配ClusterNamespace角色 - deprecated: false - description: '' - operationId: assignClusterNamespaceRoleToUser - tags: - - Apps - - Clusters - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: roleType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - user: - example: '' - type: string - examples: {} - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: Env格式无效 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^invalid env format:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:用户不存在: - description: '' - content: - application/json: - schema: - title: 用户不存在 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^user not exists for userName:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:请求体为空: - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - example: '400' - message: - type: string - example: request payload should not be contain empty. - timestamp: - type: string - format: date-time - exception: - type: string - example: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - delete: - summary: 移除用户的ClusterNamespace角色 - deprecated: false - description: '' - operationId: removeClusterNamespaceRoleFromUser - tags: - - Apps - - Clusters - - Env - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: roleType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - user: - example: '' - type: string - examples: {} - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: roleType格式无效 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^invalid roleType format:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:Env格式无效: - description: '' - content: - application/json: - schema: - title: Env格式无效 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^invalid env format:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:请求体为空: - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - example: '400' - message: - type: string - example: request payload should not be contain empty. - timestamp: - type: string - format: date-time - exception: - type: string - example: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /apps/{appId}/namespaces/{namespaceName}/role_users: - get: - summary: 获取Namespace角色 - deprecated: false - description: '' - tags: - - Apps - - Namespace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceRolesAssignedUsers' - headers: {} - security: [] - /apps/{appId}/namespaces/{namespaceName}/roles/{roleType}: - post: - summary: 给用户分配namespace角色 - deprecated: false - description: '' - operationId: assignNamespaceRoleToUser - tags: - - Apps - - NameSpace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: roleType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - user: - example: '' - type: string - examples: {} - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: roleType格式无效 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^invalid roleType format:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - x-400:用户不存在: - description: '' - content: - application/json: - schema: - title: 用户不存在 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^user not exists for userName:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:用户已被授权: - description: '' - content: - application/json: - schema: - title: 用户已被授权 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^(.+) already authorized$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - delete: - summary: 移除用户的Namespace角色 - deprecated: false - description: '' - tags: - - Apps - - Namespace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: roleType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: roleType格式无效 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^invalid roleType format:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - x-400:请求体为空: - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - example: '400' - message: - type: string - example: request payload should not be contain empty. - timestamp: - type: string - format: date-time - exception: - type: string - example: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /apps/{appId}/role_users: - get: - summary: 获取App角色 - deprecated: false - description: '' - operationId: getAppRoles - tags: - - Apps - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AppRolesAssignedUsers' - headers: {} - security: [] - /apps/{appId}/roles/{roleType}: - post: - summary: 给用户分配App角色 - deprecated: false - description: '' - operationId: assignAppRoleToUser - tags: - - Apps - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: roleType - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - user: - example: '' - type: string - examples: {} - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: roleType格式无效 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^invalid roleType format:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:用户不存在: - description: '' - content: - application/json: - schema: - title: 用户不存在 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^user not exists for userName:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:用户已被授权: - description: '' - content: - application/json: - schema: - title: 用户已被授权 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^(.+) already authorized$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:请求体为空: - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - example: '400' - message: - type: string - example: request payload should not be contain empty. - timestamp: - type: string - format: date-time - exception: - type: string - example: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - delete: - summary: 移除用户的App角色 - deprecated: false - description: '' - operationId: removeAppRoleFromUser - tags: - - Apps - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: roleType - in: path - description: '' - required: true - schema: - type: string - - name: user - in: query - description: '' - required: false - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: roleType格式无效 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^invalid roleType format:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - x-400:用户不存在: - description: '' - content: - application/json: - schema: - title: 用户不存在 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^user not exists for userName:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:请求体为空: - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - example: '400' - message: - type: string - example: request payload should not be contain empty. - timestamp: - type: string - format: date-time - exception: - type: string - example: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /system/role/createApplication: - get: - summary: 获取具有创建App角色的用户 - deprecated: false - description: '' - operationId: getCreateApplicationRoleUsers - tags: - - Apps - - Permission - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - type: string - headers: {} - security: [] - post: - summary: 为用户分配 创建App角色 - deprecated: false - description: '' - operationId: addCreateApplicationRoleToUser - tags: - - Apps - - Permission - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - userIds: - type: array - items: - type: string - required: - - userIds - examples: {} - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: 用户不存在 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^user not exists for userName:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - security: [] - /system/role/createApplication/{userId}: - get: - summary: 查询用户是否具有创建App的权限 - deprecated: false - description: '' - operationId: hasCreateApplicationPermission - tags: - - Apps - - Permission - parameters: - - name: userId - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: - hasCreateApplicationPermission: - type: boolean - required: - - hasCreateApplicationPermission - headers: {} - security: [] - delete: - summary: 删除用户的创建App的角色 - deprecated: false - description: '' - operationId: deleteCreateApplicationRoleFromUser - tags: - - Apps - - Permission - parameters: - - name: userId - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: 用户不存在 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^user not exists for userName:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - security: [] - /apps/{appId}/system/master/{userId}: - post: - summary: 为用户分配管理App的权限 - deprecated: false - description: '' - operationId: addManageAppMasterRoleToUser - tags: - - Apps - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: userId - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: 用户不存在 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^user not exists for userName:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - security: [] - delete: - summary: 移除用户的管理App的权限 - deprecated: false - description: '' - operationId: forbidManageAppMaster - tags: - - Apps - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: userId - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: 用户不存在 - type: object - properties: - status: - type: string - description: 错误代码 - example: '400' - message: - type: string - pattern: ^user not exists for userName:(.+)$ - timestamp: - type: string - description: 错误出现时间 - exception: - type: string - description: 错误类型 - default: BadRequestException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /system/role/manageAppMaster: - get: - summary: 查询管理App权限是否打开 - deprecated: false - description: '' - operationId: isManageAppMasterPermissionEnabled - tags: - - Apps - - Permission - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: - isManageAppMasterPermissionEnabled: - type: boolean - required: - - isManageAppMasterPermissionEnabled - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories: - get: - summary: 根据namespace查询发布历史 - deprecated: false - description: '' - operationId: findReleaseHistoriesByNamespace - tags: - - Apps - - Env - - Namespace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: page - in: query - description: '' - required: false - schema: - type: integer - format: int32 - default: 0 - - name: size - in: query - description: '' - required: false - schema: - type: integer - format: int32 - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ReleaseHistoryBO' - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases: - post: - summary: 创建发布 - deprecated: false - description: '' - operationId: createRelease - tags: - - Apps - - Permission - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: - post: - summary: 创建灰度发布 - deprecated: false - description: '' - operationId: createGrayRelease - tags: - - Apps - - Env - - Namespace - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: branchName - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - model: - $ref: '#/components/schemas/OpenNamespaceReleaseModel' - required: - - model - examples: {} - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - headers: {} - security: [] - /envs/{env}/releases/{releaseId}: - get: - summary: 获取发布 - deprecated: false - description: '' - operationId: get - tags: - - Apps - - Env - - Release - parameters: - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: releaseId - in: path - description: '' - required: true - schema: - type: integer - format: long - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Access is denied - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - '404': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 状态 - default: '404' - message: - type: string - pattern: ^release not found for releaseId:(.+)$ - timestamp: - type: string - format: date-time - exception: - type: string - default: NotFoundException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all: - get: - summary: 查找所有的发布 - deprecated: false - description: '' - operationId: findAllReleases - tags: - - Apps - - Permission - - Namespace - - Env - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: page - in: query - description: '' - required: true - schema: - type: integer - format: int32 - default: 0 - minimum: 0 - - name: size - in: query - description: '' - required: true - schema: - type: integer - format: int32 - default: 5 - minimum: 0 - exclusiveMinimum: true - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ReleaseBO' - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 状态 - default: '400' - message: - type: string - default: page should be positive or 0 - timestamp: - type: string - format: date-time - exception: - type: string - default: ConstraintViolationException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:size不符合要求: - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 状态 - default: '400' - message: - type: string - default: size should be positive number - timestamp: - type: string - format: date-time - exception: - type: string - default: ConstraintViolationException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active: - get: - summary: 查找活跃的发布 - deprecated: false - description: '' - operationId: findActiveReleases - tags: - - Apps - - Env - - Namespace - - Release - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: page - in: query - description: '' - required: true - schema: - type: integer - format: int32 - minimum: 0 - default: 0 - - name: size - in: query - description: '' - required: true - schema: - type: integer - format: int32 - minimum: 0 - exclusiveMinimum: true - default: 5 - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenReleaseDTO' - headers: {} - '400': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 状态 - default: '400' - message: - type: string - default: page should be positive or 0 - timestamp: - type: string - format: date-time - exception: - type: string - default: ConstraintViolationException - required: - - status - - message - - timestamp - - exception - headers: {} - x-400:size不符合要求: - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 状态 - default: '400' - message: - type: string - default: size should be positive number - timestamp: - type: string - format: date-time - exception: - type: string - default: ConstraintViolationException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /envs/{env}/releases/compare: - get: - summary: 比较发布 - deprecated: false - description: '' - operationId: compareRelease - tags: - - Apps - - Env - - Namespace - - Release - parameters: - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: baseReleaseId - in: query - description: '' - required: true - schema: - type: integer - format: long - - name: toCompareReleaseId - in: query - description: '' - required: true - schema: - type: integer - format: long - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ReleaseCompareResult' - headers: {} - security: [] - /envs/{env}/releases/{releaseId}/rollback: - put: - summary: 回滚配置 - deprecated: false - description: >- - 回滚到上一版本: 如果不提供 toReleaseId 参数,接口会将当前指定的 releaseId - 所代表的版本回滚到它的上一个已发布版本。回滚到指定版本: 如果提供了 toReleaseId 参数,接口会将配置回滚到 toReleaseId - 所代表的特定历史版本。 - tags: [] - parameters: - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: releaseId - in: path - description: '' - required: true - schema: - type: integer - format: long - - name: toReleaseId - in: query - description: '' - required: false - schema: - type: integer - format: long - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: 'null' - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Access is denied - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - '404': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 状态 - default: '404' - message: - type: string - pattern: ^release not found for releaseId:(.+)$ - timestamp: - type: string - format: date-time - exception: - type: string - default: NotFoundException - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /apps/search/by-appid-or-name: - get: - summary: 根据appid或者名字搜索app - deprecated: false - description: '' - operationId: search - tags: - - Apps - parameters: - - name: query - in: query - description: '' - required: false - schema: - type: string - - name: pageable - in: query - description: Pageable and to be defined - required: false - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: {} - examples: {} - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: - page: - type: integer - size: - type: integer - total: - type: integer - description: long - content: - type: array - items: - description: T - $ref: '#/components/schemas/OpenAppDTO' - description: List - required: - - page - - size - - total - - content - headers: {} - security: [] - /server/portal-db/config: - post: - summary: 创建/更新portal数据库中的配置 - deprecated: false - description: '' - operationId: createOrUpdatePortalDBConfig - tags: - - Configs - - Apps - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - serverConfig: - $ref: '#/components/schemas/ServerConfig' - required: - - serverConfig - examples: {} - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ServerConfig' - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - security: [] - /server/envs/{env}/config-db/config: - post: - summary: 创建/更新Config数据库中的配置 - deprecated: false - description: '' - operationId: createOrUpdateConfigDBConfig - tags: - - Configs - - Apps - parameters: - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - serverConfig: - $ref: '#/components/schemas/ServerConfig' - required: - - serverConfig - examples: {} - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ServerConfig' - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - security: [] - /server/portal-db/config/find-all-config: - get: - summary: 查找portal数据库中所有的设置 - deprecated: false - description: '' - operationId: findAllPortalDBServerConfig - tags: - - Apps - - Configs - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ServerConfig' - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - security: [] - /server/envs/{env}/config-db/config/find-all-config: - get: - summary: 查找config数据库中所有的设置 - deprecated: false - description: '' - operationId: findAllConfigDBServerConfig - tags: - - Env - - Configs - parameters: - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ServerConfig' - headers: {} - '403': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 错误代码 - default: '403' - message: - type: string - default: Forbidden - timestamp: - type: string - format: date-time - description: 时间 - exception: - type: string - description: 错误类型 - example: AccessDeniedException - required: - - status - - timestamp - - exception - - message - headers: {} - security: [] - /users: - get: - summary: 根据关键字搜索获得多个用户信息 - deprecated: false - description: '' - operationId: searchUsersByKeyword - tags: [] - parameters: - - name: keyword - in: query - description: '' - required: true - schema: - type: string - - name: includeInactiveUsers - in: query - description: '' - required: true - schema: - type: boolean - default: false - - name: offset - in: query - description: should be changed to page - required: true - schema: - type: integer - format: int32 - default: 0 - - name: limit - in: query - description: should be changed to size - required: true - schema: - type: integer - format: int32 - default: 10 - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/UserInfo' - headers: {} - security: [] - /users/enabled: - put: - summary: 修改用户的enable字段 - deprecated: false - description: '' - operationId: changeUserEnabled - tags: [] - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - user: - type: object - properties: {} - description: userPO but to be modified - required: - - user - examples: {} - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - '500': - description: '' - content: - application/json: - schema: - title: '' - type: object - properties: - status: - type: string - description: 状态 - default: '500' - message: - type: string - example: change user enabled is unsupported - timestamp: - type: string - format: date-time - exception: - type: string - example: UnsupportedOperationException.class - required: - - status - - message - - timestamp - - exception - headers: {} - security: [] - /user: - get: - summary: 获取当前用户名 - deprecated: false - description: '' - operationId: getCurrentUserName - tags: [] - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfo' - headers: {} - security: [] - /user/logout: - get: - summary: 登出操作 - deprecated: false - description: '' - operationId: logout - tags: [] - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - security: [] - /users/{userId}: - get: - summary: 根据用户id获取用户信息 - deprecated: false - description: '' - operationId: getUserByUserId - tags: [] - parameters: - - name: userId - in: path - description: '' - required: true - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfo' - headers: {} - security: [] - /organizations: - get: - summary: loadOrganization - deprecated: false - description: 获取部门信息 - operationId: loadOrganization - tags: - - Apps - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenOrganization' - headers: {} - security: [] - /prefix-path: - get: - summary: 获取prefix路径 - deprecated: false - description: '' - operationId: getPrefixPath - tags: [] - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - headers: {} - security: [] - /signin: - get: - summary: login - deprecated: false - description: '' - operationId: login - tags: [] - parameters: - - name: error - in: query - description: '' - required: false - schema: - type: string - - name: logout - in: query - description: '' - required: false - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - default: login.html - headers: {} - security: [] - /sso_heartbeat: - get: - summary: Sso心跳 - deprecated: false - description: '' - operationId: heartbeat - tags: [] - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - '*/*': - schema: - type: object - properties: {} - headers: {} - security: [] - /system-info: - get: - summary: 查询系统信息 - deprecated: false - description: '' - operationId: getSystemInfo - tags: [] - parameters: - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/EnvironmentInfo' - headers: {} - security: [] - /system-info/health: - get: - summary: 查询系统是否健康 - deprecated: false - description: '' - operationId: checkHealth - tags: [] - parameters: - - name: instanceId - in: query - description: '' - required: false - schema: - type: string - - name: X-Auth-Token - in: header - description: '' - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: {} - description: Spring Health - headers: {} - security: [] -components: - schemas: - BaseEntity: - type: object - properties: - id: - type: integer - description: ID 编号 - format: long - isDeleted: - type: boolean - default: false - deletedAt: - type: integer - format: long - dataChangeCreatedBy: - type: string - dataChangeLastModifiedTime: - type: string - format: date - required: - - id - - isDeleted - - deletedAt - - dataChangeCreatedBy - - dataChangeLastModifiedTime - EntityPair: - type: object - properties: - firstEntity: - type: object - properties: {} - description: ID 编号 - title: E - secondEntity: - type: object - properties: {} - title: E - required: - - firstEntity - - secondEntity - ServerConfig: - type: object - properties: - id: - type: integer - description: ID 编号 - format: long - isDeleted: - type: boolean - default: false - deletedAt: - type: integer - format: long - dataChangeCreatedBy: - type: string - dataChangeLastModifiedTime: - type: string - format: date - key: - type: string - value: - type: string - comment: - type: string - required: - - key - - value - - comment - - id - - isDeleted - - deletedAt - - dataChangeCreatedBy - - dataChangeLastModifiedTime - UserInfo: - type: object - properties: - userId: - type: string - name: - type: string - email: - type: string - enabled: - type: integer - format: int32 - required: - - userId - - name - - email - - enabled - KVEntity: - type: object - properties: - key: - type: string - value: - type: string - required: - - key - - value - ReleaseBO: - type: object - properties: - baseInfo: - $ref: '#/components/schemas/OpenReleaseDTO' - items: - type: array - items: - $ref: '#/components/schemas/KVEntity' - uniqueItems: true - required: - - baseInfo - - items - ReleaseHistoryBO: - type: object - properties: - id: - type: integer - format: long - appId: - type: string - clusterName: - type: string - namespaceName: - type: string - branchName: - type: string - operator: - type: string - operatorDisplayName: - type: string - releaseId: - type: integer - format: long - releaseTitle: - type: string - releaseComment: - type: string - releaseTime: - type: string - format: date - releaseTimeFormatted: - type: string - configuration: - type: array - items: - type: object - properties: - firstEntity: - type: string - title: E - description: ID 编号 - secondEntity: - type: string - title: E - required: - - firstEntity - - secondEntity - isReleaseAbandoned: - type: boolean - previousReleaseId: - type: integer - format: long - operation: - type: integer - operationContext: - type: object - properties: {} - additionalProperties: - type: object - properties: - 01K0601PYCZM8QCPSF5S9A1QP7: - x-tmp-pending-properties: true - required: - - 01K0601PYCZM8QCPSF5S9A1QP7 - required: - - id - - appId - - clusterName - - namespaceName - - branchName - - operator - - operatorDisplayName - - releaseId - - releaseTitle - - releaseComment - - releaseTime - - releaseTimeFormatted - - configuration - - previousReleaseId - - isReleaseAbandoned - - operation - - operationContext - ClusterNamespaceRolesAssignedUsers: - type: object - properties: - appId: - type: string - env: - type: string - cluster: - type: string - modifyRoleUsers: - type: array - items: - $ref: '#/components/schemas/UserInfo' - uniqueItems: true - releaseRoleUsers: - type: array - items: - $ref: '#/components/schemas/UserInfo' - uniqueItems: true - required: - - appId - - env - - cluster - - modifyRoleUsers - - releaseRoleUsers - NamespaceRolesAssignedUsers: - type: object - properties: - appId: - type: string - namespaceName: - type: string - modifyRoleUsers: - type: array - items: - $ref: '#/components/schemas/UserInfo' - uniqueItems: true - releaseRoleUsers: - type: array - items: - $ref: '#/components/schemas/UserInfo' - required: - - appId - - namespaceName - - modifyRoleUsers - - releaseRoleUsers - AppRolesAssignedUsers: - type: object - properties: - appId: - type: string - masterUsers: - type: array - items: - $ref: '#/components/schemas/UserInfo' - uniqueItems: true - required: - - appId - - masterUsers - NamespaceUsage: +components: + schemas: + OpenAppDTO: type: object - properties: - namespaceName: - type: string - appId: - type: string - clusterName: - type: string - envName: - type: string - instanceCount: - type: integer - format: int32 - branchInstanceCount: - type: integer - format: int32 - linkedNamespaceCount: - type: integer - format: int32 + description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 required: - - namespaceName - appId - - clusterName - - envName - - instanceCount - - branchInstanceCount - - linkedNamespaceCount - Change: - type: object - properties: - type: - type: string - enum: - - ADDED - - MODIFIED - - DELETED - entity: - type: object - properties: - firstEntity: - title: E - description: ID 编号 - $ref: '#/components/schemas/KVEntity' - secondEntity: - title: E - $ref: '#/components/schemas/KVEntity' - required: - - firstEntity - - secondEntity - required: - - type - - entity - ReleaseCompareResult: - type: object - properties: - changes: - type: array - items: - $ref: '#/components/schemas/Change' - required: - - changes - SystemInfo: - type: object - properties: - version: - type: string - environments: - type: array - items: - $ref: '#/components/schemas/EnvironmentInfo' - required: - - version - - environments - EnvironmentInfo: - type: object - properties: - env: - type: string - active: - type: boolean - metaServerAddress: - type: array - items: - $ref: '#/components/schemas/ServiceDTO' - configServerices: - type: array - items: - $ref: '#/components/schemas/ServiceDTO' - errorMessage: - type: string - required: - - env - - active - - metaServerAddress - - configServerices - - errorMessage - BaseDTO: - type: object - properties: - dataChangeCreatedBy: - type: string - dataChangeLastModifiedBy: - type: string - dataChangeCreatedTime: - type: string - format: date - dataChangeLastModifiedTime: - type: string - format: date - required: - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - OpenAppDTO: - type: object + - name + - ownerName + - ownerEmail properties: dataChangeCreatedBy: type: string + description: 数据创建者用户名,记录是谁创建了这个应用 + example: apollo-admin dataChangeLastModifiedBy: type: string + description: 数据最后修改者用户名,记录最后一次修改应用信息的用户 + example: john.doe dataChangeCreatedTime: type: string - format: date + description: 数据创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 dataChangeLastModifiedTime: type: string - format: date + description: 数据最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 name: type: string + description: 应用名称,用于显示的友好名称 + example: 用户管理系统 appId: type: string + description: 应用唯一标识符,全局唯一的应用ID + example: user-management-service orgId: type: string + description: 组织ID,应用所属组织的唯一标识 + example: tech-dept orgName: type: string + description: 组织名称,应用所属组织的显示名称 + example: 技术部 ownerName: type: string + description: 应用负责人姓名,应用的主要负责人 + example: 张三 ownerEmail: type: string - required: - - name - - appId - - orgId - - orgName - - ownerName - - ownerEmail - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - NamespaceReleaseDTO: - type: object - properties: - releaseTitle: - type: string - releaseComment: - type: string - releasedBy: - type: string - isEmergencyPublish: - type: boolean - required: - - releaseTitle - - releaseComment - - releasedBy - - isEmergencyPublish - NamespaceGrayDelReleaseDTO: - type: object - properties: - releaseTitle: - type: string - releaseComment: - type: string - releasedBy: - type: string - isEmergencyPublish: - type: boolean - grayDelKeys: - type: array - items: - type: string - uniqueItems: true - description: Set - required: - - grayDelKeys - - releaseTitle - - releaseComment - - releasedBy - - isEmergencyPublish - OpenAppNamespaceDTO: - type: object - properties: - dataChangeCreatedBy: - type: string - dataChangeLastModifiedBy: - type: string - dataChangeCreatedTime: - type: string - format: date - dataChangeLastModifiedTime: - type: string - format: date - name: - type: string - appId: - type: string - format: - type: string - isPublic: - type: boolean - appendNamespacePrefix: - type: boolean - description: whether to append namespace prefix for public namespace name - default: true - comment: - type: string - required: - - name - - appId - - format - - isPublic - - appendNamespacePrefix - - comment - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - OpenClusterDTO: - type: object - properties: - dataChangeCreatedBy: - type: string - dataChangeLastModifiedBy: - type: string - dataChangeCreatedTime: - type: string - format: date - dataChangeLastModifiedTime: - type: string - format: date - name: - type: string - appId: - type: string - required: - - name - - appId - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime + description: 应用负责人邮箱地址,用于接收应用相关通知 + example: zhangsan@company.com OpenCreateAppDTO: type: object + description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 + required: + - app properties: - dataChangeCreatedBy: - type: string - dataChangeLastModifiedBy: - type: string - dataChangeCreatedTime: - type: string - format: date - dataChangeLastModifiedTime: - type: string - format: date assignAppRoleToSelf: type: boolean - description: >- - when assignAppRoleToSelf is true, you can do anything with the app - by current token! + description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 + example: true admins: type: array items: type: string - uniqueItems: true - description: | - Set + description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 + example: + - admin + - john.doe + - jane.smith app: $ref: '#/components/schemas/OpenAppDTO' - required: - - assignAppRoleToSelf - - admins - - app - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime + description: 应用基本信息,包含应用的详细配置数据 OpenEnvClusterDTO: type: object + description: 环境集群信息数据传输对象,表示特定环境下的集群列表 + required: + - env + - clusters properties: env: type: string + description: 环境名称,如开发环境、测试环境、生产环境等 + example: DEV clusters: type: array items: type: string - uniqueItems: true - description: Set - required: - - env - - clusters + description: 该环境下的集群名称列表,每个集群代表一个部署单元 + example: + - default + - cluster-1 + - cluster-2 OpenItemDTO: type: object + description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + required: + - key + - value properties: dataChangeCreatedBy: type: string + description: 配置项创建者用户名,记录是谁创建了这个配置项 + example: config-admin dataChangeLastModifiedBy: type: string + description: 配置项最后修改者用户名,记录最后一次修改配置的用户 + example: developer dataChangeCreatedTime: type: string - format: date + description: 配置项创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 dataChangeLastModifiedTime: type: string - format: date + description: 配置项最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 key: type: string + description: 配置项的键名,在同一命名空间内唯一标识一个配置项 + example: database.url type: type: integer + description: 配置项类型,0表示普通配置项,1表示文件类型配置项 + example: 0 value: type: string + description: 配置项的值,可以是字符串、数字、JSON等格式 + example: jdbc:mysql://localhost:3306/mydb comment: type: string - required: - - key - - type - - value - - comment - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - OpenNamespaceDTO: - type: object - properties: - dataChangeCreatedBy: - type: string - dataChangeLastModifiedBy: - type: string - dataChangeCreatedTime: - type: string - format: date - dataChangeLastModifiedTime: - type: string - format: date - id: - type: integer - format: long - appId: - type: string - clusterName: - type: string - namespaceName: - type: string - pattern: '[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*' - required: - - appId - - clusterName - - id - - namespaceName - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - OpenNamespaceLockDTO: - type: object - properties: - namespaceName: - type: string - isLocked: - type: boolean - lockedBy: - type: string - required: - - namespaceName - - isLocked - - lockedBy - OpenOrganizationDto: &ref_0 - type: object - properties: - orgId: - type: string - orgName: - type: string - required: - - orgId - - orgName - OpenPageDTO: + description: 配置项的注释说明,用于描述配置项的用途和含义 + example: 数据库连接URL配置 + OpenPageDTOOpenItemDTO: type: object + description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 properties: page: type: integer + description: 当前页码,从0开始计数 + example: 0 size: type: integer + description: 每页显示的记录数量 + example: 20 total: type: integer - description: long + description: 总记录数,符合查询条件的配置项总数量 + format: int64 + example: 150 content: type: array items: - type: object - properties: {} - description: T - description: List - required: - - page - - size - - total - - content - OpenClusterDTO1: + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + description: 当前页的配置项列表,包含具体的配置项数据 + OpenClusterDTO: type: object - properties: - clusters: - type: array - items: - type: string + description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 required: - - clusters - OpenCommitDTO: - type: object + - name + - appId + - dataChangeCreatedBy properties: dataChangeCreatedBy: type: string + description: 集群创建者用户名,记录是谁创建了这个集群 + example: cluster-admin dataChangeLastModifiedBy: type: string + description: 集群最后修改者用户名,记录最后一次修改集群信息的用户 + example: ops-user dataChangeCreatedTime: type: string - format: date + description: 集群创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 dataChangeLastModifiedTime: type: string - format: date - changeSets: + description: 集群最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 + name: type: string + description: 集群名称,在同一应用和环境下唯一标识一个集群 + example: default appId: type: string - clusterName: - type: string - namespaceName: - type: string - comment: - type: string - required: - - changeSets - - appId - - clusterName - - namespaceName - - comment - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - OpenFavoriteDTO: + description: 所属应用的唯一标识符 + example: user-management-service + MapString: type: object + description: 字符串映射对象,用于表示键值对的配置数据结构 + additionalProperties: + type: string + description: 配置项的值,键为配置项名称,值为配置项内容 + example: configuration-value properties: {} - OpenItemInfo: - type: object - properties: - appId: - type: string - envName: - type: string - clusterName: - type: string - namespaceName: - type: string - key: - type: string - value: - type: string - required: - - appId - - envName - - clusterName - - namespaceName - - key - - value + example: + database.url: jdbc:mysql://localhost:3306/mydb + redis.host: localhost + app.name: MyApplication OpenReleaseDTO: type: object + description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 properties: dataChangeCreatedBy: type: string + description: 发布创建者用户名,记录是谁创建了这次发布 + example: release-manager dataChangeLastModifiedBy: type: string + description: 发布最后修改者用户名,记录最后一次修改发布信息的用户 + example: ops-admin dataChangeCreatedTime: type: string - format: date + description: 发布创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 dataChangeLastModifiedTime: type: string - format: date + description: 发布最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 id: - type: string - releaseKey: - type: string - name: - type: string + type: integer + description: 发布记录的唯一标识符,系统自动生成 + format: int64 + example: 12345 appId: type: string + description: 所属应用的唯一标识符 + example: user-management-service clusterName: type: string + description: 所属集群的名称 + example: default namespaceName: type: string - configurations: + description: 所属命名空间的名称 + example: application + name: type: string + description: 发布名称,用于标识这次发布的版本或描述 + example: Release-20240120-v1.2.0 + configurations: + $ref: '#/components/schemas/MapString' + description: 本次发布包含的所有配置项键值对 comment: type: string - isAbandoned: - type: boolean - required: - - id - - releaseKey - - name - - appId - - clusterName - - namespaceName - - configurations - - comment - - isAbandoned - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - OpenInstanceConfigDTO: + description: 发布备注,描述本次发布的变更内容和目的 + example: 更新数据库连接配置,修复Redis连接超时问题 + NamespaceReleaseDTO: type: object - properties: - release: - $ref: '#/components/schemas/OpenReleaseDTO' - releaseDeliveryTime: - type: string - format: date - dataChangeLastModifiedTime: - type: string - format: date + description: 命名空间发布请求数据传输对象,用于创建新的配置发布 required: - - release - - releaseDeliveryTime - - dataChangeLastModifiedTime - OpenInstanceDTO: - type: object + - releaseTitle + - releasedBy properties: - id: - type: integer - appId: - type: string - clusterName: - type: string - dataCenter: + releaseTitle: type: string - ip: + description: 发布标题,用于标识这次发布的名称或版本号 + example: Release-20240120-v1.2.0 + releaseComment: type: string - configs: - type: array - items: - type: object - properties: - release: - $ref: '#/components/schemas/OpenReleaseDTO' - releaseDeliveryTime: - type: string - format: date - dataChangeLastModifiedTime: - type: string - format: date - required: - - release - - releaseDeliveryTime - - dataChangeLastModifiedTime - dataChangeCreatedTime: + description: 发布备注,详细描述本次发布的变更内容和目的 + example: 更新数据库连接配置,修复Redis连接超时问题,新增日志级别配置 + releasedBy: type: string - format: date - required: - - appId - - id - - clusterName - - dataCenter - - ip - - configs - - dataChangeCreatedTime - OpenVerifiable: - type: object - properties: - isInvalid: + description: 发布操作者用户名,记录是谁执行了这次发布操作 + example: release-manager + isEmergencyPublish: type: boolean - required: - - isInvalid - OpenNamespaceTextModel: + description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 + example: false + NamespaceGrayDelReleaseDTO: type: object - properties: - isInvalid: - type: boolean - appId: - type: string - env: - type: string - clusterName: - type: string - namespaceName: - type: string - namespaceId: - type: integer - format: long - format: - type: string - configText: - type: string - operator: - type: string + description: 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 required: - - appId - - env - - clusterName - - namespaceName - - namespaceId - - format - - configText - - operator - - isInvalid - OpenNamespaceIdentifier: - type: object + - releaseTitle + - releasedBy + - grayDelKeys properties: - isInvalid: - type: boolean - appId: - type: string - env: + releaseTitle: type: string - clusterName: + description: 发布标题,用于标识这次灰度删除发布的名称或版本号 + example: GrayDel-20240120-remove-deprecated-configs + releaseComment: type: string - namespaceName: + description: 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 + example: 删除已废弃的旧版本数据库配置项,清理无用的缓存配置 + releasedBy: type: string - required: - - appId - - env - - clusterName - - namespaceName - - isInvalid - OpenNamespaceSyncModel: - type: object - properties: - isInvalid: + description: 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 + example: config-manager + isEmergencyPublish: type: boolean - syncToNamespaces: - type: array - items: - $ref: '#/components/schemas/OpenNamespaceIdentifier' - syncItems: + description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 + example: false + grayDelKeys: type: array items: - $ref: '#/components/schemas/OpenItemDTO' - required: - - syncToNamespaces - - syncItems - - isInvalid - OpenItemChangeSets: + type: string + description: 需要在灰度发布中删除的配置项键名列表 + example: + - old.database.host + - deprecated.cache.config + - legacy.api.endpoint + OpenAppNamespaceDTO: type: object + description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 + required: + - name + - appId + - format + - dataChangeCreatedBy properties: dataChangeCreatedBy: type: string + description: 命名空间创建者用户名,记录是谁创建了这个应用命名空间 + example: namespace-admin dataChangeLastModifiedBy: type: string + description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 + example: config-manager dataChangeCreatedTime: type: string - format: date + description: 命名空间创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 dataChangeLastModifiedTime: type: string - format: date - createItems: - type: array - items: - $ref: '#/components/schemas/OpenItemDTO' - updateItems: - type: array - items: - $ref: '#/components/schemas/OpenItemDTO' - deleteItems: - type: array - items: - $ref: '#/components/schemas/OpenItemDTO' - required: - - createItems - - updateItems - - deleteItems - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - OpenItemDiffs: - type: object - properties: - namespace: - $ref: '#/components/schemas/OpenNamespaceIdentifier' - diffs: - $ref: '#/components/schemas/OpenItemChangeSets' - extInfo: - type: string - required: - - namespace - - diffs - - extInfo - OpenItemBO: - type: object - properties: - item: - $ref: '#/components/schemas/OpenItemDTO' - isModified: - type: boolean - isDeleted: - type: boolean - oldValue: + description: 命名空间最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 + name: type: string - newValue: + description: 命名空间名称,在同一应用内唯一标识一个命名空间 + example: database-config + appId: type: string - required: - - item - - isModified - - isDeleted - - oldValue - - newValue - OpenNamespaceBO: - type: object - properties: - baseInfo: - $ref: '#/components/schemas/OpenNamespaceDTO' - itemModifiedCnt: - type: integer - format: int32 - items: - type: array - items: - $ref: '#/components/schemas/OpenItemBO' + description: 所属应用的唯一标识符 + example: user-management-service format: type: string + description: 命名空间格式类型,如properties、xml、json、yml等 + example: properties isPublic: type: boolean - parentAppId: - type: string + description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 + example: false + appendNamespacePrefix: + type: boolean + description: 对于公共命名空间,是否在命名空间名称前添加前缀 + default: true + example: true comment: type: string - isConfigHidden: - type: boolean - required: - - baseInfo - - itemModifiedCnt - - items - - format - - isPublic - - parentAppId - - comment - - isConfigHidden - OpenNamespaceReleaseModel: + description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 + example: 数据库相关配置命名空间,包含数据库连接、连接池等配置 + OpenNamespaceDTO: type: object + description: Apollo命名空间数据传输对象,表示特定环境和集群下的命名空间及其配置项 properties: - isInvalid: - type: boolean - appId: + dataChangeCreatedBy: type: string - env: + description: 命名空间创建者用户名,记录是谁创建了这个命名空间实例 + example: namespace-creator + dataChangeLastModifiedBy: + type: string + description: 命名空间最后修改者用户名,记录最后一次修改命名空间的用户 + example: config-editor + dataChangeCreatedTime: + type: string + description: 命名空间创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 + dataChangeLastModifiedTime: + type: string + description: 命名空间最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 + appId: type: string + description: 所属应用的唯一标识符 + example: user-management-service clusterName: type: string + description: 所属集群的名称 + example: default namespaceName: type: string - releaseTitle: + description: 命名空间名称,标识配置的分组 + example: application + comment: type: string - releaseComment: + description: 命名空间备注说明,描述命名空间的用途 + example: 应用主配置命名空间,包含核心业务配置 + format: type: string - releasedBy: + description: 命名空间格式类型,如properties、xml、json、yml等 + example: properties + isPublic: + type: boolean + description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 + example: false + items: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + description: 命名空间包含的所有配置项列表 + OpenNamespaceLockDTO: + type: object + description: Apollo命名空间锁状态数据传输对象,表示命名空间的锁定状态信息 + properties: + namespaceName: type: string - isEmergencyPublish: + description: 命名空间名称,标识被锁定的命名空间 + example: application + isLocked: type: boolean - required: - - appId - - env - - clusterName - - namespaceName - - releaseTitle - - releaseComment - - releasedBy - - isEmergencyPublish - - isInvalid - OpenGrayReleaseRuleItemDTO: + description: 命名空间是否被锁定,锁定状态下不允许修改配置 + example: true + lockedBy: + type: string + description: 锁定操作者用户名,记录是谁锁定了这个命名空间 + example: config-admin + OpenOrganizationDto: type: object + description: Apollo组织信息数据传输对象,表示系统中的组织架构信息 + required: + - orgId + - orgName properties: - ALL_IP: + orgId: type: string - const: '*' - ALL_Label: + description: 组织唯一标识符,用于在系统中唯一标识一个组织 + example: tech-dept + orgName: type: string - const: '*' + description: 组织名称,用于显示的友好名称 + example: 技术部 + OpenGrayReleaseRuleItemDTO: + type: object + description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 + properties: clientAppId: type: string + description: 客户端应用ID,指定哪个应用可以获取灰度配置 + example: mobile-app clientIpList: type: array items: type: string - uniqueItems: true + description: 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 + example: + - 192.168.1.100 + - 192.168.1.101 + - 10.0.0.50 clientLabelList: type: array items: type: string - uniqueItems: true - required: - - ALL_IP - - ALL_Label - - clientAppId - - clientIpList - - clientLabelList + description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 + example: + - beta-user + - internal-test + - canary-group OpenGrayReleaseRuleDTO: type: object + description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 properties: dataChangeCreatedBy: type: string + description: 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 + example: gray-release-admin dataChangeLastModifiedBy: type: string + description: 灰度规则最后修改者用户名,记录最后一次修改规则的用户 + example: ops-manager dataChangeCreatedTime: type: string - format: date + description: 灰度规则创建时间,ISO 8601格式的时间戳 + example: 2024-01-15T10:30:00.000+0800 dataChangeLastModifiedTime: type: string - format: date + description: 灰度规则最后修改时间,ISO 8601格式的时间戳 + example: 2024-01-20T14:25:30.000+0800 appId: type: string + description: 所属应用的唯一标识符 + example: user-management-service clusterName: type: string + description: 所属集群的名称 + example: default namespaceName: type: string + description: 所属命名空间的名称 + example: application branchName: type: string + description: 灰度分支名称,标识灰度发布的分支 + example: gray-branch-20240120 ruleItems: type: array items: $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' - uniqueItems: true - releaseId: - type: integer - format: long - required: - - appId - - clusterName - - namespaceName - - branchName - - ruleItems - - releaseId - - dataChangeCreatedBy - - dataChangeLastModifiedBy - - dataChangeCreatedTime - - dataChangeLastModifiedTime - AppNamespace: - type: object - properties: - id: - type: integer - description: ID 编号 - format: long - isDeleted: - type: boolean - default: false - deletedAt: - type: integer - format: long - dataChangeCreatedBy: - type: string - dataChangeLastModifiedTime: - type: string - format: date - name: - type: string - appId: - type: string - format: - type: string - isPublic: - type: string - comment: - type: string - required: - - name - - appId - - format - - isPublic - - comment - - id - - isDeleted - - deletedAt - - dataChangeCreatedBy - - dataChangeLastModifiedTime - OpenNamespaceCreationModel: - type: object - properties: - env: - type: string - namespace: - $ref: '#/components/schemas/OpenNamespaceDTO' - required: - - env - - namespace - OpenLockInfo: - type: object - properties: - lockOwner: - type: string - isEmergencyPublishAllowed: - type: boolean - required: - - lockOwner - - isEmergencyPublishAllowed - OpenOrganization: *ref_0 - OpenPermissionCondition: - type: object - properties: - hasPermission: - type: boolean - required: - - hasPermission - OpenNamespaceEnvRolesAssignedUsers: - type: object - properties: - env: - type: string - required: - - env - ServiceDTO: - type: object - properties: - appName: - type: string - instanceId: - type: string - homepageUrl: - type: string - required: - - appName - - instanceId - - homepageUrl - securitySchemes: {} + description: com.ctrip.framework.apollo.openapi.dto.OpenGrayReleaseRuleItemDTO + description: 灰度发布规则项列表,包含具体的灰度规则条件 + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: Authorization + description: | + Apollo OpenAPI访问令牌,用于身份验证和权限控制。 + + **获取方式:** + 1. 登录Apollo Portal管理界面 + 2. 进入"管理员工具" -> "开放平台授权管理" + 3. 点击"创建Token"按钮 + 4. 填写Token名称和选择授权的应用 + 5. 创建成功后复制生成的Token值 + + **使用方法:** + 在请求头中添加:`Authorization: your-token-value` + + **注意事项:** + - Token具有特定的应用访问权限 + - 请妥善保管Token,避免泄露 + - Token可以在管理界面中禁用或删除 servers: [] security: [] From 72066c4d413dbbdb94a497c1d2e773876693b887 Mon Sep 17 00:00:00 2001 From: accccing Date: Sat, 6 Sep 2025 14:39:25 +0800 Subject: [PATCH 4/6] chore(openapi): rename Apollo-OpenAPI.yaml to apollo-openapi.yaml Co-authored-by: arrow2020 <316166287@qq.com> --- Apollo-OpenAPI.yaml | 2499 ----------------------- apollo-openapi.yaml | 4588 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 4588 insertions(+), 2499 deletions(-) delete mode 100644 Apollo-OpenAPI.yaml create mode 100644 apollo-openapi.yaml diff --git a/Apollo-OpenAPI.yaml b/Apollo-OpenAPI.yaml deleted file mode 100644 index c24b1ed2..00000000 --- a/Apollo-OpenAPI.yaml +++ /dev/null @@ -1,2499 +0,0 @@ -openapi: 3.0.1 -info: - title: Apollo - description: '' - version: 1.0.0 -tags: [] -paths: - /openapi/v1/apps: - post: - summary: createApp - deprecated: false - description: 创建新的Apollo应用,包括应用基本信息设置和管理员权限分配 - tags: [] - parameters: - - name: Authorization - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenCreateAppDTO' - description: 创建应用的请求参数,包含应用基本信息和管理员配置 - responses: - '200': - description: 操作成功 - content: - application/json: - schema: - type: object - properties: {} - headers: {} - security: [] - get: - summary: findApps - deprecated: false - description: 查询应用列表,支持根据应用ID列表进行筛选查询 - tags: [] - parameters: - - name: appIds - in: query - description: 应用ID列表,多个ID用逗号分隔,用于批量查询指定的应用信息 - required: false - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回数据列表 - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenAppDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenAppDTO - example: - - dataChangeCreatedBy: 'apollo-admin' - dataChangeLastModifiedBy: 'john.doe' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - name: '用户管理系统' - appId: 'user-management-service' - orgId: 'tech-dept' - orgName: '技术部' - ownerName: '张三' - ownerEmail: 'zhangsan@company.com' - - dataChangeCreatedBy: 'apollo-admin' - dataChangeLastModifiedBy: 'jane.smith' - dataChangeCreatedTime: '2024-01-10T09:15:00.000+0800' - dataChangeLastModifiedTime: '2024-01-18T16:40:15.000+0800' - name: '订单处理系统' - appId: 'order-processing-service' - orgId: 'business-dept' - orgName: '业务部' - ownerName: '李四' - ownerEmail: 'lisi@company.com' - headers: {} - security: [] - /openapi/v1/apps/{appId}/envclusters: - get: - summary: getEnvClusterInfo - deprecated: false - description: 获取指定应用在各个环境下的集群信息列表 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回数据列表 - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenEnvClusterDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO - example: - - env: 'DEV' - clusters: - - 'default' - - 'beijing' - - 'shanghai' - - env: 'TEST' - clusters: - - 'default' - - 'integration-test' - - env: 'PRO' - clusters: - - 'default' - - 'cluster-1' - - 'cluster-2' - headers: {} - security: [] - /openapi/v1/apps/authorized: - get: - summary: findAppsAuthorized - deprecated: false - description: 查询当前Token有权限操作的应用列表 - tags: [] - parameters: - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回数据列表 - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenAppDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenAppDTO - description: which apps can be operated by open api - example: - - dataChangeCreatedBy: 'apollo-admin' - dataChangeLastModifiedBy: 'config-manager' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - name: '用户管理系统' - appId: 'user-management-service' - orgId: 'tech-dept' - orgName: '技术部' - ownerName: '张三' - ownerEmail: 'zhangsan@company.com' - - dataChangeCreatedBy: 'apollo-admin' - dataChangeLastModifiedBy: 'ops-user' - dataChangeCreatedTime: '2024-01-12T11:20:00.000+0800' - dataChangeLastModifiedTime: '2024-01-19T13:15:45.000+0800' - name: '支付网关服务' - appId: 'payment-gateway-service' - orgId: 'finance-dept' - orgName: '财务部' - ownerName: '王五' - ownerEmail: 'wangwu@company.com' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key:.+}: - get: - summary: getItem - deprecated: false - description: 获取指定配置项的详细信息 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: key - in: path - description: 配置项的键名,用于唯一标识一个配置项 - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - required: false - example: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO - example: - dataChangeCreatedBy: 'config-admin' - dataChangeLastModifiedBy: 'developer' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - key: 'database.url' - type: 0 - value: 'jdbc:mysql://localhost:3306/mydb?useSSL=false&serverTimezone=Asia/Shanghai' - comment: '数据库连接URL配置,包含SSL和时区设置' - headers: {} - security: [] - put: - summary: updateItem - deprecated: false - description: 更新指定配置项的值和属性信息 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: key - in: path - description: 配置项的键名,用于唯一标识一个配置项 - required: true - example: '' - schema: - type: string - - name: createIfNotExists - in: query - description: 如果配置项不存在是否创建。当设置为true时,请求体中的dataChangeCreatedBy字段变为必填 - required: true - example: 'false' - schema: - type: boolean - - name: Authorization - in: header - description: '' - required: false - example: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 配置项信息,包含键名、值、类型和备注等 - responses: - '200': - description: 操作成功 - content: - application/json: - schema: - type: object - properties: {} - headers: {} - security: [] - delete: - summary: deleteItem - deprecated: false - description: 删除指定的配置项 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: key - in: path - description: 配置项的键名,用于唯一标识一个配置项 - required: true - example: '' - schema: - type: string - - name: operator - in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 - required: true - schema: - type: string - - name: Authorization - in: header - description: '' - required: false - example: '' - schema: - type: string - responses: - '200': - description: 操作成功 - content: - application/json: - schema: - type: object - properties: {} - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key:.+}: - get: - summary: getItemByEncodedKey - deprecated: false - description: 通过编码后的键名获取配置项信息 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: key - in: path - description: 配置项的键名,用于唯一标识一个配置项 - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - required: false - example: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO - example: - dataChangeCreatedBy: 'config-admin' - dataChangeLastModifiedBy: 'developer' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - key: 'redis.cluster.nodes' - type: 0 - value: '192.168.1.10:7000,192.168.1.11:7001,192.168.1.12:7002' - comment: 'Redis集群节点配置,用于分布式缓存' - headers: {} - security: [] - put: - summary: updateItemByEncodedKey - deprecated: false - description: 通过编码后的键名更新配置项 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: key - in: path - description: 配置项的键名,用于唯一标识一个配置项 - required: true - example: '' - schema: - type: string - - name: createIfNotExists - in: query - description: 如果配置项不存在是否创建。当设置为true时,请求体中的dataChangeCreatedBy字段变为必填 - required: true - example: 'false' - schema: - type: boolean - - name: Authorization - in: header - description: '' - required: false - example: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 配置项信息,包含键名、值、类型和备注等 - responses: - '200': - description: 操作成功 - content: - application/json: - schema: - type: object - properties: {} - headers: {} - security: [] - delete: - summary: deleteItemByEncodedKey - deprecated: false - description: 通过编码后的键名删除配置项 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: key - in: path - description: 配置项的键名,用于唯一标识一个配置项 - required: true - example: '' - schema: - type: string - - name: operator - in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 - required: true - schema: - type: string - - name: Authorization - in: header - description: '' - required: false - example: '' - schema: - type: string - responses: - '200': - description: 操作成功 - content: - application/json: - schema: - type: object - properties: {} - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - post: - summary: createItem - deprecated: false - description: 在指定命名空间中创建新的配置项 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 配置项信息,包含键名、值、类型和备注等 - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO - example: - dataChangeCreatedBy: 'config-manager' - dataChangeLastModifiedBy: 'config-manager' - dataChangeCreatedTime: '2024-01-20T15:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T15:30:00.000+0800' - key: 'app.log.level' - type: 0 - value: 'INFO' - comment: '应用日志级别配置,控制日志输出详细程度' - headers: {} - security: [] - get: - summary: findItemsByNamespace - deprecated: false - description: 分页查询指定命名空间下的配置项列表 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: page - in: query - description: 页码,从0开始,用于分页查询配置项列表 - required: true - example: 0 - schema: - type: integer - - name: size - in: query - description: 每页记录数,用于控制分页查询每页返回的配置项数量,建议值为50 - required: true - example: 50 - schema: - type: integer - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenPageDTOOpenItemDTO' - example: - page: 0 - size: 50 - total: 125 - content: - - dataChangeCreatedBy: 'config-admin' - dataChangeLastModifiedBy: 'developer' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - key: 'database.url' - type: 0 - value: 'jdbc:mysql://localhost:3306/mydb' - comment: '数据库连接URL配置' - - dataChangeCreatedBy: 'config-admin' - dataChangeLastModifiedBy: 'ops-user' - dataChangeCreatedTime: '2024-01-15T11:15:00.000+0800' - dataChangeLastModifiedTime: '2024-01-19T16:45:20.000+0800' - key: 'redis.host' - type: 0 - value: '192.168.1.100' - comment: 'Redis服务器地址配置' - - dataChangeCreatedBy: 'config-manager' - dataChangeLastModifiedBy: 'config-manager' - dataChangeCreatedTime: '2024-01-16T09:20:00.000+0800' - dataChangeLastModifiedTime: '2024-01-16T09:20:00.000+0800' - key: 'app.log.level' - type: 0 - value: 'INFO' - comment: '应用日志级别配置' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName:.+}: - get: - summary: getCluster - deprecated: false - description: 获取指定集群的详细信息 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - required: false - example: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenClusterDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenClusterDTO - example: - dataChangeCreatedBy: 'cluster-admin' - dataChangeLastModifiedBy: 'ops-user' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - name: 'default' - appId: 'user-management-service' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters: - post: - summary: createCluster - deprecated: false - description: 在指定环境下为应用创建新的集群 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenClusterDTO' - description: 集群配置信息,包含集群名称、应用ID和创建者等 - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenClusterDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenClusterDTO - example: - dataChangeCreatedBy: 'cluster-admin' - dataChangeLastModifiedBy: 'cluster-admin' - dataChangeCreatedTime: '2024-01-20T16:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T16:30:00.000+0800' - name: 'beijing-cluster' - appId: 'user-management-service' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: - post: - summary: createRelease - deprecated: false - description: 发布指定命名空间的配置变更 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - description: 发布配置信息,包含发布标题、发布者和发布备注等 - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO - example: - dataChangeCreatedBy: 'release-manager' - dataChangeLastModifiedBy: 'release-manager' - dataChangeCreatedTime: '2024-01-20T17:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T17:30:00.000+0800' - id: 12345 - appId: 'user-management-service' - clusterName: 'default' - namespaceName: 'application' - name: 'Release-20240120-v1.2.0' - configurations: - 'database.url': 'jdbc:mysql://localhost:3306/mydb' - 'redis.host': '192.168.1.100' - 'app.log.level': 'INFO' - comment: '更新数据库连接配置,修复Redis连接超时问题' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: - get: - summary: loadLatestActiveRelease - deprecated: false - description: 获取指定命名空间的最新有效发布版本 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO - example: - dataChangeCreatedBy: 'release-manager' - dataChangeLastModifiedBy: 'ops-admin' - dataChangeCreatedTime: '2024-01-20T17:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T18:15:25.000+0800' - id: 12345 - appId: 'user-management-service' - clusterName: 'default' - namespaceName: 'application' - name: 'Release-20240120-v1.2.0' - configurations: - 'database.url': 'jdbc:mysql://localhost:3306/mydb' - 'redis.host': '192.168.1.100' - 'app.log.level': 'INFO' - 'server.port': '8080' - comment: '最新生产环境配置发布,包含数据库和缓存配置更新' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: - post: - summary: merge - deprecated: false - description: 将灰度分支的配置合并到主分支并发布 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: branchName - in: path - description: 灰度分支名称,用于标识灰度发布的分支 - required: true - example: '' - schema: - type: string - - name: deleteBranch - in: query - description: 合并完成后是否删除灰度分支 - required: true - example: 'true' - schema: - type: boolean - - name: Authorization - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - description: 发布配置信息,包含发布标题、发布者和发布备注等 - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - id: 0 - appId: '' - clusterName: '' - namespaceName: '' - name: '' - configurations: - '': '' - comment: '' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: - post: - summary: createGrayRelease - deprecated: false - description: 创建灰度发布,将分支配置发布给特定用户群体 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: branchName - in: path - description: 灰度分支名称,用于标识灰度发布的分支 - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - description: 发布配置信息,包含发布标题、发布者和发布备注等 - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - id: 0 - appId: '' - clusterName: '' - namespaceName: '' - name: '' - configurations: - '': '' - comment: '' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases: - post: - summary: createGrayDelRelease - deprecated: false - description: 创建灰度删除发布,删除指定的配置项并发布给特定用户群体 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: branchName - in: path - description: 灰度分支名称,用于标识灰度发布的分支 - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceGrayDelReleaseDTO' - description: 灰度删除发布配置信息,包含要删除的配置项键名列表 - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - id: 0 - appId: '' - clusterName: '' - namespaceName: '' - name: '' - configurations: - '': '' - comment: '' - headers: {} - security: [] - /openapi/v1/envs/{env}/releases/{releaseId}/rollback: - put: - summary: rollback - deprecated: false - description: 回滚到指定的发布版本 - tags: [] - parameters: - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: releaseId - in: path - description: 发布记录的唯一标识符,用于标识特定的配置发布版本 - required: true - example: 0 - schema: - type: integer - - name: operator - in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 - required: true - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 操作成功 - content: - application/json: - schema: - type: object - properties: {} - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: - get: - summary: getInstanceCountByNamespace - deprecated: false - description: 获取指定命名空间的客户端实例数量 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回统计数据 - content: - application/json: - schema: - type: integer - example: 15 - headers: {} - security: [] - /openapi/v1/apps/{appId}/appnamespaces: - post: - summary: createNamespace - deprecated: false - description: 为指定应用创建新的命名空间 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - description: 应用命名空间配置信息,包含命名空间名称、格式类型等 - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenAppNamespaceDTO - example: - dataChangeCreatedBy: 'namespace-admin' - dataChangeLastModifiedBy: 'namespace-admin' - dataChangeCreatedTime: '2024-01-20T18:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T18:30:00.000+0800' - name: 'database-config' - appId: 'user-management-service' - format: 'properties' - isPublic: false - appendNamespacePrefix: true - comment: '数据库相关配置命名空间,包含数据库连接、连接池等配置' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: - get: - summary: findNamespaces - deprecated: false - description: 查询指定集群下的所有命名空间列表 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: fillItemDetail - in: query - description: 是否填充配置项详细信息,true表示返回配置项列表,false表示只返回命名空间基本信息 - required: true - example: 'true' - schema: - type: boolean - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回数据列表 - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO - example: - - dataChangeCreatedBy: 'namespace-creator' - dataChangeLastModifiedBy: 'config-editor' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - appId: 'user-management-service' - clusterName: 'default' - namespaceName: 'application' - comment: '应用主配置命名空间,包含核心业务配置' - format: 'properties' - isPublic: false - items: - - dataChangeCreatedBy: 'config-admin' - dataChangeLastModifiedBy: 'developer' - dataChangeCreatedTime: '2024-01-15T10:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T14:25:30.000+0800' - key: 'database.url' - type: 0 - value: 'jdbc:mysql://localhost:3306/mydb' - comment: '数据库连接URL配置' - - dataChangeCreatedBy: 'namespace-creator' - dataChangeLastModifiedBy: 'config-manager' - dataChangeCreatedTime: '2024-01-16T09:20:00.000+0800' - dataChangeLastModifiedTime: '2024-01-18T15:30:10.000+0800' - appId: 'user-management-service' - clusterName: 'default' - namespaceName: 'database-config' - comment: '数据库专用配置命名空间' - format: 'properties' - isPublic: false - items: - - dataChangeCreatedBy: 'dba-admin' - dataChangeLastModifiedBy: 'dba-admin' - dataChangeCreatedTime: '2024-01-16T09:25:00.000+0800' - dataChangeLastModifiedTime: '2024-01-18T15:30:10.000+0800' - key: 'connection.pool.size' - type: 0 - value: '20' - comment: '数据库连接池大小配置' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName:.+}: - get: - summary: loadNamespace - deprecated: false - description: 获取指定命名空间的详细信息和配置项 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: fillItemDetail - in: query - description: 是否填充配置项详细信息,true表示返回配置项列表,false表示只返回命名空间基本信息 - required: true - example: 'true' - schema: - type: boolean - - name: Authorization - in: header - description: '' - required: false - example: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - appId: '' - clusterName: '' - namespaceName: '' - comment: '' - format: '' - isPublic: false - items: - - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - key: '' - type: 0 - value: '' - comment: '' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: - get: - summary: getNamespaceLock - deprecated: false - description: 获取指定命名空间的锁定状态信息 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceLockDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceLockDTO - example: - namespaceName: 'application' - isLocked: true - lockedBy: 'config-admin' - headers: {} - security: [] - /openapi/v1/organizations: - get: - summary: getOrganization - deprecated: false - description: 获取系统中所有组织的列表信息 - tags: [] - parameters: - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回数据列表 - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OpenOrganizationDto' - description: com.ctrip.framework.apollo.openapi.dto.OpenOrganizationDto - example: - - orgId: 'tech-dept' - orgName: '技术部' - - orgId: 'business-dept' - orgName: '业务部' - - orgId: 'finance-dept' - orgName: '财务部' - - orgId: 'ops-dept' - orgName: '运维部' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches: - get: - summary: findBranch - deprecated: false - description: 查找指定命名空间的灰度分支信息 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO - example: - dataChangeCreatedBy: 'gray-release-admin' - dataChangeLastModifiedBy: 'config-editor' - dataChangeCreatedTime: '2024-01-20T19:00:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T20:15:30.000+0800' - appId: 'user-management-service' - clusterName: 'gray-branch-20240120' - namespaceName: 'application' - comment: '灰度发布分支,用于测试新配置' - format: 'properties' - isPublic: false - items: - - dataChangeCreatedBy: 'gray-release-admin' - dataChangeLastModifiedBy: 'config-editor' - dataChangeCreatedTime: '2024-01-20T19:05:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T20:15:30.000+0800' - key: 'feature.new-algorithm.enabled' - type: 0 - value: 'true' - comment: '新算法功能开关,灰度测试用' - - dataChangeCreatedBy: 'gray-release-admin' - dataChangeLastModifiedBy: 'gray-release-admin' - dataChangeCreatedTime: '2024-01-20T19:10:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T19:10:00.000+0800' - key: 'cache.timeout' - type: 0 - value: '300' - comment: '缓存超时时间,灰度环境专用配置' - headers: {} - security: [] - post: - summary: createBranch - deprecated: false - description: 为指定命名空间创建灰度发布分支 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: operator - in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 - required: true - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - appId: '' - clusterName: '' - namespaceName: '' - comment: '' - format: '' - isPublic: false - items: - - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - key: '' - type: 0 - value: '' - comment: '' - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: - delete: - summary: deleteBranch - deprecated: false - description: 删除指定的灰度发布分支 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: branchName - in: path - description: 灰度分支名称,用于标识灰度发布的分支 - required: true - example: '' - schema: - type: string - - name: operator - in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 - required: true - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 操作成功 - content: - application/json: - schema: - type: object - properties: {} - headers: {} - security: [] - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules: - get: - summary: getBranchGrayRules - deprecated: false - description: 获取灰度分支的发布规则配置 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: branchName - in: path - description: 灰度分支名称,用于标识灰度发布的分支 - required: true - example: '' - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - responses: - '200': - description: 查询成功,返回详细数据 - content: - application/json: - schema: - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenGrayReleaseRuleDTO - example: - dataChangeCreatedBy: 'gray-release-admin' - dataChangeLastModifiedBy: 'ops-manager' - dataChangeCreatedTime: '2024-01-20T19:30:00.000+0800' - dataChangeLastModifiedTime: '2024-01-20T20:45:15.000+0800' - appId: 'user-management-service' - clusterName: 'default' - namespaceName: 'application' - branchName: 'gray-branch-20240120' - ruleItems: - - clientAppId: 'mobile-app' - clientIpList: - - '192.168.1.100' - - '192.168.1.101' - - '10.0.0.50' - clientLabelList: - - 'beta-user' - - 'internal-test' - - clientAppId: 'web-frontend' - clientIpList: - - '192.168.2.10' - - '192.168.2.11' - clientLabelList: - - 'canary-group' - - 'qa-team' - headers: {} - security: [] - put: - summary: updateBranchRules - deprecated: false - description: 更新灰度分支的发布规则配置 - tags: [] - parameters: - - name: appId - in: path - description: 应用唯一标识符,用于标识特定的Apollo应用 - required: true - example: '' - schema: - type: string - - name: env - in: path - description: 环境名称,如DEV、TEST、PRE、PRO等,用于区分不同的部署环境 - required: true - example: '' - schema: - type: string - - name: clusterName - in: path - description: 集群名称,用于标识应用在特定环境下的集群,默认为default - required: true - example: '' - schema: - type: string - - name: namespaceName - in: path - description: 命名空间名称,用于组织和管理配置项,默认为application - required: true - example: '' - schema: - type: string - - name: branchName - in: path - description: 灰度分支名称,用于标识灰度发布的分支 - required: true - example: '' - schema: - type: string - - name: operator - in: query - description: 执行删除操作的用户名,必须是系统中存在的用户 - required: true - schema: - type: string - - name: Authorization - in: header - description: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' - description: 灰度发布规则配置,包含灰度规则项列表和生效条件 - responses: - '200': - description: 操作成功 - content: - application/json: - schema: - type: object - properties: {} - headers: {} - security: [] -components: - schemas: - OpenAppDTO: - type: object - description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - required: - - appId - - name - - ownerName - - ownerEmail - properties: - dataChangeCreatedBy: - type: string - description: 数据创建者用户名,记录是谁创建了这个应用 - example: apollo-admin - dataChangeLastModifiedBy: - type: string - description: 数据最后修改者用户名,记录最后一次修改应用信息的用户 - example: john.doe - dataChangeCreatedTime: - type: string - description: 数据创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 数据最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - name: - type: string - description: 应用名称,用于显示的友好名称 - example: 用户管理系统 - appId: - type: string - description: 应用唯一标识符,全局唯一的应用ID - example: user-management-service - orgId: - type: string - description: 组织ID,应用所属组织的唯一标识 - example: tech-dept - orgName: - type: string - description: 组织名称,应用所属组织的显示名称 - example: 技术部 - ownerName: - type: string - description: 应用负责人姓名,应用的主要负责人 - example: 张三 - ownerEmail: - type: string - description: 应用负责人邮箱地址,用于接收应用相关通知 - example: zhangsan@company.com - OpenCreateAppDTO: - type: object - description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - required: - - app - properties: - assignAppRoleToSelf: - type: boolean - description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - example: true - admins: - type: array - items: - type: string - description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - example: - - admin - - john.doe - - jane.smith - app: - $ref: '#/components/schemas/OpenAppDTO' - description: 应用基本信息,包含应用的详细配置数据 - OpenEnvClusterDTO: - type: object - description: 环境集群信息数据传输对象,表示特定环境下的集群列表 - required: - - env - - clusters - properties: - env: - type: string - description: 环境名称,如开发环境、测试环境、生产环境等 - example: DEV - clusters: - type: array - items: - type: string - description: 该环境下的集群名称列表,每个集群代表一个部署单元 - example: - - default - - cluster-1 - - cluster-2 - OpenItemDTO: - type: object - description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - required: - - key - - value - properties: - dataChangeCreatedBy: - type: string - description: 配置项创建者用户名,记录是谁创建了这个配置项 - example: config-admin - dataChangeLastModifiedBy: - type: string - description: 配置项最后修改者用户名,记录最后一次修改配置的用户 - example: developer - dataChangeCreatedTime: - type: string - description: 配置项创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 配置项最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - key: - type: string - description: 配置项的键名,在同一命名空间内唯一标识一个配置项 - example: database.url - type: - type: integer - description: 配置项类型,0表示普通配置项,1表示文件类型配置项 - example: 0 - value: - type: string - description: 配置项的值,可以是字符串、数字、JSON等格式 - example: jdbc:mysql://localhost:3306/mydb - comment: - type: string - description: 配置项的注释说明,用于描述配置项的用途和含义 - example: 数据库连接URL配置 - OpenPageDTOOpenItemDTO: - type: object - description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - properties: - page: - type: integer - description: 当前页码,从0开始计数 - example: 0 - size: - type: integer - description: 每页显示的记录数量 - example: 20 - total: - type: integer - description: 总记录数,符合查询条件的配置项总数量 - format: int64 - example: 150 - content: - type: array - items: - $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO - description: 当前页的配置项列表,包含具体的配置项数据 - OpenClusterDTO: - type: object - description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - required: - - name - - appId - - dataChangeCreatedBy - properties: - dataChangeCreatedBy: - type: string - description: 集群创建者用户名,记录是谁创建了这个集群 - example: cluster-admin - dataChangeLastModifiedBy: - type: string - description: 集群最后修改者用户名,记录最后一次修改集群信息的用户 - example: ops-user - dataChangeCreatedTime: - type: string - description: 集群创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 集群最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - name: - type: string - description: 集群名称,在同一应用和环境下唯一标识一个集群 - example: default - appId: - type: string - description: 所属应用的唯一标识符 - example: user-management-service - MapString: - type: object - description: 字符串映射对象,用于表示键值对的配置数据结构 - additionalProperties: - type: string - description: 配置项的值,键为配置项名称,值为配置项内容 - example: configuration-value - properties: {} - example: - database.url: jdbc:mysql://localhost:3306/mydb - redis.host: localhost - app.name: MyApplication - OpenReleaseDTO: - type: object - description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - properties: - dataChangeCreatedBy: - type: string - description: 发布创建者用户名,记录是谁创建了这次发布 - example: release-manager - dataChangeLastModifiedBy: - type: string - description: 发布最后修改者用户名,记录最后一次修改发布信息的用户 - example: ops-admin - dataChangeCreatedTime: - type: string - description: 发布创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 发布最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - id: - type: integer - description: 发布记录的唯一标识符,系统自动生成 - format: int64 - example: 12345 - appId: - type: string - description: 所属应用的唯一标识符 - example: user-management-service - clusterName: - type: string - description: 所属集群的名称 - example: default - namespaceName: - type: string - description: 所属命名空间的名称 - example: application - name: - type: string - description: 发布名称,用于标识这次发布的版本或描述 - example: Release-20240120-v1.2.0 - configurations: - $ref: '#/components/schemas/MapString' - description: 本次发布包含的所有配置项键值对 - comment: - type: string - description: 发布备注,描述本次发布的变更内容和目的 - example: 更新数据库连接配置,修复Redis连接超时问题 - NamespaceReleaseDTO: - type: object - description: 命名空间发布请求数据传输对象,用于创建新的配置发布 - required: - - releaseTitle - - releasedBy - properties: - releaseTitle: - type: string - description: 发布标题,用于标识这次发布的名称或版本号 - example: Release-20240120-v1.2.0 - releaseComment: - type: string - description: 发布备注,详细描述本次发布的变更内容和目的 - example: 更新数据库连接配置,修复Redis连接超时问题,新增日志级别配置 - releasedBy: - type: string - description: 发布操作者用户名,记录是谁执行了这次发布操作 - example: release-manager - isEmergencyPublish: - type: boolean - description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 - example: false - NamespaceGrayDelReleaseDTO: - type: object - description: 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - required: - - releaseTitle - - releasedBy - - grayDelKeys - properties: - releaseTitle: - type: string - description: 发布标题,用于标识这次灰度删除发布的名称或版本号 - example: GrayDel-20240120-remove-deprecated-configs - releaseComment: - type: string - description: 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - example: 删除已废弃的旧版本数据库配置项,清理无用的缓存配置 - releasedBy: - type: string - description: 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - example: config-manager - isEmergencyPublish: - type: boolean - description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 - example: false - grayDelKeys: - type: array - items: - type: string - description: 需要在灰度发布中删除的配置项键名列表 - example: - - old.database.host - - deprecated.cache.config - - legacy.api.endpoint - OpenAppNamespaceDTO: - type: object - description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - required: - - name - - appId - - format - - dataChangeCreatedBy - properties: - dataChangeCreatedBy: - type: string - description: 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - example: namespace-admin - dataChangeLastModifiedBy: - type: string - description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - example: config-manager - dataChangeCreatedTime: - type: string - description: 命名空间创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 命名空间最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - name: - type: string - description: 命名空间名称,在同一应用内唯一标识一个命名空间 - example: database-config - appId: - type: string - description: 所属应用的唯一标识符 - example: user-management-service - format: - type: string - description: 命名空间格式类型,如properties、xml、json、yml等 - example: properties - isPublic: - type: boolean - description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - example: false - appendNamespacePrefix: - type: boolean - description: 对于公共命名空间,是否在命名空间名称前添加前缀 - default: true - example: true - comment: - type: string - description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 - example: 数据库相关配置命名空间,包含数据库连接、连接池等配置 - OpenNamespaceDTO: - type: object - description: Apollo命名空间数据传输对象,表示特定环境和集群下的命名空间及其配置项 - properties: - dataChangeCreatedBy: - type: string - description: 命名空间创建者用户名,记录是谁创建了这个命名空间实例 - example: namespace-creator - dataChangeLastModifiedBy: - type: string - description: 命名空间最后修改者用户名,记录最后一次修改命名空间的用户 - example: config-editor - dataChangeCreatedTime: - type: string - description: 命名空间创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 命名空间最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - appId: - type: string - description: 所属应用的唯一标识符 - example: user-management-service - clusterName: - type: string - description: 所属集群的名称 - example: default - namespaceName: - type: string - description: 命名空间名称,标识配置的分组 - example: application - comment: - type: string - description: 命名空间备注说明,描述命名空间的用途 - example: 应用主配置命名空间,包含核心业务配置 - format: - type: string - description: 命名空间格式类型,如properties、xml、json、yml等 - example: properties - isPublic: - type: boolean - description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - example: false - items: - type: array - items: - $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO - description: 命名空间包含的所有配置项列表 - OpenNamespaceLockDTO: - type: object - description: Apollo命名空间锁状态数据传输对象,表示命名空间的锁定状态信息 - properties: - namespaceName: - type: string - description: 命名空间名称,标识被锁定的命名空间 - example: application - isLocked: - type: boolean - description: 命名空间是否被锁定,锁定状态下不允许修改配置 - example: true - lockedBy: - type: string - description: 锁定操作者用户名,记录是谁锁定了这个命名空间 - example: config-admin - OpenOrganizationDto: - type: object - description: Apollo组织信息数据传输对象,表示系统中的组织架构信息 - required: - - orgId - - orgName - properties: - orgId: - type: string - description: 组织唯一标识符,用于在系统中唯一标识一个组织 - example: tech-dept - orgName: - type: string - description: 组织名称,用于显示的友好名称 - example: 技术部 - OpenGrayReleaseRuleItemDTO: - type: object - description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - properties: - clientAppId: - type: string - description: 客户端应用ID,指定哪个应用可以获取灰度配置 - example: mobile-app - clientIpList: - type: array - items: - type: string - description: 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - example: - - 192.168.1.100 - - 192.168.1.101 - - 10.0.0.50 - clientLabelList: - type: array - items: - type: string - description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - example: - - beta-user - - internal-test - - canary-group - OpenGrayReleaseRuleDTO: - type: object - description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - properties: - dataChangeCreatedBy: - type: string - description: 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - example: gray-release-admin - dataChangeLastModifiedBy: - type: string - description: 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - example: ops-manager - dataChangeCreatedTime: - type: string - description: 灰度规则创建时间,ISO 8601格式的时间戳 - example: 2024-01-15T10:30:00.000+0800 - dataChangeLastModifiedTime: - type: string - description: 灰度规则最后修改时间,ISO 8601格式的时间戳 - example: 2024-01-20T14:25:30.000+0800 - appId: - type: string - description: 所属应用的唯一标识符 - example: user-management-service - clusterName: - type: string - description: 所属集群的名称 - example: default - namespaceName: - type: string - description: 所属命名空间的名称 - example: application - branchName: - type: string - description: 灰度分支名称,标识灰度发布的分支 - example: gray-branch-20240120 - ruleItems: - type: array - items: - $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenGrayReleaseRuleItemDTO - description: 灰度发布规则项列表,包含具体的灰度规则条件 - securitySchemes: - ApiKeyAuth: - type: apiKey - in: header - name: Authorization - description: | - Apollo OpenAPI访问令牌,用于身份验证和权限控制。 - - **获取方式:** - 1. 登录Apollo Portal管理界面 - 2. 进入"管理员工具" -> "开放平台授权管理" - 3. 点击"创建Token"按钮 - 4. 填写Token名称和选择授权的应用 - 5. 创建成功后复制生成的Token值 - - **使用方法:** - 在请求头中添加:`Authorization: your-token-value` - - **注意事项:** - - Token具有特定的应用访问权限 - - 请妥善保管Token,避免泄露 - - Token可以在管理界面中禁用或删除 -servers: [] -security: [] diff --git a/apollo-openapi.yaml b/apollo-openapi.yaml new file mode 100644 index 00000000..b1d81320 --- /dev/null +++ b/apollo-openapi.yaml @@ -0,0 +1,4588 @@ +openapi: 3.0.1 +info: + title: Apollo OpenAPI + description: | + Apollo配置中心OpenAPI接口文档 + + ## 认证方式 + + 所有API接口都需要通过Authorization header进行身份验证。 + + ### 获取Token的方式: + + 1. **Portal管理界面获取**: + - 登录Apollo Portal管理界面 + - 进入"管理员工具" -> "开放平台授权管理" + - 创建第三方应用,获取Token + + 2. **Token格式**: + ``` + Authorization: token_value + ``` + + 3. **Token权限**: + - Token具有对应应用的读写权限 + - 不同Token可能有不同的环境和命名空间权限 + - 建议为不同用途创建不同的Token + + ### 使用示例: + ```bash + curl -X GET "http://localhost:8070/openapi/v1/apps" \ + -H "Authorization: your_token_here" + ``` + version: 1.0.0 +security: + - ApiKeyAuth: [] +tags: + - name: App Management + description: 应用管理相关接口,包括应用的创建、查询、更新、删除等操作 + - name: Item Management + description: 配置项管理相关接口,包括配置的增删改查、批量操作、同步等功能 + - name: Release Management + description: 发布管理相关接口,包括配置发布、发布历史、灰度发布等功能 + - name: Cluster Management + description: 集群管理相关接口,包括集群的创建、查询、删除等操作 + - name: Namespace Management + description: 命名空间管理相关接口,包括命名空间的创建、查询、配置等操作 + - name: Namespace Namespace Branch Management + description: 命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能 + - name: Instance Management + description: 实例管理相关接口,包括实例查询、配置生效状态等功能 + - name: Organization Management + description: 组织管理相关接口,包括组织信息查询等功能 +paths: + /openapi/v1/apps: + post: + summary: 创建应用 + deprecated: false + description: POST /openapi/v1/apps + tags: + - App Management + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/OpenCreateAppDTO' + required: + - app + - admins + - assignAppRoleToSelf + properties: + app: + allOf: + - $ref: '#/components/schemas/OpenAppDTO' + required: + - appId + - name + - orgId + - orgName + - ownerName + description: '' + required: true + responses: + '200': + description: '应用创建成功' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAppDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' + name: 'Sample Application' + appId: 'sample-app' + orgId: 'default' + orgName: 'Default Organization' + ownerName: 'Apollo Admin' + ownerEmail: 'admin@apollo.com' + headers: {} + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + exception: + type: string + example: + message: 'App is null' + exception: 'BadRequestException' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + get: + summary: 获取当前Consumer授权的应用列表 + deprecated: false + description: GET /openapi/v1/apps?authorized=true + tags: + - App Management + parameters: + - name: authorized + in: query + description: '是否只返回授权的应用' + required: false + example: 'true' + schema: + type: string + responses: + '200': + description: '成功获取授权应用列表' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenAppDTO' + example: + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' + name: 'Sample Application' + appId: 'sample-app' + orgId: 'default' + orgName: 'Default Organization' + ownerName: 'Apollo Admin' + ownerEmail: 'admin@apollo.com' + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-10T14:20:00.000Z' + dataChangeLastModifiedTime: '2024-01-12T16:45:00.000Z' + name: 'User Service' + appId: 'user-service' + orgId: 'microservices' + orgName: 'Microservices Team' + ownerName: 'Dev Team' + ownerEmail: 'dev@company.com' + headers: {} + '401': + description: '未授权访问' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Unauthorized' + /openapi/v1/apps/{appId}/env-clusters: + get: + summary: 获取应用的环境集群信息 + deprecated: false + description: GET /openapi/v1/apps/{appId}/env-clusters + tags: + - App Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '成功获取应用环境集群信息' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenEnvClusterDTO' + example: + - env: 'DEV' + clusters: + - 'default' + - 'test-cluster' + - env: 'UAT' + clusters: + - 'default' + - env: 'PRO' + clusters: + - 'default' + - 'backup' + headers: {} + '404': + description: '应用不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'App not found: invalid-app-id' + /openapi/v1/apps/{appId}: + get: + summary: 获取单个应用信息 + deprecated: false + description: GET /openapi/v1/apps/{appId} + tags: + - App Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '成功获取应用信息' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAppDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T15:45:00.000Z' + name: 'Sample Application' + appId: 'sample-app' + orgId: 'default' + orgName: 'Default Organization' + ownerName: 'Apollo Admin' + ownerEmail: 'admin@apollo.com' + headers: {} + '404': + description: '应用不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'App not found: invalid-app-id' + put: + summary: 更新应用 + deprecated: false + description: PUT /openapi/v1/apps/{appId} + tags: + - App Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/OpenAppDTO' + required: + - appId + - name + - orgId + - orgName + - ownerName + description: '' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAppDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T16:45:00.000Z' + name: 'Updated Sample Application' + appId: 'sample-app' + orgId: 'default' + orgName: 'Default Organization' + ownerName: 'Apollo Admin' + ownerEmail: 'admin@apollo.com' + headers: {} + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Invalid app data' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + delete: + summary: 删除应用 + deprecated: false + description: DELETE /openapi/v1/apps/{appId} + tags: + - App Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '应用删除成功' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'App deleted successfully' + '403': + description: '权限不足,需要超级管理员权限' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + '404': + description: '应用不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'App not found: invalid-app-id' + headers: {} + /openapi/v1/apps/by-self: + get: + summary: 获取当前Consumer的应用列表(分页) + deprecated: false + description: GET /openapi/v1/apps/by-self + tags: + - App Management + responses: + '200': + description: '成功获取Consumer的应用列表' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenAppDTO' + example: + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T16:45:00.000Z' + name: 'User Service' + appId: 'user-service' + orgId: 'microservices' + orgName: 'Microservices Team' + ownerName: 'Dev Team' + ownerEmail: 'dev@company.com' + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'ops-user' + dataChangeCreatedTime: '2024-01-10T09:15:00.000Z' + dataChangeLastModifiedTime: '2024-01-18T14:30:00.000Z' + name: 'Order Service' + appId: 'order-service' + orgId: 'business' + orgName: 'Business Team' + ownerName: 'Business Team' + ownerEmail: 'business@company.com' + headers: {} + '401': + description: '未授权访问' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Unauthorized' + /openapi/v1/apps/{appId}/navtree: + get: + summary: 获取应用导航树 + deprecated: false + description: GET /openapi/v1/apps/{appId}/navtree + tags: + - App Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '成功获取应用导航树' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvClusterInfo' + example: + - env: 'DEV' + clusters: + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedByDisplayName: 'apollo' + dataChangeLastModifiedByDisplayName: 'apollo' + dataChangeCreatedTime: '2023-01-01T00:00:00.000Z' + dataChangeLastModifiedTime: '2023-01-01T00:00:00.000Z' + id: 1 + name: 'default' + appId: 'sample-app' + parentClusterId: 0 + comment: 'Default cluster' + headers: {} + /openapi/v1/apps/envs/{env}: + post: + summary: 在指定环境创建应用 + deprecated: false + description: POST /openapi/v1/apps/envs/{env} + tags: + - App Management + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/OpenAppDTO' + required: + - appId + - name + - orgId + - orgName + - ownerName + description: '' + required: true + responses: + '200': + description: '应用在指定环境创建成功' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'App created in environment successfully' + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'appId should not be null or empty' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + headers: {} + /openapi/v1/apps/{appId}/miss_envs: + get: + summary: 查找缺失的环境 + deprecated: false + description: GET /openapi/v1/apps/{appId}/miss_envs + tags: + - App Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '成功获取应用缺失的环境列表' + content: + application/json: + schema: + type: array + items: + type: string + example: + - 'UAT' + - 'PRO' + headers: {} + '404': + description: '应用不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'App not found' + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}: + get: + summary: 获取单个配置项 + deprecated: false + description: >- + GET + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: key + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '成功获取配置项' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenItemDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T14:25:00.000Z' + key: 'server.port' + type: 0 + value: '8080' + comment: '服务器端口配置' + headers: {} + '404': + description: '配置项不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Configuration item not found' + put: + summary: 更新配置项 + deprecated: false + description: >- + PUT + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: key + in: path + description: '' + required: true + schema: + type: string + - name: createIfNotExists + in: query + description: '' + required: true + example: 'false' + schema: + type: boolean + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/OpenItemDTO' + required: + - key + - dataChangeLastModifiedBy + - value + description: '' + required: true + responses: + '200': + description: '配置项更新成功' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Configuration item updated successfully' + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'key, value and dataChangeLastModifiedBy should not be null or empty' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + '404': + description: '配置项不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Configuration item not found' + headers: {} + delete: + summary: 删除配置项 + deprecated: false + description: >- + DELETE + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: key + in: path + description: '' + required: true + schema: + type: string + - name: operator + in: query + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: + get: + summary: 获取命名空间下的配置项列表 + deprecated: false + description: '' + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: page + in: query + description: '' + required: true + example: 0 + schema: + type: integer + - name: size + in: query + description: '' + required: true + example: 50 + schema: + type: integer + responses: + '200': + description: '成功获取配置项列表' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenPageDTOOpenItemDTO' + example: + page: 0 + size: 50 + total: 3 + content: + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T14:25:00.000Z' + key: 'server.port' + type: 0 + value: '8080' + comment: '服务器端口配置' + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' + key: 'spring.datasource.url' + type: 0 + value: 'jdbc:mysql://localhost:3306/apollo' + comment: '数据库连接地址' + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'ops-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-18T09:15:00.000Z' + key: 'logging.level.root' + type: 0 + value: 'INFO' + comment: '日志级别配置' + headers: {} + '404': + description: '命名空间不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Namespace not found' + post: + summary: 创建新的配置项 + deprecated: false + description: >- + POST + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/OpenItemDTO' + required: + - key + - dataChangeCreatedBy + - value + description: '' + required: true + responses: + '200': + description: '配置项创建成功' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenItemDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' + key: 'server.port' + type: 0 + value: '8080' + comment: '服务器端口配置' + headers: {} + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'key and dataChangeCreatedBy should not be null or empty' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: + get: + summary: 通过查询参数获取配置项(支持编码的key) + deprecated: false + description: >- + GET + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: key + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '成功获取配置项(支持编码key)' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenItemDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T14:25:00.000Z' + key: 'spring.datasource.url' + type: 0 + value: 'jdbc:mysql://localhost:3306/apollo?useUnicode=true&characterEncoding=utf8' + comment: '数据库连接地址,包含特殊字符' + headers: {} + '404': + description: '配置项不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Configuration item not found' + put: + summary: 通过编码的key更新配置项 + deprecated: false + description: >- + PUT + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: key + in: path + description: '' + required: true + schema: + type: string + - name: createIfNotExists + in: query + description: '' + required: true + example: 'false' + schema: + type: boolean + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/OpenItemDTO' + required: + - key + - dataChangeLastModifiedBy + - value + description: '' + required: true + responses: + '200': + description: '配置项更新成功(编码key)' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Configuration item updated successfully' + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'key, value and dataChangeLastModifiedBy should not be null or empty' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + '404': + description: '配置项不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Configuration item not found' + headers: {} + delete: + summary: 通过编码的key删除配置项 + deprecated: false + description: >- + DELETE + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: key + in: path + description: '' + required: true + schema: + type: string + - name: operator + in: query + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate: + put: + summary: 通过文本批量修改配置项 + deprecated: false + description: >- + PUT + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/NamespaceTextModel' + required: + - operator + - format + - configText + description: '' + required: true + responses: + '200': + description: '批量更新配置项成功' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Batch update configuration items successfully' + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'operator should not be null or empty' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + get: + summary: 获取分支下的配置项 + deprecated: false + description: >- + GET + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items + tags: + - Namespace Branch Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '成功获取分支下的配置项列表' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + example: + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T14:25:00.000Z' + key: 'feature.new-feature' + type: 0 + value: 'enabled' + comment: '新功能开关,分支测试中' + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T14:25:00.000Z' + key: 'test.debug.level' + type: 0 + value: 'verbose' + comment: '测试调试级别' + headers: {} + '404': + description: '分支不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Branch not found' + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare: + post: + summary: 对比命名空间配置差异 + deprecated: false + description: >- + POST + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/NamespaceSyncModel' + required: + - syncToNamespaces + - syncItems + description: '' + required: true + responses: + '200': + description: '成功对比命名空间配置差异' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ListItemDiffs' + example: + - namespace: + appId: '' + env: '' + clusterName: '' + namespaceName: '' + diffs: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedByDisplayName: '' + dataChangeLastModifiedByDisplayName: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + createItems: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedByDisplayName: '' + dataChangeLastModifiedByDisplayName: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + namespaceId: 0 + key: '' + type: 0 + value: '' + comment: '' + lineNum: 0 + updateItems: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedByDisplayName: '' + dataChangeLastModifiedByDisplayName: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + namespaceId: 0 + key: '' + type: 0 + value: '' + comment: '' + lineNum: 0 + deleteItems: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedByDisplayName: '' + dataChangeLastModifiedByDisplayName: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + namespaceId: 0 + key: '' + type: 0 + value: '' + comment: '' + lineNum: 0 + extInfo: '' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync: + post: + summary: 同步配置项到多个命名空间 + deprecated: false + description: >- + POST + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/NamespaceSyncModel' + required: + - syncToNamespaces + - syncItems + description: '' + required: true + responses: + '200': + description: '配置项同步成功' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Configuration items synced successfully to target namespaces' + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'syncToNamespaces should not be null or empty' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate: + post: + summary: 验证配置文本语法 + deprecated: false + description: >- + POST + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/NamespaceTextModel' + required: + - format + - configText + description: '' + required: true + responses: + '200': + description: '配置文本语法验证通过' + content: + application/json: + schema: + type: object + properties: + valid: + type: boolean + message: + type: string + example: + valid: true + message: 'Configuration syntax is valid' + '400': + description: '配置文本语法错误' + content: + application/json: + schema: + type: object + properties: + valid: + type: boolean + message: + type: string + errors: + type: array + items: + type: string + example: + valid: false + message: 'Configuration syntax validation failed' + errors: + - 'Line 3: Invalid property format' + - 'Line 7: Missing value for key "database.port"' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert: + post: + summary: 撤销配置项更改 + deprecated: false + description: >- + POST + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '配置项更改撤销成功' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Configuration changes reverted successfully' + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Invalid revert request' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + headers: {} + /openapi/v1/apps/{appId}/clusters/{clusterName}: + get: + summary: 获取指定集群信息 + deprecated: false + description: GET /openapi/v1/apps/{appId}/clusters/{clusterName} + tags: + - Cluster Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '成功获取集群信息' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenClusterDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'ops-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-18T09:15:00.000Z' + name: 'production' + appId: 'sample-app' + headers: {} + '404': + description: '集群不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Cluster not found' + /openapi/v1/apps/{appId}/clusters: + post: + summary: 创建集群 + deprecated: false + description: POST /openapi/v1/apps/{appId}/clusters + tags: + - Cluster Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/OpenClusterDTO' + required: + - name + - appId + - dataChangeCreatedBy + description: '' + required: true + responses: + '200': + description: '集群创建成功' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenClusterDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' + name: 'test-cluster' + appId: 'sample-app' + headers: {} + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'name and dataChangeCreatedBy should not be null or empty' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: + delete: + summary: 删除集群 + deprecated: false + description: DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} + tags: + - Cluster Management + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '集群删除成功' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Cluster deleted successfully' + '400': + description: '删除失败,集群可能包含配置' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Cannot delete cluster with existing configurations' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + '404': + description: '集群不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Cluster not found' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: + post: + summary: 创建发布 + deprecated: false + description: '' + tags: + - Release Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/NamespaceReleaseDTO' + required: + - releaseTitle + - releasedBy + description: '' + required: true + responses: + '200': + description: '发布创建成功' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' + id: 12345 + appId: 'sample-app' + clusterName: 'default' + namespaceName: 'application' + name: 'Release v1.0.0' + configurations: + 'server.port': '8080' + 'spring.datasource.url': 'jdbc:mysql://localhost:3306/apollo' + 'logging.level.root': 'INFO' + comment: '首次发布,包含基础配置' + headers: {} + '400': + description: '发布参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Params(releaseTitle and releasedBy) can not be empty' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: + get: + summary: 获取最新活跃发布 + deprecated: false + description: '' + tags: + - Release Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '成功获取最新活跃发布' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' + id: 12345 + appId: 'sample-app' + clusterName: 'default' + namespaceName: 'application' + name: 'Release v1.2.0' + configurations: + 'server.port': '8080' + 'spring.datasource.url': 'jdbc:mysql://localhost:3306/apollo' + 'logging.level.root': 'INFO' + 'app.version': '1.2.0' + comment: '最新生产发布版本,包含性能优化' + headers: {} + '404': + description: '未找到活跃发布' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'No active release found for this namespace' + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: + post: + summary: 合并分支 + deprecated: false + description: '' + tags: + - Namespace Branch Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' + required: true + schema: + type: string + - name: deleteBranch + in: query + description: '' + required: true + example: 'true' + schema: + type: boolean + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/NamespaceReleaseDTO' + required: + - releaseTitle + - releasedBy + description: '' + required: true + responses: + '200': + description: '分支合并成功' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' + id: 12346 + appId: 'sample-app' + clusterName: 'default' + namespaceName: 'application' + name: 'Merge from branch feature-123' + configurations: + 'server.port': '8080' + 'spring.datasource.url': 'jdbc:mysql://localhost:3306/apollo' + 'logging.level.root': 'INFO' + 'feature.new-feature': 'enabled' + comment: '合并功能分支到主分支,包含新功能配置' + headers: {} + '400': + description: '合并参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'releaseTitle and releasedBy should not be null or empty' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: + post: + summary: 创建灰度发布 + deprecated: false + description: '' + tags: + - Namespace Branch Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/NamespaceReleaseDTO' + required: + - releaseTitle + - releasedBy + description: '' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases: + post: + summary: 创建灰度删除发布 + deprecated: false + description: '' + tags: + - Namespace Branch Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/NamespaceGrayDelReleaseDTO' + required: + - releaseTitle + - releasedBy + - grayDelKeys + description: '' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + /openapi/v1/envs/{env}/releases/{releaseId}/rollback: + put: + summary: 回滚发布 + deprecated: false + description: '' + tags: + - Release Management + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: releaseId + in: path + description: '' + required: true + schema: + type: integer + - name: operator + in: query + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + headers: {} + /openapi/v1/envs/{env}/releases/{releaseId}: + get: + summary: 获取发布详情 + deprecated: false + description: GET /openapi/v1/envs/{env}/releases/{releaseId} + tags: + - Release Management + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: releaseId + in: path + description: '' + required: true + schema: + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all: + get: + summary: 获取所有发布(分页) + deprecated: false + description: >- + GET + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + tags: + - Release Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: page + in: query + description: '' + required: true + example: 0 + schema: + type: integer + - name: size + in: query + description: '' + required: true + example: 5 + schema: + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ListReleaseBO' + example: + - baseInfo: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedByDisplayName: '' + dataChangeLastModifiedByDisplayName: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + releaseKey: '' + name: '' + appId: '' + clusterName: '' + namespaceName: '' + configurations: '' + comment: '' + isAbandoned: false + items: + - key: '' + value: '' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active: + get: + summary: 获取活跃发布(分页) + deprecated: false + description: >- + GET + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + tags: + - Release Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: page + in: query + description: '' + required: true + example: 0 + schema: + type: integer + - name: size + in: query + description: '' + required: true + example: 5 + schema: + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenReleaseDTO' + example: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + /openapi/v1/envs/{env}/releases/compare: + get: + summary: 对比发布 + deprecated: false + description: GET /openapi/v1/envs/{env}/releases/compare + tags: + - Release Management + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: baseReleaseId + in: query + description: '' + required: true + schema: + type: integer + - name: toCompareReleaseId + in: query + description: '' + required: true + schema: + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + changes: + type: array + items: + $ref: '#/components/schemas/Change' + example: + changes: + - type: '' + entity: + firstEntity: + key: '' + value: '' + secondEntity: + key: '' + value: '' + headers: {} + /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: + get: + summary: 获取命名空间下的实例数量 + deprecated: false + description: >- + GET + /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + tags: + - Instance Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: integer + headers: {} + /openapi/v1/envs/{env}/releases/{releaseId}/instances: + get: + summary: 根据发布版本查询实例(支持分页) + deprecated: false + description: GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + tags: + - Instance Management + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: releaseId + in: path + description: '' + required: true + schema: + type: integer + - name: page + in: query + description: '' + required: true + example: 0 + schema: + type: integer + - name: size + in: query + description: '' + required: true + example: 20 + schema: + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenPageDTOOpenInstanceDTO' + example: + page: 0 + size: 0 + total: 0 + content: + - id: 0 + appId: '' + clusterName: '' + dataCenter: '' + ip: '' + configs: + - release: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + releaseDeliveryTime: '' + dataChangeLastModifiedTime: '' + dataChangeCreatedTime: '' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: + get: + summary: 查询不在指定发布版本中的实例 + deprecated: false + description: >- + GET + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 + tags: + - Instance Management + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: excludeReleases + in: query + description: '排除的发布ID列表,用逗号分隔' + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenInstanceDTO' + example: + - id: 0 + appId: '' + clusterName: '' + dataCenter: '' + ip: '' + configs: + - release: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + releaseDeliveryTime: '' + dataChangeLastModifiedTime: '' + dataChangeCreatedTime: '' + headers: {} + /openapi/v1/apps/{appId}/appnamespaces: + post: + summary: 创建AppNamespace + deprecated: false + description: POST /openapi/v1/apps/{appId}/appnamespaces + tags: + - Namespace Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/OpenAppNamespaceDTO' + required: + - appId + - name + - format + - dataChangeCreatedBy + description: '' + required: true + responses: + '200': + description: 'AppNamespace创建成功' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAppNamespaceDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' + name: 'database' + appId: 'sample-app' + format: 'properties' + isPublic: false + appendNamespacePrefix: true + comment: '数据库相关配置命名空间' + headers: {} + '400': + description: '请求参数错误' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'appId, name, format and dataChangeCreatedBy should not be null or empty' + '403': + description: '权限不足' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Access is denied' + get: + summary: 获取指定应用的AppNamespace + deprecated: false + description: GET /openapi/v1/apps/{appId}/appnamespaces + tags: + - Namespace Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenAppNamespaceDTO' + example: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + name: '' + appId: '' + format: '' + isPublic: false + appendNamespacePrefix: false + comment: '' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: + get: + summary: 获取指定集群下的所有Namespace + deprecated: false + description: >- + GET + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + tags: + - Namespace Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: fillItemDetail + in: query + description: '' + required: true + example: 'true' + schema: + type: boolean + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenNamespaceDTO' + example: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + appId: '' + clusterName: '' + namespaceName: '' + comment: '' + format: '' + isPublic: false + items: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + key: '' + type: 0 + value: '' + comment: '' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}: + get: + summary: 获取指定的Namespace + deprecated: false + description: >- + GET + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + tags: + - Cluster Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: fillItemDetail + in: query + description: '' + required: true + example: 'true' + schema: + type: boolean + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + appId: '' + clusterName: '' + namespaceName: '' + comment: '' + format: '' + isPublic: false + items: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + key: '' + type: 0 + value: '' + comment: '' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: + get: + summary: 获取Namespace的锁状态 + deprecated: false + description: >- + GET + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + tags: + - Namespace Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceLockDTO' + example: + namespaceName: '' + isLocked: false + lockedBy: '' + headers: {} + /openapi/v1/appnamespaces: + get: + summary: 获取所有公共AppNamespace + deprecated: false + description: GET /openapi/v1/appnamespaces?public=true + tags: + - Namespace Management + parameters: + - name: publicOnly + in: query + description: '' + required: true + example: 'false' + schema: + type: boolean + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenAppNamespaceDTO' + example: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + name: '' + appId: '' + format: '' + isPublic: false + appendNamespacePrefix: false + comment: '' + headers: {} + /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}: + get: + summary: 获取指定的AppNamespace + deprecated: false + description: GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + tags: + - Namespace Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAppNamespaceDTO' + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + name: '' + appId: '' + format: '' + isPublic: false + appendNamespacePrefix: false + comment: '' + headers: {} + delete: + summary: 删除AppNamespace + deprecated: false + description: DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + tags: + - App Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + headers: {} + /openapi/v1/apps/{appId}/namespaces/releases/status: + get: + summary: 获取应用下所有Namespace的发布状态 + deprecated: false + description: GET /openapi/v1/apps/{appId}/namespaces/releases/status + tags: + - App Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + additionalProperties: + type: object + additionalProperties: + type: boolean + example: + '': + '': false + headers: {} + /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances: + get: + summary: 获取公共AppNamespace的所有实例 + deprecated: false + description: GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + tags: + - Namespace Management + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: publicNamespaceName + in: path + description: '' + required: true + schema: + type: string + - name: page + in: query + description: '' + required: true + example: 0 + schema: + type: integer + - name: size + in: query + description: '' + required: true + example: 10 + schema: + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenNamespaceDTO' + example: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + appId: '' + clusterName: '' + namespaceName: '' + comment: '' + format: '' + isPublic: false + items: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + key: '' + type: 0 + value: '' + comment: '' + headers: {} + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association: + get: + summary: 获取关联的公共Namespace + deprecated: false + description: >- + GET + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + tags: + - Namespace Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + appId: '' + clusterName: '' + namespaceName: '' + comment: '' + format: '' + isPublic: false + items: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + key: '' + type: 0 + value: '' + comment: '' + headers: {} + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check: + get: + summary: 检查缺失的Namespace + deprecated: false + description: >- + GET + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + tags: + - Namespace Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + type: string + example: + - '' + headers: {} + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links: + delete: + summary: 删除关联的Namespace + deprecated: false + description: >- + DELETE + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + tags: + - App Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + headers: {} + /openapi/v1/organizations: + get: + summary: 获取所有组织信息 + deprecated: false + description: GET /openapi/v1/organizations + tags: + - Organization Management + responses: + '200': + description: '成功获取组织列表' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenOrganizationDto' + description: 组织列表 + example: + - orgId: 'default' + orgName: 'Default Organization' + - orgId: 'microservices' + orgName: 'Microservices Team' + - orgId: 'infrastructure' + orgName: 'Infrastructure Team' + headers: {} + '401': + description: '未授权访问' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Unauthorized' + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches: + get: + summary: 获取命名空间分支信息 + deprecated: false + description: >- + GET + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + tags: + - Cluster Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T14:25:00.000Z' + appId: 'sample-app' + clusterName: 'default' + namespaceName: 'application' + comment: '功能分支,用于测试新特性' + format: 'properties' + isPublic: false + items: + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T14:25:00.000Z' + key: 'feature.new-feature' + type: 0 + value: 'enabled' + comment: '新功能开关' + - dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'dev-user' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T14:25:00.000Z' + key: 'test.mode' + type: 0 + value: 'debug' + comment: '测试模式配置' + headers: {} + '404': + description: '分支不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Branch not found for this namespace' + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch: + post: + summary: 创建命名空间分支 + deprecated: false + description: >- + POST + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch + tags: + - Namespace Branch Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: operator + in: query + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + appId: '' + clusterName: '' + namespaceName: '' + comment: '' + format: '' + isPublic: false + items: + - dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + key: '' + type: 0 + value: '' + comment: '' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: + delete: + summary: 删除命名空间分支 + deprecated: false + description: >- + DELETE + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} + tags: + - Namespace Branch Management + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' + required: true + schema: + type: string + - name: operator + in: query + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + headers: {} + patch: + summary: 合并分支到主分支 + deprecated: false + description: >- + PATCH + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} + + + 使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并") + tags: + - Namespace Branch Management + parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' + required: true + schema: + type: string + - name: deleteBranch + in: query + description: '' + required: true + example: 'true' + schema: + type: boolean + - name: X-Apollo-Operator + in: header + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/NamespaceReleaseDTO' + required: + - releaseTitle + - releasedBy + description: '' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenReleaseDTO' + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules: + get: + summary: 获取分支灰度发布规则 + deprecated: false + description: >- + GET + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules + tags: + - Namespace Branch Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' + example: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + appId: '' + clusterName: '' + namespaceName: '' + branchName: '' + ruleItems: + - clientAppId: '' + clientIpList: + - '' + clientLabelList: + - '' + headers: {} + put: + summary: 更新分支灰度发布规则 + deprecated: false + description: >- + PUT + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules + tags: + - Namespace Branch Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: branchName + in: path + description: '' + required: true + schema: + type: string + - name: operator + in: header + description: '' + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' + required: + - ruleItems + description: '' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: {} + headers: {} +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: Authorization + description: | + Apollo OpenAPI访问令牌 + + **获取方式:** + 1. 登录Apollo Portal管理界面 + 2. 进入"管理员工具" -> "开放平台授权管理" + 3. 创建第三方应用,获取Token + + **使用格式:** + ``` + Authorization: your_token_here + ``` + + **权限说明:** + - Token具有对应应用的读写权限 + - 不同Token可能有不同的环境和命名空间权限 + - 建议为不同用途创建不同的Token + schemas: + OpenAppDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + description: 数据创建者用户名,记录是谁创建了这个应用 + dataChangeLastModifiedBy: + type: string + description: 数据最后修改者用户名,记录最后一次修改应用信息的用户 + dataChangeCreatedTime: + type: string + description: 数据创建时间,ISO 8601格式的时间戳 + dataChangeLastModifiedTime: + type: string + description: 数据最后修改时间,ISO 8601格式的时间戳 + name: + type: string + description: 应用名称,用于显示的友好名称 + appId: + type: string + description: 应用唯一标识符,全局唯一的应用ID + orgId: + type: string + description: 组织ID,应用所属组织的唯一标识 + orgName: + type: string + description: 组织名称,应用所属组织的显示名称 + ownerName: + type: string + description: 应用负责人姓名,应用的主要负责人 + ownerEmail: + type: string + description: 应用负责人邮箱地址,用于接收应用相关通知 + description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 + OpenCreateAppDTO: + type: object + properties: + assignAppRoleToSelf: + type: boolean + description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 + admins: + type: array + items: + type: string + description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 + app: + $ref: '#/components/schemas/OpenAppDTO' + description: 应用基本信息,包含应用的详细配置数据 + description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 + OpenItemDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + description: 配置项创建者用户名,记录是谁创建了这个配置项 + dataChangeLastModifiedBy: + type: string + description: 配置项最后修改者用户名,记录最后一次修改配置的用户 + dataChangeCreatedTime: + type: string + description: 配置项创建时间,ISO 8601格式的时间戳 + dataChangeLastModifiedTime: + type: string + description: 配置项最后修改时间,ISO 8601格式的时间戳 + key: + type: string + description: 配置项的键名,在同一命名空间内唯一标识一个配置项 + type: + type: integer + description: 配置项类型,0表示普通配置项,1表示文件类型配置项 + value: + type: string + description: 配置项的值,可以是字符串、数字、JSON等格式 + comment: + type: string + description: 配置项的注释说明,用于描述配置项的用途和含义 + description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + OpenPageDTOOpenItemDTO: + type: object + properties: + page: + type: integer + description: 当前页码,从0开始计数 + size: + type: integer + description: 每页显示的记录数量 + total: + type: integer + description: 总记录数,符合查询条件的配置项总数量 + format: int64 + content: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO + description: 当前页的配置项列表,包含具体的配置项数据 + description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 + OpenClusterDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + description: 集群创建者用户名,记录是谁创建了这个集群 + dataChangeLastModifiedBy: + type: string + description: 集群最后修改者用户名,记录最后一次修改集群信息的用户 + dataChangeCreatedTime: + type: string + description: 集群创建时间,ISO 8601格式的时间戳 + dataChangeLastModifiedTime: + type: string + description: 集群最后修改时间,ISO 8601格式的时间戳 + name: + type: string + description: 集群名称,在同一应用和环境下唯一标识一个集群 + appId: + type: string + description: 所属应用的唯一标识符 + description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 + MapString: + type: object + properties: + key: + type: string + description: 字符串映射对象,用于表示键值对的配置数据结构 + OpenReleaseDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + description: 发布创建者用户名,记录是谁创建了这次发布 + dataChangeLastModifiedBy: + type: string + description: 发布最后修改者用户名,记录最后一次修改发布信息的用户 + dataChangeCreatedTime: + type: string + description: 发布创建时间,ISO 8601格式的时间戳 + dataChangeLastModifiedTime: + type: string + description: 发布最后修改时间,ISO 8601格式的时间戳 + id: + type: integer + description: 发布记录的唯一标识符,系统自动生成 + format: int64 + appId: + type: string + description: 所属应用的唯一标识符 + clusterName: + type: string + description: 所属集群的名称 + namespaceName: + type: string + description: 所属命名空间的名称 + name: + type: string + description: 发布名称,用于标识这次发布的版本或描述 + configurations: + $ref: '#/components/schemas/MapString' + description: 本次发布包含的所有配置项键值对 + comment: + type: string + description: 发布备注,描述本次发布的变更内容和目的 + description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 + NamespaceReleaseDTO: + type: object + properties: + releaseTitle: + type: string + description: 发布标题,用于标识这次发布的名称或版本号 + releaseComment: + type: string + description: 发布备注,详细描述本次发布的变更内容和目的 + releasedBy: + type: string + description: 发布操作者用户名,记录是谁执行了这次发布操作 + isEmergencyPublish: + type: boolean + description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 + description: 命名空间发布请求数据传输对象,用于创建新的配置发布 + NamespaceGrayDelReleaseDTO: + type: object + properties: + releaseTitle: + type: string + description: 发布标题,用于标识这次灰度删除发布的名称或版本号 + releaseComment: + type: string + description: 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 + releasedBy: + type: string + description: 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 + isEmergencyPublish: + type: boolean + description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 + grayDelKeys: + type: array + items: + type: string + description: 需要在灰度发布中删除的配置项键名列表 + description: 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 + OpenAppNamespaceDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + description: 命名空间创建者用户名,记录是谁创建了这个应用命名空间 + dataChangeLastModifiedBy: + type: string + description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 + dataChangeCreatedTime: + type: string + description: 命名空间创建时间,ISO 8601格式的时间戳 + dataChangeLastModifiedTime: + type: string + description: 命名空间最后修改时间,ISO 8601格式的时间戳 + name: + type: string + description: 命名空间名称,在同一应用内唯一标识一个命名空间 + appId: + type: string + description: 所属应用的唯一标识符 + format: + type: string + description: 命名空间格式类型,如properties、xml、json、yml等 + isPublic: + type: boolean + description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 + appendNamespacePrefix: + type: boolean + description: 对于公共命名空间,是否在命名空间名称前添加前缀 + default: true + comment: + type: string + description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 + description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 + OpenGrayReleaseRuleItemDTO: + type: object + properties: + clientAppId: + type: string + description: 客户端应用ID,指定哪个应用可以获取灰度配置 + clientIpList: + type: array + items: + type: string + description: 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 + clientLabelList: + type: array + items: + type: string + description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 + description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 + OpenGrayReleaseRuleDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + description: 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 + dataChangeLastModifiedBy: + type: string + description: 灰度规则最后修改者用户名,记录最后一次修改规则的用户 + dataChangeCreatedTime: + type: string + description: 灰度规则创建时间,ISO 8601格式的时间戳 + dataChangeLastModifiedTime: + type: string + description: 灰度规则最后修改时间,ISO 8601格式的时间戳 + appId: + type: string + description: 所属应用的唯一标识符 + clusterName: + type: string + description: 所属集群的名称 + namespaceName: + type: string + description: 所属命名空间的名称 + branchName: + type: string + description: 灰度分支名称,标识灰度发布的分支 + ruleItems: + type: array + items: + $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenGrayReleaseRuleItemDTO + description: 灰度发布规则项列表,包含具体的灰度规则条件 + description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 + OpenNamespaceDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + description: 命名空间创建者用户名,记录是谁创建了这个命名空间 + dataChangeLastModifiedBy: + type: string + description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 + dataChangeCreatedTime: + type: string + description: 命名空间创建时间,ISO 8601格式的时间戳 + dataChangeLastModifiedTime: + type: string + description: 命名空间最后修改时间,ISO 8601格式的时间戳 + appId: + type: string + description: 所属应用的唯一标识符 + clusterName: + type: string + description: 所属集群的名称 + namespaceName: + type: string + description: 命名空间名称,在同一应用和集群下唯一标识一个命名空间 + comment: + type: string + description: 命名空间备注说明,描述命名空间的用途 + format: + type: string + description: 命名空间格式类型,如properties、xml、json、yml等 + isPublic: + type: boolean + description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 + items: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + description: 命名空间包含的配置项列表 + description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + OpenNamespaceLockDTO: + type: object + properties: + namespaceName: + type: string + description: 命名空间名称 + isLocked: + type: boolean + description: 是否被锁定 + lockedBy: + type: string + description: 锁定者用户名 + description: Apollo命名空间锁状态数据传输对象 + OpenPageDTOOpenInstanceDTO: + type: object + properties: + page: + type: integer + description: 当前页码,从0开始计数 + size: + type: integer + description: 每页显示的记录数量 + total: + type: integer + description: 总记录数,符合查询条件的实例总数量 + format: int64 + content: + type: array + items: + $ref: '#/components/schemas/OpenInstanceDTO' + description: 当前页的实例列表,包含具体的实例数据 + description: 分页实例数据传输对象,用于返回分页查询的实例列表结果 + OpenEnvClusterDTO: + type: object + properties: + env: + type: string + description: '' + clusters: + type: array + items: + type: string + description: '' + ClusterDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + description: '' + dataChangeLastModifiedBy: + type: string + description: '' + dataChangeCreatedByDisplayName: + type: string + description: '' + dataChangeLastModifiedByDisplayName: + type: string + description: '' + dataChangeCreatedTime: + type: string + description: '' + dataChangeLastModifiedTime: + type: string + description: '' + id: + type: integer + description: '' + format: int64 + name: + type: string + description: '' + pattern: '[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*' + appId: + type: string + description: '' + parentClusterId: + type: integer + description: '' + format: int64 + comment: + type: string + description: '' + required: + - name + - appId + EnvClusterInfo: + type: object + properties: + env: + type: string + description: '' + clusters: + type: array + items: + $ref: '#/components/schemas/ClusterDTO' + description: com.ctrip.framework.apollo.common.dto.ClusterDTO + description: '' + + + NamespaceTextModel: + type: object + properties: + appId: + type: string + description: '' + env: + type: string + description: '' + clusterName: + type: string + description: '' + namespaceName: + type: string + description: '' + namespaceId: + type: integer + description: '' + format: int64 + format: + type: string + description: '' + configText: + type: string + description: '' + operator: + type: string + description: '' + NamespaceIdentifier: + type: object + properties: + appId: + type: string + description: '' + env: + type: string + description: '' + clusterName: + type: string + description: '' + namespaceName: + type: string + description: '' + ItemDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + description: '' + dataChangeLastModifiedBy: + type: string + description: '' + dataChangeCreatedByDisplayName: + type: string + description: '' + dataChangeLastModifiedByDisplayName: + type: string + description: '' + dataChangeCreatedTime: + type: string + description: '' + dataChangeLastModifiedTime: + type: string + description: '' + id: + type: integer + description: '' + format: int64 + namespaceId: + type: integer + description: '' + format: int64 + key: + type: string + description: '' + type: + type: integer + description: '' + value: + type: string + description: '' + comment: + type: string + description: '' + lineNum: + type: integer + description: '' + ItemChangeSets: + type: object + properties: + dataChangeCreatedBy: + type: string + description: '' + dataChangeLastModifiedBy: + type: string + description: '' + dataChangeCreatedByDisplayName: + type: string + description: '' + dataChangeLastModifiedByDisplayName: + type: string + description: '' + dataChangeCreatedTime: + type: string + description: '' + dataChangeLastModifiedTime: + type: string + description: '' + createItems: + type: array + items: + $ref: '#/components/schemas/ItemDTO' + description: com.ctrip.framework.apollo.common.dto.ItemDTO + description: '' + default: new LinkedList<>() + updateItems: + type: array + items: + $ref: '#/components/schemas/ItemDTO' + description: com.ctrip.framework.apollo.common.dto.ItemDTO + description: '' + default: new LinkedList<>() + deleteItems: + type: array + items: + $ref: '#/components/schemas/ItemDTO' + description: com.ctrip.framework.apollo.common.dto.ItemDTO + description: '' + default: new LinkedList<>() + ListItemDiffs: + type: object + properties: + namespace: + $ref: '#/components/schemas/NamespaceIdentifier' + description: '' + diffs: + $ref: '#/components/schemas/ItemChangeSets' + description: '' + extInfo: + type: string + description: '' + NamespaceSyncModel: + type: object + properties: + syncToNamespaces: + type: array + items: + $ref: '#/components/schemas/NamespaceIdentifier' + description: com.ctrip.framework.apollo.portal.entity.vo.NamespaceIdentifier + description: '' + syncItems: + type: array + items: + $ref: '#/components/schemas/ItemDTO' + description: com.ctrip.framework.apollo.common.dto.ItemDTO + description: '' + + + ReleaseDTO: + type: object + properties: + dataChangeCreatedBy: + type: string + description: '' + dataChangeLastModifiedBy: + type: string + description: '' + dataChangeCreatedByDisplayName: + type: string + description: '' + dataChangeLastModifiedByDisplayName: + type: string + description: '' + dataChangeCreatedTime: + type: string + description: '' + dataChangeLastModifiedTime: + type: string + description: '' + id: + type: integer + description: '' + format: int64 + releaseKey: + type: string + description: '' + name: + type: string + description: '' + appId: + type: string + description: '' + clusterName: + type: string + description: '' + namespaceName: + type: string + description: '' + configurations: + type: string + description: '' + comment: + type: string + description: '' + isAbandoned: + type: boolean + description: '' + KVEntity: + type: object + properties: + key: + type: string + description: '' + value: + type: string + description: '' + ListReleaseBO: + type: object + properties: + baseInfo: + $ref: '#/components/schemas/ReleaseDTO' + description: '' + items: + type: array + items: + $ref: '#/components/schemas/KVEntity' + description: com.ctrip.framework.apollo.portal.entity.bo.KVEntity + description: '' + EntityPairKVEntity: + type: object + properties: + firstEntity: + $ref: '#/components/schemas/KVEntity' + description: '' + secondEntity: + $ref: '#/components/schemas/KVEntity' + description: '' + Change: + type: object + properties: + type: + type: string + description: '' + enum: + - ADDED + - MODIFIED + - DELETED + entity: + $ref: '#/components/schemas/EntityPairKVEntity' + description: '' + + OpenInstanceConfigDTO: + type: object + properties: + release: + $ref: '#/components/schemas/OpenReleaseDTO' + description: '' + releaseDeliveryTime: + type: string + description: '' + dataChangeLastModifiedTime: + type: string + description: '' + OpenInstanceDTO: &ref_3 + type: object + properties: + id: + type: integer + description: '' + format: int64 + appId: + type: string + description: '' + clusterName: + type: string + description: '' + dataCenter: + type: string + description: '' + ip: + type: string + description: '' + configs: + type: array + items: + $ref: '#/components/schemas/OpenInstanceConfigDTO' + description: com.ctrip.framework.apollo.openapi.dto.OpenInstanceConfigDTO + description: '' + dataChangeCreatedTime: + type: string + description: '' + + + + OpenOrganizationDto: + type: object + properties: + orgId: + type: string + description: '' + orgName: + type: string + description: '' + + +servers: [] From 5f6213780fad13dc8ef8ebc05ab511ecfb2ab573 Mon Sep 17 00:00:00 2001 From: tacklequestions Date: Sun, 7 Sep 2025 17:29:37 +0800 Subject: [PATCH 5/6] =?UTF-8?q?chore(openapi):=20=E6=B8=85=E7=90=86?= =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=94=B9=E5=8A=A8=EF=BC=88WIP=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: arrow2020 <316166287@qq.com> --- apollo-openapi.yaml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/apollo-openapi.yaml b/apollo-openapi.yaml index b1d81320..fb0e489b 100644 --- a/apollo-openapi.yaml +++ b/apollo-openapi.yaml @@ -3,28 +3,28 @@ info: title: Apollo OpenAPI description: | Apollo配置中心OpenAPI接口文档 - + ## 认证方式 - + 所有API接口都需要通过Authorization header进行身份验证。 - + ### 获取Token的方式: - + 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入"管理员工具" -> "开放平台授权管理" - 创建第三方应用,获取Token - + 2. **Token格式**: ``` Authorization: token_value ``` - + 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token - + ### 使用示例: ```bash curl -X GET "http://localhost:8070/openapi/v1/apps" \ @@ -3840,17 +3840,14 @@ components: name: Authorization description: | Apollo OpenAPI访问令牌 - **获取方式:** 1. 登录Apollo Portal管理界面 - 2. 进入"管理员工具" -> "开放平台授权管理" + 2. 进入"管理员工具" -> "开放平台授权管理" 3. 创建第三方应用,获取Token - **使用格式:** ``` Authorization: your_token_here ``` - **权限说明:** - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 From 7420f657c5ec62061454e6c1b5d1ab6b693c688e Mon Sep 17 00:00:00 2001 From: tacklequestions Date: Mon, 8 Sep 2025 15:46:45 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix(openapi):=20=E4=BF=AE=E5=A4=8D=20ItemCh?= =?UTF-8?q?angeSets=20=E4=B8=AD=20default=20=E5=AD=97=E6=AE=B5=E9=9D=9E?= =?UTF-8?q?=E6=B3=95=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apollo-openapi.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apollo-openapi.yaml b/apollo-openapi.yaml index fb0e489b..f8343fd5 100644 --- a/apollo-openapi.yaml +++ b/apollo-openapi.yaml @@ -4391,21 +4391,21 @@ components: $ref: '#/components/schemas/ItemDTO' description: com.ctrip.framework.apollo.common.dto.ItemDTO description: '' - default: new LinkedList<>() + default: [] updateItems: type: array items: $ref: '#/components/schemas/ItemDTO' description: com.ctrip.framework.apollo.common.dto.ItemDTO description: '' - default: new LinkedList<>() + default: [] deleteItems: type: array items: $ref: '#/components/schemas/ItemDTO' description: com.ctrip.framework.apollo.common.dto.ItemDTO description: '' - default: new LinkedList<>() + default: [] ListItemDiffs: type: object properties: