Apollo OpenAPI (1.0.0)

Download OpenAPI specification:

Apollo配置中心OpenAPI接口文档

认证方式

所有 API 接口都需要通过 Authorization header 进行身份验证。

获取 Token 的方式:

  1. Portal 管理界面获取:登录 Portal → 管理员工具 → 开放平台授权管理 → 创建第三方应用,获取 Token。
  2. Token 格式Authorization: token_value
  3. Token 权限:按应用/环境/命名空间授予,建议不同用途分别创建。

使用示例

curl -X GET "http://localhost:8070/openapi/v1/apps" \
-H "Authorization: your_token_here"

App Management

应用管理相关接口,包括应用的创建、查询、更新、删除等操作

创建应用 (original openapi)

POST /openapi/v1/apps

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
assignAppRoleToSelf
boolean

是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限

admins
Array of strings

应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限

object (OpenAppDTO)

Apollo应用信息数据传输对象,包含应用的基本信息和元数据

Responses

Request samples

Content type
application/json
{
  • "assignAppRoleToSelf": true,
  • "admins": [
    ],
  • "app": {
    }
}

Response samples

Content type
application/json
{ }

查找应用 (original openapi)

POST /openapi/v1/apps

Authorizations:
ApiKeyAuth
query Parameters
appIds
string
Example: appIds=123

查找应用

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

获取当前Consumer授权的应用列表 (original openapi)

GET /openapi/v1/apps/authorized

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

获取应用的环境集群信息 (original openapi)

GET /openapi/v1/apps/{appId}/envclusters

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

获取单个应用信息(new added)

GET /openapi/v1/apps/{appId}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
{
  • "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"
}

更新应用(new added)

PUT /openapi/v1/apps/{appId}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

query Parameters
operator
required
string

操作人用户名

Request Body schema: application/json
required
dataChangeCreatedBy
string

数据创建者用户名,记录是谁创建了这个应用

dataChangeLastModifiedBy
string

数据最后修改者用户名,记录最后一次修改应用信息的用户

dataChangeCreatedTime
string

数据创建时间,ISO 8601格式的时间戳

dataChangeLastModifiedTime
string

数据最后修改时间,ISO 8601格式的时间戳

name
string

应用名称,用于显示的友好名称

appId
string

应用唯一标识符,全局唯一的应用ID

orgId
string

组织ID,应用所属组织的唯一标识

orgName
string

组织名称,应用所属组织的显示名称

ownerName
string

应用负责人姓名,应用的主要负责人

ownerEmail
string

应用负责人邮箱地址,用于接收应用相关通知

Responses

Request samples

Content type
application/json
{
  • "dataChangeCreatedBy": "string",
  • "dataChangeLastModifiedBy": "string",
  • "dataChangeCreatedTime": "2025-09-29T12:34:56Z",
  • "dataChangeLastModifiedTime": "2025-09-29T12:34:56Z",
  • "name": "string",
  • "appId": "string",
  • "orgId": "string",
  • "orgName": "string",
  • "ownerName": "string",
  • "ownerEmail": "string"
}

Response samples

Content type
application/json
{
  • "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"
}

删除应用(new added)

DELETE /openapi/v1/apps/{appId}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

query Parameters
operator
required
string

操作人用户名

Responses

Response samples

Content type
application/json
{ }

获取当前Consumer的应用列表(分页)(new added)

GET /openapi/v1/apps/by-self

Authorizations:
ApiKeyAuth
query Parameters
page
required
integer >= 0

页数

size
required
integer >= 0

页大小

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

获取应用导航树(new added)

GET /openapi/v1/apps/{appId}/navtree

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

在指定环境创建应用(new added)

POST /openapi/v1/apps/envs/{env}

Authorizations:
ApiKeyAuth
path Parameters
env
required
string

环境标识,例如 DEV、FAT、UAT、PROD

query Parameters
operator
required
string

操作人用户名

Request Body schema: application/json
required
dataChangeCreatedBy
string

数据创建者用户名,记录是谁创建了这个应用

dataChangeLastModifiedBy
string

数据最后修改者用户名,记录最后一次修改应用信息的用户

dataChangeCreatedTime
string

数据创建时间,ISO 8601格式的时间戳

dataChangeLastModifiedTime
string

数据最后修改时间,ISO 8601格式的时间戳

name
string

应用名称,用于显示的友好名称

appId
string

应用唯一标识符,全局唯一的应用ID

orgId
string

组织ID,应用所属组织的唯一标识

orgName
string

组织名称,应用所属组织的显示名称

ownerName
string

应用负责人姓名,应用的主要负责人

ownerEmail
string

应用负责人邮箱地址,用于接收应用相关通知

Responses

Request samples

Content type
application/json
{
  • "dataChangeCreatedBy": "string",
  • "dataChangeLastModifiedBy": "string",
  • "dataChangeCreatedTime": "2025-09-29T12:34:56Z",
  • "dataChangeLastModifiedTime": "2025-09-29T12:34:56Z",
  • "name": "string",
  • "appId": "string",
  • "orgId": "string",
  • "orgName": "string",
  • "ownerName": "string",
  • "ownerEmail": "string"
}

Response samples

Content type
application/json
{ }

查找缺失的环境(new added)

GET /openapi/v1/apps/{appId}/miss_envs

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "entities": [
    ]
}

Item Management

配置项管理相关接口,包括配置的增删改查、批量操作、同步等功能

获取单个配置项 (original openapi)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

key
required
string

配置项键名

Responses

Response samples

Content type
application/json
{
  • "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": "服务器端口配置"
}

更新配置项 (original openapi)

PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

key
required
string
query Parameters
createIfNotExists
required
boolean
Default: false
Example: createIfNotExists=false
Request Body schema: application/json
required
dataChangeCreatedBy
string

配置项创建者用户名,记录是谁创建了这个配置项

dataChangeLastModifiedBy
string

配置项最后修改者用户名,记录最后一次修改配置的用户

dataChangeCreatedTime
string

配置项创建时间,ISO 8601格式的时间戳

dataChangeLastModifiedTime
string

配置项最后修改时间,ISO 8601格式的时间戳

key
string

配置项的键名,在同一命名空间内唯一标识一个配置项

type
integer

配置项类型,0表示普通配置项,1表示文件类型配置项

value
string

配置项的值,可以是字符串、数字、JSON等格式

comment
string

配置项的注释说明,用于描述配置项的用途和含义

Responses

Request samples

Content type
application/json
{
  • "dataChangeCreatedBy": "string",
  • "dataChangeLastModifiedBy": "string",
  • "dataChangeCreatedTime": "2025-09-29T12:34:56Z",
  • "dataChangeLastModifiedTime": "2025-09-29T12:34:56Z",
  • "key": "string",
  • "type": 0,
  • "value": "string",
  • "comment": "string"
}

Response samples

Content type
application/json
{ }

删除配置项 (original openapi)

DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

key
required
string

配置项键名

query Parameters
operator
required
string

操作人用户名

Responses

Response samples

Content type
application/json
{ }

获取命名空间下的配置项列表 (original openapi)

获取指定命名空间的配置项列表,支持分页

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

query Parameters
page
required
integer >= 0

页码,从0开始

size
required
integer >= 0
Example: size=50

每页数量

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "size": 50,
  • "total": 3,
  • "content": [
    ]
}

创建新的配置项 (original openapi)

POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

query Parameters
operator
required
string

操作人用户名

Request Body schema: application/json
required
dataChangeCreatedBy
string

配置项创建者用户名,记录是谁创建了这个配置项

dataChangeLastModifiedBy
string

配置项最后修改者用户名,记录最后一次修改配置的用户

dataChangeCreatedTime
string

配置项创建时间,ISO 8601格式的时间戳

dataChangeLastModifiedTime
string

配置项最后修改时间,ISO 8601格式的时间戳

key
string

配置项的键名,在同一命名空间内唯一标识一个配置项

type
integer

配置项类型,0表示普通配置项,1表示文件类型配置项

value
string

配置项的值,可以是字符串、数字、JSON等格式

comment
string

配置项的注释说明,用于描述配置项的用途和含义

Responses

Request samples

Content type
application/json
{
  • "dataChangeCreatedBy": "string",
  • "dataChangeLastModifiedBy": "string",
  • "dataChangeCreatedTime": "2025-09-29T12:34:56Z",
  • "dataChangeLastModifiedTime": "2025-09-29T12:34:56Z",
  • "key": "string",
  • "type": 0,
  • "value": "string",
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "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": "服务器端口配置"
}

通过查询参数获取配置项(支持编码的key) (original openapi)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

key
required
string

配置项键名(需要URL编码)

Responses

Response samples

Content type
application/json
{
  • "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": "数据库连接地址,包含特殊字符"
}

通过编码的key更新配置项 (original openapi)

PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

key
required
string

配置项键名(需要URL编码)

query Parameters
createIfNotExists
required
boolean
Default: false
Example: createIfNotExists=false

若不存在则创建(true/false)

Request Body schema: application/json
required
dataChangeCreatedBy
string

配置项创建者用户名,记录是谁创建了这个配置项

dataChangeLastModifiedBy
string

配置项最后修改者用户名,记录最后一次修改配置的用户

dataChangeCreatedTime
string

配置项创建时间,ISO 8601格式的时间戳

dataChangeLastModifiedTime
string

配置项最后修改时间,ISO 8601格式的时间戳

key
string

配置项的键名,在同一命名空间内唯一标识一个配置项

type
integer

配置项类型,0表示普通配置项,1表示文件类型配置项

value
string

配置项的值,可以是字符串、数字、JSON等格式

comment
string

配置项的注释说明,用于描述配置项的用途和含义

Responses

Request samples

Content type
application/json
{
  • "dataChangeCreatedBy": "string",
  • "dataChangeLastModifiedBy": "string",
  • "dataChangeCreatedTime": "2025-09-29T12:34:56Z",
  • "dataChangeLastModifiedTime": "2025-09-29T12:34:56Z",
  • "key": "string",
  • "type": 0,
  • "value": "string",
  • "comment": "string"
}

Response samples

Content type
application/json
{ }

通过编码的key删除配置项 (original openapi)

DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
env
required
string
clusterName
required
string
namespaceName
required
string
key
required
string
query Parameters
operator
required
string

Responses

Response samples

Content type
application/json
{ }

通过文本批量修改配置项 (new added)

PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate:

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
env
required
string
clusterName
required
string
namespaceName
required
string
query Parameters
operator
required
string

操作人用户名

Request Body schema: application/json
required
appId
string

应用唯一标识

env
string

环境标识

clusterName
string

集群名称

namespaceName
string

命名空间名称

namespaceId
integer <int64>

命名空间ID

format
string

命名空间格式类型(properties/xml/json/yml等)

configText
string

配置内容的原始文本

operator
string

操作者用户名

Responses

Request samples

Content type
application/json
{
  • "appId": "string",
  • "env": "string",
  • "clusterName": "string",
  • "namespaceName": "string",
  • "namespaceId": 0,
  • "format": "string",
  • "configText": "string",
  • "operator": "string"
}

Response samples

Content type
application/json
{ }

获取分支下的配置项 (new added)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

branchName
required
string

分支名称

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

对比命名空间配置差异 (new added)

POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

Request Body schema: application/json
required
Array of objects (OpenNamespaceIdentifier)

目标命名空间标识列表

Array of objects (OpenItemDTO)

需要同步的配置项列表

Responses

Request samples

Content type
application/json
{
  • "syncToNamespaces": [
    ],
  • "syncItems": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

同步配置项到多个命名空间 (new added)

POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync:

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string
namespaceName
required
string
query Parameters
operator
required
string

操作人用户名

Request Body schema: application/json
required
Array of objects (OpenNamespaceIdentifier)

目标命名空间标识列表

Array of objects (OpenItemDTO)

需要同步的配置项列表

Responses

Request samples

Content type
application/json
{
  • "syncToNamespaces": [
    ],
  • "syncItems": [
    ]
}

Response samples

Content type
application/json
{ }

验证配置文本语法 (new added)

POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
env
required
string
clusterName
required
string
namespaceName
required
string
Request Body schema: application/json
required
appId
string

应用唯一标识

env
string

环境标识

clusterName
string

集群名称

namespaceName
string

命名空间名称

namespaceId
integer <int64>

命名空间ID

format
string

命名空间格式类型(properties/xml/json/yml等)

configText
string

配置内容的原始文本

operator
string

操作者用户名

Responses

Request samples

Content type
application/json
{
  • "appId": "string",
  • "env": "string",
  • "clusterName": "string",
  • "namespaceName": "string",
  • "namespaceId": 0,
  • "format": "string",
  • "configText": "string",
  • "operator": "string"
}

Response samples

Content type
application/json
{ }

撤销配置项更改 (new added)

POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
env
required
string
clusterName
required
string
namespaceName
required
string
query Parameters
operator
required
string

操作人用户名

Responses

Response samples

Content type
application/json
{ }

Release Management

发布管理相关接口,包括配置发布、发布历史、灰度发布等功能

创建发布 (original openapi)

创建发布

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

app标识

env
required
string

环境标识

clusterName
required
string
namespaceName
required
string

命名空间名称

Request Body schema: application/json
required
releaseTitle
string

发布标题,用于标识这次发布的名称或版本号

releaseComment
string

发布备注,详细描述本次发布的变更内容和目的

releasedBy
string

发布操作者用户名,记录是谁执行了这次发布操作

isEmergencyPublish
boolean

是否为紧急发布,紧急发布可能会跳过某些审核流程

Responses

Request samples

Content type
application/json
{
  • "releaseTitle": "string",
  • "releaseComment": "string",
  • "releasedBy": "string",
  • "isEmergencyPublish": true
}

Response samples

Content type
application/json
{
  • "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": {
    },
  • "comment": "首次发布,包含基础配置"
}

获取最新活跃发布 (original openapi)

查询命名空间最新活跃发布

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

Responses

Response samples

Content type
application/json
{
  • "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": {
    },
  • "comment": "最新生产发布版本,包含性能优化"
}

合并分支 (original openapi)

合并灰度分支并可选择删除分支

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

branchName
required
string

分支名称

query Parameters
deleteBranch
required
boolean
Example: deleteBranch=true

合并后是否删除分支(true/false)

Request Body schema: application/json
required
releaseTitle
string

发布标题,用于标识这次发布的名称或版本号

releaseComment
string

发布备注,详细描述本次发布的变更内容和目的

releasedBy
string

发布操作者用户名,记录是谁执行了这次发布操作

isEmergencyPublish
boolean

是否为紧急发布,紧急发布可能会跳过某些审核流程

Responses

Request samples

Content type
application/json
{
  • "releaseTitle": "string",
  • "releaseComment": "string",
  • "releasedBy": "string",
  • "isEmergencyPublish": true
}

Response samples

Content type
application/json
{
  • "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": {
    },
  • "comment": "合并功能分支到主分支,包含新功能配置"
}

创建灰度发布 (original openapi)

创建灰度发布

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

app标识

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

branchName
required
string

分支名称

Request Body schema: application/json
required
releaseTitle
string

发布标题,用于标识这次发布的名称或版本号

releaseComment
string

发布备注,详细描述本次发布的变更内容和目的

releasedBy
string

发布操作者用户名,记录是谁执行了这次发布操作

isEmergencyPublish
boolean

是否为紧急发布,紧急发布可能会跳过某些审核流程

Responses

Request samples

Content type
application/json
{
  • "releaseTitle": "string",
  • "releaseComment": "string",
  • "releasedBy": "string",
  • "isEmergencyPublish": true
}

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "",
  • "dataChangeLastModifiedBy": "",
  • "dataChangeCreatedTime": "",
  • "dataChangeLastModifiedTime": "",
  • "id": 0,
  • "appId": "",
  • "clusterName": "",
  • "namespaceName": "",
  • "name": "",
  • "configurations": {
    },
  • "comment": ""
}

创建灰度删除发布 (original openapi)

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
env
required
string
clusterName
required
string
namespaceName
required
string
branchName
required
string
Request Body schema: application/json
required
releaseTitle
string

发布标题,用于标识这次灰度删除发布的名称或版本号

releaseComment
string

发布备注,详细描述本次灰度删除发布的目的和删除的配置项

releasedBy
string

发布操作者用户名,记录是谁执行了这次灰度删除发布操作

isEmergencyPublish
boolean

是否为紧急发布,紧急发布可能会跳过某些审核流程

grayDelKeys
Array of strings

需要在灰度发布中删除的配置项键名列表

Responses

Request samples

Content type
application/json
{
  • "releaseTitle": "string",
  • "releaseComment": "string",
  • "releasedBy": "string",
  • "isEmergencyPublish": true,
  • "grayDelKeys": [
    ]
}

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "",
  • "dataChangeLastModifiedBy": "",
  • "dataChangeCreatedTime": "",
  • "dataChangeLastModifiedTime": "",
  • "id": 0,
  • "appId": "",
  • "clusterName": "",
  • "namespaceName": "",
  • "name": "",
  • "configurations": {
    },
  • "comment": ""
}

回滚发布 (original openapi)

回滚到指定的发布版本

Authorizations:
ApiKeyAuth
path Parameters
env
required
string

环境标识

releaseId
required
integer <int64>

发布ID

query Parameters
operator
required
string

操作人用户名

Responses

Response samples

Content type
application/json
{ }

获取发布详情 (new added)

GET /openapi/v1/envs/{env}/releases/{releaseId}

Authorizations:
ApiKeyAuth
path Parameters
env
required
string

环境标识

releaseId
required
integer

发布ID

Responses

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "",
  • "dataChangeLastModifiedBy": "",
  • "dataChangeCreatedTime": "",
  • "dataChangeLastModifiedTime": "",
  • "id": 0,
  • "appId": "",
  • "clusterName": "",
  • "namespaceName": "",
  • "name": "",
  • "configurations": {
    },
  • "comment": ""
}

获取所有发布(分页) (new added)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

query Parameters
page
required
integer

页码,从0开始

size
required
integer
Example: size=5

每页数量

Responses

Response samples

Content type
application/json
[
  • {
    }
]

获取活跃发布(分页) (new added)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

query Parameters
page
required
integer

页码,从0开始

size
required
integer
Example: size=5

每页数量

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Cluster Management

集群管理相关接口,包括集群的创建、查询、删除等操作

获取指定集群信息 (original openapi)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
clusterName
required
string
env
required
string

Responses

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "apollo",
  • "dataChangeLastModifiedBy": "ops-user",
  • "dataChangeCreatedTime": "2024-01-15T10:30:00.000Z",
  • "dataChangeLastModifiedTime": "2024-01-18T09:15:00.000Z",
  • "name": "production",
  • "appId": "sample-app"
}

删除集群 (new added)

DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}

Authorizations:
ApiKeyAuth
path Parameters
env
required
string
appId
required
string
clusterName
required
string
query Parameters
operator
string

操作人用户名,openapi外部调用时需传入

Responses

Response samples

Content type
application/json
{ }

创建集群 (original openapi)

POST /openapi/v1/envs/{env}/apps/{appId}/clusters

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string
Request Body schema: application/json
required
dataChangeCreatedBy
string

集群创建者用户名,记录是谁创建了这个集群

dataChangeLastModifiedBy
string

集群最后修改者用户名,记录最后一次修改集群信息的用户

dataChangeCreatedTime
string

集群创建时间,ISO 8601格式的时间戳

dataChangeLastModifiedTime
string

集群最后修改时间,ISO 8601格式的时间戳

name
string

集群名称,在同一应用和环境下唯一标识一个集群

appId
string

所属应用的唯一标识符

id
integer <int64>

集群的唯一标识符

parentClusterId
integer <int64>

父集群的ID

comment
string

集群的备注说明

Responses

Request samples

Content type
application/json
{
  • "dataChangeCreatedBy": "string",
  • "dataChangeLastModifiedBy": "string",
  • "dataChangeCreatedTime": "2025-09-29T12:34:56Z",
  • "dataChangeLastModifiedTime": "2025-09-29T12:34:56Z",
  • "name": "string",
  • "appId": "string",
  • "id": 0,
  • "parentClusterId": 0,
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "apollo",
  • "dataChangeLastModifiedBy": "apollo",
  • "dataChangeCreatedTime": "2024-01-15T10:30:00.000Z",
  • "dataChangeLastModifiedTime": "2024-01-15T10:30:00.000Z",
  • "name": "test-cluster",
  • "appId": "sample-app"
}

Namespace Management

命名空间管理相关接口,包括命名空间的创建、查询、配置等操作

创建AppNamespace (original openapi)

POST /openapi/v1/apps/{appId}/appnamespaces

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
Request Body schema: application/json
required
dataChangeCreatedBy
string

命名空间创建者用户名,记录是谁创建了这个应用命名空间

dataChangeLastModifiedBy
string

命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户

dataChangeCreatedTime
string

命名空间创建时间,ISO 8601格式的时间戳

dataChangeLastModifiedTime
string

命名空间最后修改时间,ISO 8601格式的时间戳

name
string

命名空间名称,在同一应用内唯一标识一个命名空间

appId
string

所属应用的唯一标识符

format
string

命名空间格式类型,如properties、xml、json、yml等

isPublic
boolean

是否为公共命名空间,公共命名空间可以被其他应用关联使用

appendNamespacePrefix
boolean
Default: true

对于公共命名空间,是否在命名空间名称前添加前缀

comment
string

命名空间备注说明,描述命名空间的用途和包含的配置类型

Responses

Request samples

Content type
application/json
{
  • "dataChangeCreatedBy": "string",
  • "dataChangeLastModifiedBy": "string",
  • "dataChangeCreatedTime": "2025-09-29T12:34:56Z",
  • "dataChangeLastModifiedTime": "2025-09-29T12:34:56Z",
  • "name": "string",
  • "appId": "string",
  • "format": "string",
  • "isPublic": true,
  • "appendNamespacePrefix": true,
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "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": "数据库相关配置命名空间"
}

获取指定应用的AppNamespace (new added)

GET /openapi/v1/apps/{appId}/appnamespaces

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

获取指定集群下的所有Namespace (original openapi)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
env
required
string
clusterName
required
string
query Parameters
fillItemDetail
required
boolean
Default: true
Example: fillItemDetail=true

Responses

Response samples

Content type
application/json
[
  • {
    }
]

获取指定的Namespace (original openapi)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
env
required
string
clusterName
required
string
namespaceName
required
string
query Parameters
fillItemDetail
required
boolean
Default: true
Example: fillItemDetail=true

Responses

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "",
  • "dataChangeLastModifiedBy": "",
  • "dataChangeCreatedTime": "",
  • "dataChangeLastModifiedTime": "",
  • "appId": "",
  • "clusterName": "",
  • "namespaceName": "",
  • "comment": "",
  • "format": "",
  • "isPublic": false,
  • "items": [
    ]
}

获取Namespace的锁状态 (original openapi)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string
env
required
string
clusterName
required
string
namespaceName
required
string

Responses

Response samples

Content type
application/json
{
  • "namespaceName": "",
  • "isLocked": false,
  • "lockedBy": ""
}

获取所有公共AppNamespace (new added)

GET /openapi/v1/appnamespaces?public=true

Authorizations:
ApiKeyAuth
query Parameters
publicOnly
required
boolean
Example: publicOnly=false

Responses

Response samples

Content type
application/json
[
  • {
    }
]

获取指定的AppNamespace (new added)

GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

namespaceName
required
string

命名空间名称

Responses

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "",
  • "dataChangeLastModifiedBy": "",
  • "dataChangeCreatedTime": "",
  • "dataChangeLastModifiedTime": "",
  • "name": "",
  • "appId": "",
  • "format": "",
  • "isPublic": false,
  • "appendNamespacePrefix": false,
  • "comment": ""
}

删除AppNamespace (new added)

DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

namespaceName
required
string

命名空间名称

query Parameters
operator
required
string

操作人用户名

Responses

Response samples

Content type
application/json
{ }

获取应用下所有Namespace的发布状态 (new added)

GET /openapi/v1/apps/{appId}/namespaces/releases/status

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

Responses

Response samples

Content type
application/json
{
  • "projectA": {
    },
  • "projectB": {
    }
}

获取公共AppNamespace的所有实例 (new added)

GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances

Authorizations:
ApiKeyAuth
path Parameters
env
required
string

环境标识

publicNamespaceName
required
string

公共命名空间名称

query Parameters
page
required
integer

页码,从0开始

size
required
integer
Example: size=10

每页数量

Responses

Response samples

Content type
application/json
[
  • {
    }
]

获取关联的公共Namespace (new added)

GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

Responses

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "",
  • "dataChangeLastModifiedBy": "",
  • "dataChangeCreatedTime": "",
  • "dataChangeLastModifiedTime": "",
  • "appId": "",
  • "clusterName": "",
  • "namespaceName": "",
  • "comment": "",
  • "format": "",
  • "isPublic": false,
  • "items": [
    ]
}

检查缺失的Namespace (new added)

GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

Responses

Response samples

Content type
application/json
[
  • ""
]

Namespace Namespace Branch Management

命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能

Instance Management

实例管理相关接口,包括实例查询、配置生效状态等功能

获取命名空间下的实例数量 (original openapi)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances

Authorizations:
ApiKeyAuth
path Parameters
env
required
string
appId
required
string

应用ID

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

Responses

Response samples

Content type
application/json
0
0

根据发布版本查询实例(支持分页) (new added)

GET /openapi/v1/envs/{env}/releases/{releaseId}/instances

Authorizations:
ApiKeyAuth
path Parameters
env
required
string
releaseId
required
integer
query Parameters
page
required
integer
size
required
integer
Example: size=20

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "size": 0,
  • "total": 0,
  • "content": [
    ]
}

查询不在指定发布版本中的实例 (new added)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3

Authorizations:
ApiKeyAuth
path Parameters
env
required
string

环境标识

appId
required
string

应用ID

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

query Parameters
excludeReleases
string

排除的发布ID列表,用逗号分隔

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Organization Management

组织管理相关接口,包括组织信息查询等功能

获取所有组织信息 (original openapi)

GET /openapi/v1/organizations

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

Environment Management

环境管理相关接口,包括环境查询等功能

获取所有环境

GET /openapi/v1/envs

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • "DEV",
  • "FAT",
  • "UAT",
  • "PRO"
]

Namespace Branch Management

获取命名空间分支信息 (original openapi)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

Responses

Response samples

Content type
application/json
{
  • "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": [
    ]
}

创建命名空间分支 (original openapi)

POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

app标识

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

query Parameters
operator
required
string

操作人用户名

Responses

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "",
  • "dataChangeLastModifiedBy": "",
  • "dataChangeCreatedTime": "",
  • "dataChangeLastModifiedTime": "",
  • "appId": "",
  • "clusterName": "",
  • "namespaceName": "",
  • "comment": "",
  • "format": "",
  • "isPublic": false,
  • "items": [
    ]
}

删除命名空间分支 (original openapi)

DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}

Authorizations:
ApiKeyAuth
path Parameters
env
required
string

环境标识

appId
required
string

应用ID

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

branchName
required
string

分支名称

query Parameters
operator
required
string

操作人用户名

Responses

Response samples

Content type
application/json
{ }

合并分支到主分支 (new added)

PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}

使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并")

Authorizations:
ApiKeyAuth
path Parameters
env
required
string

环境标识

appId
required
string

应用ID

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

branchName
required
string

分支名称

query Parameters
deleteBranch
required
boolean
Example: deleteBranch=true

合并后是否删除分支(true/false)

operator
required
string

操作人用户名

Request Body schema: application/json
required
releaseTitle
string

发布标题,用于标识这次发布的名称或版本号

releaseComment
string

发布备注,详细描述本次发布的变更内容和目的

releasedBy
string

发布操作者用户名,记录是谁执行了这次发布操作

isEmergencyPublish
boolean

是否为紧急发布,紧急发布可能会跳过某些审核流程

Responses

Request samples

Content type
application/json
{
  • "releaseTitle": "string",
  • "releaseComment": "string",
  • "releasedBy": "string",
  • "isEmergencyPublish": true
}

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "",
  • "dataChangeLastModifiedBy": "",
  • "dataChangeCreatedTime": "",
  • "dataChangeLastModifiedTime": "",
  • "id": 0,
  • "appId": "",
  • "clusterName": "",
  • "namespaceName": "",
  • "name": "",
  • "configurations": {
    },
  • "comment": ""
}

获取分支灰度发布规则 (original openapi)

GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

app标识

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

branchName
required
string

分支名称

Responses

Response samples

Content type
application/json
{
  • "dataChangeCreatedBy": "",
  • "dataChangeLastModifiedBy": "",
  • "dataChangeCreatedTime": "",
  • "dataChangeLastModifiedTime": "",
  • "appId": "",
  • "clusterName": "",
  • "namespaceName": "",
  • "branchName": "",
  • "ruleItems": [
    ]
}

更新分支灰度发布规则 (original openapi)

PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules

Authorizations:
ApiKeyAuth
path Parameters
appId
required
string

应用ID

env
required
string

环境标识

clusterName
required
string

集群名称

namespaceName
required
string

命名空间名称

branchName
required
string

分支名称

query Parameters
operator
required
string

操作人用户名

Request Body schema: application/json
required
dataChangeCreatedBy
string

灰度规则创建者用户名,记录是谁创建了这个灰度发布规则

dataChangeLastModifiedBy
string

灰度规则最后修改者用户名,记录最后一次修改规则的用户

dataChangeCreatedTime
string

灰度规则创建时间,ISO 8601格式的时间戳

dataChangeLastModifiedTime
string

灰度规则最后修改时间,ISO 8601格式的时间戳

appId
string

所属应用的唯一标识符

clusterName
string

所属集群的名称

namespaceName
string

所属命名空间的名称

branchName
string

灰度分支名称,标识灰度发布的分支

Array of objects (OpenGrayReleaseRuleItemDTO)

灰度发布规则项列表,包含具体的灰度规则条件

Responses

Request samples

Content type
application/json
{
  • "dataChangeCreatedBy": "string",
  • "dataChangeLastModifiedBy": "string",
  • "dataChangeCreatedTime": "2025-09-29T12:34:56Z",
  • "dataChangeLastModifiedTime": "2025-09-29T12:34:56Z",
  • "appId": "string",
  • "clusterName": "string",
  • "namespaceName": "string",
  • "branchName": "string",
  • "ruleItems": [
    ]
}

Response samples

Content type
application/json
{ }