openapi: 3.0.1 info: title: Apollo OpenAPI description: |
Apollo配置中心OpenAPI接口文档
所有 API 接口都需要通过 Authorization header 进行身份验证。
Authorization: token_valuecurl -X GET "http://localhost:8070/openapi/v1/apps" \
-H "Authorization: your_token_here"
version: 0.3.9
security:
- ApiKeyAuth: []
tags:
- name: App Management
description: 应用管理相关接口,包括应用的创建、查询、更新、删除等操作
- name: Item Management
description: 配置项管理相关接口,包括配置的增删改查、批量操作、同步等功能
- name: Release Management
description: 发布管理相关接口,包括配置发布、发布历史、灰度发布等功能
- name: Cluster Management
description: 集群管理相关接口,包括集群的创建、查询、删除等操作
- name: Namespace Management
description: 命名空间管理相关接口,包括命名空间的创建、查询、配置等操作
- name: AppNamespace Management
description: AppNamespace管理相关接口,包括创建、查询、删除等操作
- name: Namespace Lock Management
description: 命名空间锁管理相关接口
- name: Namespace Branch Management
description: 命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能
- name: Instance Management
description: 实例管理相关接口,包括实例查询、配置生效状态等功能
- name: Organization Management
description: 组织管理相关接口,包括组织信息查询等功能
- name: Environment Management
description: 环境管理相关接口,包括环境查询等功能
- name: AccessKey Management
description: AccessKey管理相关接口,包括AccessKey的创建、查询、删除、启用、禁用等操作
- name: Permission Management
description: 权限管理相关接口,包括权限查询等功能
- name: User Management
description: 用户管理相关接口,支持Portal用户登录态和具备用户管理权限的Consumer Token调用
- name: User Token Management
description: 用户访问Token相关接口,包括当前Token身份、权限范围和可调用OpenAPI能力查询
- name: Portal Management
description: Portal UI 登录态管理接口,主要供当前版本 Portal 前端调用
paths:
/openapi/v1/apps:
post:
summary: 创建应用 (original openapi) # which means this belongs to initial openapi endpoints and should not be modified this time
operationId: createApp
deprecated: false
description: POST /openapi/v1/apps
tags:
- App Management
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenCreateAppDTO' # this is for avoiding openapi-generator of generating a new schema(OpenAppDTO with restriction)
required: true
responses:
'200':
description: '应用创建成功'
headers: {}
'400':
description: '请求参数错误'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse' # This is to avoid openapi-generator generating completely different error responses for each error
'403':
description: 权限不足
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
get:
summary: 查找应用 (original openapi)
operationId: findApps
deprecated: false
description: POST /openapi/v1/apps
tags:
- App Management
parameters:
- name: appIds
in: query
description: 查找应用
required: false
example: '123'
schema:
type: string
responses:
'200':
description: 成功获取应用列表
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenAppDTO'
example:
- dataChangeCreatedBy: 'apollo'
dataChangeLastModifiedBy: 'apollo'
dataChangeCreatedByDisplayName: 'Apollo Admin'
dataChangeLastModifiedByDisplayName: 'Apollo Admin'
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'
dataChangeCreatedByDisplayName: 'Apollo Admin'
dataChangeLastModifiedByDisplayName: 'Apollo Admin'
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:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/apps/authorized:
get:
summary: 获取当前Consumer授权的应用列表 (original openapi)
operationId: findAppsAuthorized
deprecated: false
description: GET /openapi/v1/apps/authorized
tags:
- App Management
responses:
'200':
description: 成功获取授权应用列表
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenAppDTO'
example:
- dataChangeCreatedBy: 'apollo'
dataChangeLastModifiedBy: 'apollo'
dataChangeCreatedByDisplayName: 'Apollo Admin'
dataChangeLastModifiedByDisplayName: 'Apollo Admin'
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'
dataChangeCreatedByDisplayName: 'Apollo Admin'
dataChangeLastModifiedByDisplayName: 'Apollo Admin'
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:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/apps/{appId}/envclusters:
get:
summary: 获取应用的环境集群信息 (original openapi)
operationId: getEnvClusters
deprecated: false
description: GET /openapi/v1/apps/{appId}/envclusters
tags:
- App Management
parameters:
- name: appId
in: path
description: 应用ID
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:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/apps/{appId}:
get:
summary: 获取单个应用信息(new added) # which means this is a new added openapi endpoint
operationId: getApp
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'
dataChangeCreatedByDisplayName: 'Apollo Admin'
dataChangeLastModifiedByDisplayName: '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:
$ref: '#/components/schemas/ExceptionResponse'
put:
summary: 更新应用(new added)
operationId: updateApp
deprecated: false
description: PUT /openapi/v1/apps/{appId}
tags:
- App Management
parameters:
- name: appId
in: path
description: '应用ID'
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAppDTO'
required: true
responses:
'200':
description: '应用更新成功'
'400':
description: '请求参数错误'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
delete:
summary: 删除应用(new added)
operationId: deleteApp
deprecated: false
description: DELETE /openapi/v1/apps/{appId}
tags:
- App Management
parameters:
- name: appId
in: path
description: '应用ID'
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
responses:
'200':
description: '应用删除成功'
'403':
description: '权限不足,需要超级管理员权限'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'404':
description: '应用不存在'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
headers: {}
/openapi/v1/apps/by-self:
get:
summary: 获取当前Consumer/User的应用列表(分页)(new added)
operationId: getAppsBySelf
deprecated: false
description: GET /openapi/v1/apps/by-self
tags:
- App Management
parameters:
- name: page
in: query
description: '页数'
required: true
schema:
type: integer
minimum: 0
- name: size
in: query
description: '页大小'
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: '成功获取Consumer的应用列表'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenAppDTO'
example:
- dataChangeCreatedBy: 'apollo'
dataChangeLastModifiedBy: 'dev-user'
dataChangeCreatedByDisplayName: 'Apollo Admin'
dataChangeLastModifiedByDisplayName: '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'
dataChangeCreatedByDisplayName: 'Apollo Admin'
dataChangeLastModifiedByDisplayName: '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:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/apps/{appId}/env-cluster-info:
get:
summary: 获取应用环境集群详情(new added)
operationId: getEnvClusterInfo
deprecated: false
description: /openapi/v1/apps/{appId}/env-cluster-info
tags:
- App Management
parameters:
- name: appId
in: path
description: '应用ID'
required: true
schema:
type: string
responses:
'200':
description: '成功获取应用环境集群详情'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenEnvClusterInfo'
example:
- env: 'DEV'
code: '200'
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'
message: 'load env: DEV cluster error'
headers: {}
/openapi/v1/apps/envs/{env}:
post:
summary: 在指定环境创建应用(new added)
operationId: createAppInEnv
deprecated: false
description: POST /openapi/v1/apps/envs/{env}
tags:
- App Management
parameters:
- name: env
in: path
description: 环境标识,例如 DEV、FAT、UAT、PROD
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAppDTO'
required: true
responses:
'200':
description: '应用在指定环境创建成功'
'400':
description: '请求参数错误'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
headers: {}
/openapi/v1/apps/{appId}/miss-envs:
get:
summary: 查找缺失的环境(new added)
operationId: findMissEnvs
deprecated: false
description: GET /openapi/v1/apps/{appId}/miss-envs
tags:
- App Management
parameters:
- name: appId
in: path
description: '应用ID'
required: true
schema:
type: string
responses:
'200':
description: 成功获取应用缺失的环境列表
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenMissEnvDTO'
example:
- code: "200"
message: "test_NOT_FOUND"
- code: "500"
message: "load appId:xx from env test_INTERNAL_ERROR error. test ERROR MESSAGE"
'404':
description: '应用不存在'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}:
get:
summary: 获取单个配置项 (original openapi)
operationId: getItem
deprecated: false
description: GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}
tags:
- Item Management
parameters:
- name: appId
in: path
description: '应用ID'
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:
$ref: '#/components/schemas/ExceptionResponse'
put:
summary: 更新配置项 (original openapi)
operationId: updateItem
deprecated: false
description: PUT /openapi/v1/envs/{env}/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
default: false
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenItemDTO'
required: true
responses:
'200':
description: '配置项更新成功'
'400':
description: '请求参数错误'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'404':
description: '配置项不存在'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
headers: {}
delete:
summary: 删除配置项 (original openapi)
operationId: deleteItem
deprecated: false
description: DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}
tags:
- Item Management
parameters:
- name: appId
in: path
description: '应用ID'
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: false
schema:
type: string
responses:
'200':
description: '配置项删除成功'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:
get:
summary: 获取命名空间下的配置项列表 (original openapi)
operationId: findItemsByNamespace
deprecated: false
description: 获取指定命名空间的配置项列表,支持分页
tags:
- Item Management
parameters:
- name: appId
in: path
description: '应用ID'
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: '页码,从0开始'
required: true
example: 0
schema:
type: integer
minimum: 0
- name: size
in: query
description: '每页数量'
required: true
example: 50
schema:
type: integer
minimum: 0
responses:
'200':
description: '成功获取配置项列表'
content:
application/json:
schema:
$ref: '#/components/schemas/OpenItemPageDTO'
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:
$ref: '#/components/schemas/ExceptionResponse'
post:
summary: 创建新的配置项 (original openapi)
operationId: createItem
deprecated: false
description: POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items
tags:
- Item Management
parameters:
- name: appId
in: path
description: '应用ID'
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: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenItemDTO'
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:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
put:
summary: 通过文本批量修改配置项 (new added)
operationId: batchUpdateItemsByText
deprecated: false
description: >-
PUT
/openapi/v1/envs/{env}/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
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenNamespaceTextModel'
required: true
responses:
'200':
description: '批量更新配置项成功'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
headers: {}
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}:
get:
summary: 通过查询参数获取配置项(支持编码的key) (original openapi)
operationId: getItemByEncodedKey
deprecated: false
description: GET /openapi/v1/envs/{env}/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: '配置项键名(需要URL编码)'
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:
$ref: '#/components/schemas/ExceptionResponse'
put:
summary: 通过编码的key更新配置项 (original openapi)
operationId: updateItemByEncodedKey
deprecated: false
description: PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}
tags:
- Item Management
parameters:
- name: appId
in: path
description: '应用ID'
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: '配置项键名(需要URL编码)'
required: true
schema:
type: string
- name: createIfNotExists
in: query
description: '若不存在则创建(true/false)'
required: true
example: 'false'
schema:
type: boolean
default: false
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenItemDTO'
required: true
responses:
'200':
description: '配置项更新成功(编码key)'
'400':
description: 请求参数错误
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'404':
description: '配置项不存在'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
headers: {}
delete:
summary: 通过编码的key删除配置项 (original openapi)
operationId: deleteItemByEncodedKey
deprecated: false
description: DELETE /openapi/v1/envs/{env}/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: ''
headers: {}
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:
get:
summary: 获取分支下的配置项 (new added)
operationId: findBranchItems
deprecated: false
description: >-
GET
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:
tags:
- Item Management
parameters:
- name: appId
in: path
description: '应用ID'
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:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff:
post:
summary: 对比命名空间配置差异 (new added)
operationId: compareItems
deprecated: false
description: >-
POST
/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff
tags:
- Item Management
parameters:
- name: appId
in: path
description: '应用ID'
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:
$ref: '#/components/schemas/OpenNamespaceSyncDTO'
required: true
responses:
'200':
description: '成功对比命名空间配置差异'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenItemDiffDTO'
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/synchronize:
post:
summary: 同步配置项到多个命名空间 (new added)
operationId: syncItems
deprecated: false
description: >-
POST
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize:
tags:
- Item Management
parameters:
- name: appId
in: path
description: '应用ID'
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: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenNamespaceSyncDTO'
required: true
responses:
'200':
description: '配置项同步成功'
'400':
description: '请求参数错误'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
headers: {}
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation:
post:
summary: 验证配置文本语法 (new added)
operationId: syntaxCheck
deprecated: false
description: >-
POST
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation
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:
$ref: '#/components/schemas/OpenNamespaceTextModel'
required: true
responses:
'200':
description: '配置文本语法验证通过'
'400':
description: '配置文本语法错误'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
headers: {}
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation:
post:
summary: 撤销配置项更改 (new added)
operationId: revertItems
deprecated: false
description: >-
POST
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation
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: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
responses:
'200':
description: '配置项更改撤销成功'
'400':
description: '请求参数错误'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
headers: {}
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}:
get:
summary: 获取指定集群信息 (original openapi)
operationId: getCluster
deprecated: false
description: GET /openapi/v1/envs/{env}/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
- name: env
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:
$ref: '#/components/schemas/ExceptionResponse'
delete:
summary: 删除集群 (new added)
operationId: deleteCluster
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
- name: operator
in: query
description: '操作人用户名,openapi外部调用时需传入'
required: false
schema:
type: string
responses:
'200':
description: '集群删除成功'
'400':
description: '删除失败,集群可能包含配置'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'404':
description: '集群不存在'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
headers: {}
/openapi/v1/envs/{env}/apps/{appId}/clusters:
post:
summary: 创建集群 (original openapi)
operationId: createCluster
deprecated: false
description: POST /openapi/v1/envs/{env}/apps/{appId}/clusters
tags:
- Cluster Management
parameters:
- name: appId
in: path
description: 应用ID
required: true
schema:
type: string
- name: env
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenClusterDTO'
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:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 权限不足
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases:
post:
summary: 创建发布 (original openapi)
operationId: createRelease
deprecated: false
description: '创建发布'
tags:
- Release Management
parameters:
- name: appId
in: path
description: 'app标识'
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: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NamespaceReleaseDTO'
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:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest:
get:
summary: 获取最新活跃发布 (original openapi)
operationId: loadLatestActiveRelease
deprecated: false
description: '查询命名空间最新活跃发布'
tags:
- Release Management
parameters:
- name: appId
in: path
description: '应用ID'
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:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge:
post:
summary: 合并分支 (original openapi)
operationId: merge
deprecated: false
description: '合并灰度分支并可选择删除分支'
tags:
- Namespace Branch Management
parameters:
- name: appId
in: path
description: '应用ID'
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: '合并后是否删除分支(true/false)'
required: true
example: 'true'
schema:
type: boolean
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NamespaceReleaseDTO'
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:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases:
post:
summary: 创建灰度发布 (original openapi)
operationId: createGrayRelease
deprecated: false
description: '创建灰度发布'
tags:
- Release Management
parameters:
- name: appId
in: path
description: 'app标识'
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: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NamespaceReleaseDTO'
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: 创建灰度删除发布 (original openapi)
operationId: createGrayDelRelease
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
- name: branchName
in: path
description: ''
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NamespaceGrayDelReleaseDTO'
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: 回滚发布 (original openapi)
operationId: rollback
deprecated: false
description: 回滚到指定的发布版本
tags:
- Release Management
parameters:
- name: env
in: path
description: '环境标识'
required: true
schema:
type: string
- name: releaseId
in: path
description: '发布ID'
required: true
schema:
type: integer
format: int64
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: toReleaseId
in: query
description: '要回滚到的目标发布ID;不传时回滚到上一版本'
required: false
schema:
type: integer
format: int64
responses:
'200':
description: '发布回滚成功'
/openapi/v1/envs/{env}/releases/{releaseId}:
get:
summary: 获取发布详情 (new added)
operationId: getReleaseById
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: '发布ID'
required: true
schema:
type: integer
format: int64
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/active:
get:
summary: 获取活跃发布(分页) (new added)
operationId: findActiveReleases
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: '应用ID'
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: '页码,从0开始'
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/comparison:
get:
tags:
- Release Management
summary: Compare two releases
description: Get the configuration differences between two releases.
operationId: compareRelease
parameters:
- name: env
in: path
description: Environment
required: true
schema:
type: string
- name: baseReleaseId
in: query
description: The base release ID
required: true
schema:
type: integer
format: int64
- name: toCompareReleaseId
in: query
description: The release ID to compare against
required: true
schema:
type: integer
format: int64
responses:
'200':
description: Successful comparison
content:
application/json:
schema:
$ref: '#/components/schemas/OpenReleaseDiffDTO'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances:
get:
summary: 获取命名空间下的实例数量 (original openapi)
operationId: getInstanceCountByNamespace
deprecated: false
description: GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
tags:
- Instance Management
parameters:
- name: env
in: path
required: true
schema:
type: string
- name: appId
in: path
description: '应用ID'
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}/instances/by-release:
get:
summary: 根据发布版本查询实例(支持分页) (new added)
operationId: getByRelease
deprecated: false
description: GET /openapi/v1/envs/{env}/instances/by-release
tags:
- Instance Management
parameters:
- name: env
in: path
description: ''
required: true
schema:
type: string
- name: releaseId
in: query
description: ''
required: true
schema:
type: integer
format: int64
- 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/OpenInstancePageDTO'
example:
page: 0
size: 0
total: 0
instances:
- 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}/instances/by-namespace:
get:
summary: 根据namespaceName查询实例(new added)
operationId: getByNamespace
deprecated: false
tags:
- Instance Management
parameters:
- name: env
in: path
description: '环境标识'
required: true
schema:
type: string
- name: appId
in: query
description: '应用ID'
required: true
schema:
type: string
- name: clusterName
in: query
description: '集群名称'
required: true
schema:
type: string
- name: namespaceName
in: query
description: '命名空间名称'
required: true
schema:
type: string
- name: instanceAppId
in: query
required: false
description: 'Instance表中的AppID'
schema:
type: string
- name: page
in: query
description: '页数'
required: true
schema:
type: integer
default: 0
minimum: 0
- name: size
in: query
description: '页大小'
required: true
schema:
type: integer
default: 0
minimum: 0
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OpenInstancePageDTO'
example:
page: 0
size: 0
total: 0
instances:
- 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}/instances/by-namespace-and-releases-not-in: # avoidng confliction with other server endpoint
get:
summary: 查询不在指定发布版本中的实例 (new added)
operationId: getByReleasesAndNamespaceNotIn
deprecated: false
tags:
- Instance Management
parameters:
- name: env
in: path
description: '环境标识'
required: true
schema:
type: string
- name: appId
in: query
description: '应用ID'
required: true
schema:
type: string
- name: clusterName
in: query
description: '集群名称'
required: true
schema:
type: string
- name: namespaceName
in: query
description: '命名空间名称'
required: true
schema:
type: string
- name: releaseIds
in: query
description: '排除的发布ID列表,用逗号分隔'
required: true
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/namespaces:
post:
summary: 创建Namespace (new added)
operationId: createNamespaces
deprecated: false
description: POST /openapi/v1/apps/{appId}/namespaces
tags:
- Namespace Management
parameters:
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenCreateNamespaceDTO'
required: true
responses:
'200':
description: 'Namespace创建成功'
/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage:
get:
summary: 查询appnamespace使用情况(new added)
operationId: findAppNamespaceUsage
deprecated: false
description: GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage
tags:
- AppNamespace Management
parameters:
- name: appId
in: path
description: '应用ID'
required: true
schema:
type: string
- name: namespaceName
in: path
description: '命名空间名称'
required: true
schema:
type: string
responses:
'200':
description: 'AppNamespaceUsage查询成功'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenNamespaceUsageDTO'
headers: {}
/openapi/v1/apps/{appId}/appnamespaces:
post:
summary: 创建AppNamespace (original openapi)
operationId: createAppNamespace
deprecated: false
description: POST /openapi/v1/apps/{appId}/appnamespaces
tags:
- AppNamespace Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAppNamespaceDTO'
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:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: '权限不足'
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
get:
summary: 获取指定应用的AppNamespace (new added)
operationId: getAppNamespacesByAppId
deprecated: false
description: GET /openapi/v1/apps/{appId}/appnamespaces
tags:
- AppNamespace 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 (original openapi)
operationId: findNamespaces
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
default: true
- name: extendInfo
in: query
description: ''
required: false
schema:
type: boolean
default: false
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 (original openapi)
operationId: findNamespace
deprecated: false
description: GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}
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
- name: fillItemDetail
in: query
description: ''
required: true
example: 'true'
schema:
type: boolean
default: true
- name: extendInfo
in: query
description: ''
required: false
schema:
type: boolean
default: false
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}/associated-public-namespace:
get:
summary: 查询关联Namespace对应的公共Namespace详情 (new added)
operationId: findPublicNamespaceForAssociatedNamespace
deprecated: false
description: >-
GET
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace
tags:
- Namespace Management
parameters:
- name: env
in: path
description: '环境标识'
required: true
schema:
type: string
- name: appId
in: path
description: '应用ID'
required: true
schema:
type: string
- name: clusterName
in: path
description: '集群名称'
required: true
schema:
type: string
- name: namespaceName
in: path
description: '关联Namespace名称'
required: true
schema:
type: string
- name: extendInfo
in: query
description: ''
required: false
schema:
type: boolean
default: false
responses:
'200':
description: '成功获取关联的公共Namespace详情'
content:
application/json:
schema:
$ref: '#/components/schemas/OpenNamespaceDTO'
example:
dataChangeCreatedBy: 'apollo'
dataChangeLastModifiedBy: 'apollo'
dataChangeCreatedTime: '2024-01-15T10:30:00.000Z'
dataChangeLastModifiedTime: '2024-01-20T11:00:00.000Z'
appId: 'public-owner-app'
clusterName: 'default'
namespaceName: 'public.namespace'
comment: '公共 namespace 示例'
format: 'properties'
isPublic: true
parentAppId: 'public-owner-app'
isConfigHidden: false
itemModifiedCnt: 0
items:
- key: 'k1'
value: 'v1'
- key: 'k2'
value: 'v2'
headers: {}
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock:
get:
summary: 获取Namespace的锁状态 (original openapi)
operationId: getNamespaceLock
deprecated: false
description: GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock
tags:
- Namespace Lock 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 (new added)
operationId: getAppNamespaces
deprecated: false
description: GET /openapi/v1/appnamespaces/public
tags:
- AppNamespace Management
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 (new added)
operationId: findAppNamespace
deprecated: false
description: GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}
tags:
- AppNamespace Management
parameters:
- name: appId
in: path
description: '应用ID'
required: true
schema:
type: string
- name: namespaceName
in: path
description: '命名空间名称'
required: true
schema:
type: string
- name: extendInfo
in: query
description: ''
required: false
schema:
type: boolean
default: false
responses:
'200':
description: '成功获取AppNamespace'
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 (new added)
operationId: deleteAppNamespace
deprecated: false
description: DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}
tags:
- AppNamespace Management
parameters:
- name: appId
in: path
description: '应用ID'
required: true
schema:
type: string
- name: namespaceName
in: path
description: '命名空间名称'
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
responses:
'200':
description: 'AppNamespace删除成功'
headers: {}
/openapi/v1/apps/{appId}/namespaces/releases/status:
get:
summary: 获取应用下所有Namespace的发布状态 (new added)
operationId: getNamespacesReleaseStatus
deprecated: false
description: GET /openapi/v1/apps/{appId}/namespaces/releases/status
tags:
- Namespace Management
parameters:
- name: appId
in: path
description: '应用ID'
required: true
schema:
type: string
responses:
'200':
description: '成功获取发布状态映射'
content:
application/json:
schema:
$ref: '#/components/schemas/StringToStringBoolMap'
headers: {}
/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances:
get:
summary: 获取公共AppNamespace的所有实例 (new added)
operationId: getPublicAppNamespaceInstances
deprecated: false
description: GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances
tags:
- AppNamespace 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: '页码,从0开始'
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}/usage:
get:
summary: 查询namespace使用情况(new added)
operationId: findNamespaceUsage
deprecated: false
description: >-
GET
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage
tags:
- Namespace Management
parameters:
- name: appId
in: path
description: '应用ID'
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: 'NamespaceUsage查询成功'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenNamespaceUsageDTO'
headers: {}
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces:
get:
summary: 查找缺失的Namespace (new added)
operationId: findMissingNamespaces
deprecated: false
description: >-
GET
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces
tags:
- Namespace Management
parameters:
- name: appId
in: path
description: '应用ID'
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: {}
post:
summary: 创建缺失的Namespace (new added)
operationId: createMissingNamespaces
deprecated: false
description: >-
POST
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces
tags:
- Namespace Management
parameters:
- name: appId
in: path
description: '应用ID'
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: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
responses:
'200':
description: '缺失的命名空间创建成功'
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}:
delete:
summary: 删除指定的Namespace (new added)
operationId: deleteNamespace
deprecated: false
description: >-
DELETE
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}
tags:
- Namespace Management
parameters:
- name: appId
in: path
description: '应用ID'
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: false
schema:
type: string
responses:
'200':
description: '解除关联成功'
/openapi/v1/organizations:
get:
summary: 获取所有组织信息 (original openapi)
operationId: getOrganization
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:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches:
get:
summary: 获取命名空间分支信息 (original openapi)
operationId: findBranch
deprecated: false
description: GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches
tags:
- Namespace Branch Management
parameters:
- name: appId
in: path
description: '应用ID'
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: extendInfo
in: query
description: ''
required: false
schema:
type: boolean
default: false
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:
$ref: '#/components/schemas/ExceptionResponse'
post:
summary: 创建命名空间分支 (original openapi)
deprecated: false
operationId: createBranch
description: POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches
tags:
- Namespace Branch Management
parameters:
- name: appId
in: path
description: 'app标识'
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: false
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: 删除命名空间分支 (original openapi)
deprecated: false
operationId: deleteBranch
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: '应用ID'
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: false
schema:
type: string
responses:
'200':
description: '分支删除成功'
post:
summary: 合并分支到主分支 (new added)
operationId: mergeBranch
deprecated: false
description: >-
POST /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: '应用ID'
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: '合并后是否删除分支(true/false)'
required: true
example: 'true'
schema:
type: boolean
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NamespaceReleaseDTO'
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}/rules:
get:
summary: 获取分支灰度发布规则 (original openapi)
operationId: getBranchGrayRules
deprecated: false
description: GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules
tags:
- Namespace Branch Management
parameters:
- name: appId
in: path
description: 'app标识'
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: 更新分支灰度发布规则 (original openapi)
operationId: updateBranchRules
deprecated: false
description: PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules
tags:
- Namespace Branch Management
parameters:
- name: appId
in: path
description: '应用ID'
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: query
description: 操作人用户名
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenGrayReleaseRuleDTO'
required: true
responses:
'200':
description: '灰度规则更新成功'
/openapi/v1/envs:
get:
summary: 获取所有环境
operationId: getEnvs
deprecated: false
description: GET /openapi/v1/envs
tags:
- Environment Management
responses:
'200':
description: 成功获取环境列表
content:
application/json:
schema:
type: array
items:
type: string
example:
- 'DEV'
- 'FAT'
- 'UAT'
- 'PRO'
headers: {}
/openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init:
post:
summary: 初始化应用权限 (new added)
operationId: initAppPermission
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: namespaceName
in: path
description: ''
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
responses:
'200':
description: '初始化成功'
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init:
post:
summary: 初始化集群Namespace权限 (new added)
operationId: initClusterNamespacePermission
deprecated: false
description: ''
tags:
- Permission 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: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
responses:
'200':
description: ''
/openapi/v1/apps/{appId}/permissions/{permissionType}:
get:
summary: 校验应用权限 (new added)
operationId: hasAppPermission
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: permissionType
in: path
description: ''
required: true
schema:
type: string
- name: userId
in: query
description: ''
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OpenPermissionConditionDTO'
example:
hasPermission: false
/openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType}:
get:
summary: 校验Namespace权限 (new added)
operationId: hasNamespacePermission
deprecated: false
description: ''
tags:
- Permission Management
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: userId
in: query
description: ''
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OpenPermissionConditionDTO'
example:
hasPermission: false
/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType}:
get:
summary: 校验环境Namespace权限 (new added)
operationId: hasEnvNamespacePermission
deprecated: false
description: ''
tags:
- Permission Management
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: userId
in: query
description: ''
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OpenPermissionConditionDTO'
example:
hasPermission: false
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType}:
get:
summary: 校验集群Namespace权限 (new added)
operationId: hasClusterNamespacePermission
deprecated: false
description: ''
tags:
- Permission 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: permissionType
in: path
description: ''
required: true
schema:
type: string
- name: userId
in: query
description: ''
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OpenPermissionConditionDTO'
example:
hasPermission: false
/openapi/v1/permissions/root:
get:
summary: 校验Root权限 (new added)
operationId: hasRootPermission
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: userId
in: query
description: ''
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OpenPermissionConditionDTO'
example:
hasPermission: false
/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users:
get:
summary: 获取环境Namespace用户 (new added)
operationId: getNamespaceEnvRoleUsers
deprecated: false
description: ''
tags:
- Permission Management
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
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OpenEnvNamespaceRoleUserDTO'
description:
example:
appId: ''
namespaceName: ''
modifyRoleUsers:
- userId: ''
name: ''
email: ''
enabled: 0
releaseRoleUsers:
- userId: ''
name: ''
email: ''
enabled: 0
env: ''
/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType}:
post:
summary: 分配环境Namespace角色 (new added)
operationId: assignNamespaceEnvRoleToUser
deprecated: false
description: ''
tags:
- Permission Management
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: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: 'the user which role assigned to'
required: true
schema:
type: string
responses:
'200':
description: ''
delete:
summary: 移除环境Namespace角色 (new added)
operationId: removeNamespaceEnvRoleFromUser
deprecated: false
description: ''
tags:
- Permission Management
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: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: 'the user which role removed from'
required: true
schema:
type: string
responses:
'200':
description: ''
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users:
get:
summary: 获取集群Namespace用户 (new added)
operationId: getClusterNamespaceRoles
deprecated: false
description: ''
tags:
- Permission 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:
$ref: '#/components/schemas/OpenClusterNamespaceRoleUserDTO'
description:
example:
appId: ''
env: ''
cluster: ''
modifyRoleUsers:
- userId: ''
name: ''
email: ''
enabled: 0
releaseRoleUsers:
- userId: ''
name: ''
email: ''
enabled: 0
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType}:
post:
summary: 分配集群Namespace角色 (new added)
operationId: assignClusterNamespaceRoleToUser
deprecated: false
description: ''
tags:
- Permission 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: roleType
in: path
description: ''
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: 'the user which role assigned to'
required: true
schema:
type: string
responses:
'200':
description: ''
delete:
summary: 移除集群Namespace角色 (new added)
operationId: removeClusterNamespaceRoleFromUser
deprecated: false
description: ''
tags:
- Permission 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: roleType
in: path
description: ''
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: 'the user which role removed from'
required: true
schema:
type: string
responses:
'200':
description: ''
/openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users:
get:
summary: 获取Namespace用户 (new added)
operationId: getNamespaceRoles
deprecated: false
description: ''
tags:
- Permission 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/OpenNamespaceRoleUserDTO'
description:
example:
appId: ''
namespaceName: ''
modifyRoleUsers:
- userId: ''
name: ''
email: ''
enabled: 0
releaseRoleUsers:
- userId: ''
name: ''
email: ''
enabled: 0
/openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType}:
post:
summary: 分配Namespace角色 (new added)
operationId: assignNamespaceRoleToUser
deprecated: false
description: ''
tags:
- Permission Management
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: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: 'the user which role assigned to'
required: true
schema:
type: string
responses:
'200':
description: ''
delete:
summary: 移除Namespace角色 (new added)
operationId: removeNamespaceRoleFromUser
deprecated: false
description: ''
tags:
- Permission Management
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: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: 'the user which role removed from'
required: true
schema:
type: string
responses:
'200':
description: ''
/openapi/v1/apps/{appId}/role-users:
get:
summary: 获取应用角色用户 (new added)
operationId: getAppRoles
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAppRoleUserDTO'
description:
example:
appId: ''
masterUsers:
- userId: ''
name: ''
email: ''
enabled: 0
/openapi/v1/apps/{appId}/roles/{roleType}:
post:
summary: 分配应用角色 (new added)
operationId: assignAppRoleToUser
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: roleType
in: path
description: ''
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: 'the user which role removed from'
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: string
description: ''
responses:
'200':
description: ''
delete:
summary: 移除应用角色 (new added)
operationId: removeAppRoleFromUser
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: roleType
in: path
description: ''
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: 'the user which role removed from'
required: true
schema:
type: string
responses:
'200':
description: ''
/openapi/v1/system/roles/create-application:
post:
summary: 分配建应用角色 (new added)
operationId: addCreateApplicationRoleToUsers
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
title: userIds
type: array
items:
type: string
description: ''
responses:
'200':
description: ''
delete:
summary: 移除建应用角色 (new added)
operationId: deleteCreateApplicationRoleFromUser
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: ''
required: true
schema:
type: string
responses:
'200':
description: ''
get:
summary: 校验建应用权限 (new added)
operationId: hasCreateApplicationPermission
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: userId
in: query
description: ''
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
additionalProperties:
type: boolean
example:
members:
'': {}
/openapi/v1/system/roles/create-application/role-users:
get:
summary: 获取建应用用户 (new added)
operationId: getCreateApplicationRoleUsers
deprecated: false
description: ''
tags:
- Permission Management
parameters: []
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
type: string
example:
- ''
/openapi/v1/apps/{appId}/roles/master:
post:
summary: 分配AppMaster (new added)
operationId: addManageAppMasterRoleToUser
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: 'the user which role assign to'
required: true
schema:
type: string
responses:
'200':
description: ''
delete:
summary: 移除AppMaster (new added)
operationId: removeManageAppMasterRoleFromUser
deprecated: false
description: ''
tags:
- Permission Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
- name: userId
in: query
description: 'the user which role removed from'
required: true
schema:
type: string
responses:
'200':
description: ''
/openapi/v1/system/role/manage-app-master:
get:
summary: 校验AppMaster开关 (new added)
operationId: isManageAppMasterPermissionEnabled
deprecated: false
description: ''
tags:
- Permission Management
parameters: []
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
additionalProperties:
type: boolean
example:
members:
'': {}
/openapi/v1/apps/{appId}/envs/{env}/accesskeys:
post:
summary: 创建AccessKey
operationId: createAccessKey
deprecated: false
description: ''
tags:
- AccessKey Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: env
in: path
description: ''
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAccessKeyDTO'
description: com.ctrip.framework.apollo.common.dto.AccessKeyDTO
example:
dataChangeCreatedBy: ''
dataChangeLastModifiedBy: ''
dataChangeCreatedByDisplayName: ''
dataChangeLastModifiedByDisplayName: ''
dataChangeCreatedTime: ''
dataChangeLastModifiedTime: ''
id: 0
secret: ''
appId: ''
mode: 0
enabled: false
headers: {}
get:
summary: 查找AccessKey
operationId: findAccessKeys
deprecated: false
description: ''
tags:
- AccessKey Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: env
in: path
description: ''
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenAccessKeyDTO'
description: com.ctrip.framework.apollo.common.dto.AccessKeyDTO
example:
- dataChangeCreatedBy: ''
dataChangeLastModifiedBy: ''
dataChangeCreatedByDisplayName: ''
dataChangeLastModifiedByDisplayName: ''
dataChangeCreatedTime: ''
dataChangeLastModifiedTime: ''
id: 0
secret: ''
appId: ''
mode: 0
enabled: false
headers: {}
/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}:
delete:
summary: 删除AccessKey
operationId: deleteAccessKey
deprecated: false
description: ''
tags:
- AccessKey Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: env
in: path
description: ''
required: true
schema:
type: string
- name: accessKeyId
in: path
description: ''
required: true
schema:
type: integer
format: int64
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
responses:
'200':
description: ''
/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation:
put:
summary: 启用AccessKey
operationId: enableAccessKey
deprecated: false
description: ''
tags:
- AccessKey Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: env
in: path
description: ''
required: true
schema:
type: string
- name: accessKeyId
in: path
description: ''
required: true
schema:
type: integer
format: int64
- name: mode
in: query
description: ''
required: false
example: 0
schema:
type: integer
default: 0
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
responses:
'200':
description: ''
/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation:
put:
summary: 禁用AccessKey
operationId: disableAccessKey
deprecated: false
description: ''
tags:
- AccessKey Management
parameters:
- name: appId
in: path
description: ''
required: true
schema:
type: string
- name: env
in: path
description: ''
required: true
schema:
type: string
- name: accessKeyId
in: path
description: ''
required: true
schema:
type: integer
format: int64
- name: operator
in: query
description: '操作人用户名'
required: false
schema:
type: string
responses:
'200':
description: ''
/openapi/v1/user:
get:
summary: 获取当前Portal用户(new added)
operationId: getCurrentUser
deprecated: false
description: GET /openapi/v1/user
tags:
- User Management
responses:
'200':
description: 成功获取当前用户
content:
application/json:
schema:
$ref: '#/components/schemas/OpenUserInfoDTO'
'401':
description: 未登录或未授权访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 仅支持Portal用户登录态访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens:
get:
summary: 查询当前Portal用户访问Token(new added)
operationId: listUserTokens
deprecated: false
description: GET /openapi/v1/user-tokens,仅支持Portal用户登录态访问
tags:
- Portal Management
security:
- PortalSessionAuth: []
responses:
'200':
description: 成功获取当前用户访问Token列表
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenUserTokenSummary'
'401':
description: 未登录或登录态已过期
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 仅支持Portal用户登录态访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
post:
summary: 创建当前Portal用户访问Token(new added)
operationId: createUserToken
deprecated: false
description: POST /openapi/v1/user-tokens,仅支持Portal用户登录态访问
tags:
- Portal Management
security:
- PortalSessionAuth: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenCreateUserTokenRequest'
required: true
responses:
'200':
description: 用户访问Token创建成功
content:
application/json:
schema:
$ref: '#/components/schemas/OpenCreateUserTokenResponse'
'400':
description: 请求参数错误
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'401':
description: 未登录或登录态已过期
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 仅支持Portal用户登录态访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens/{tokenId}:
delete:
summary: 删除当前Portal用户访问Token(new added)
operationId: deleteUserToken
deprecated: false
description: DELETE /openapi/v1/user-tokens/{tokenId},仅支持Portal用户登录态访问
tags:
- Portal Management
security:
- PortalSessionAuth: []
parameters:
- name: tokenId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: 用户访问Token删除成功
'401':
description: 未登录或登录态已过期
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 仅支持Portal用户登录态访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'404':
description: 用户访问Token不存在或不属于当前Portal用户
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens/{tokenId}/revoke:
post:
summary: 撤销当前Portal用户访问Token(new added)
operationId: revokeUserToken
deprecated: false
description: POST /openapi/v1/user-tokens/{tokenId}/revoke,仅支持Portal用户登录态访问
tags:
- Portal Management
security:
- PortalSessionAuth: []
parameters:
- name: tokenId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: 用户访问Token撤销成功
'401':
description: 未登录或登录态已过期
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 仅支持Portal用户登录态访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'404':
description: 用户访问Token不存在或不属于当前Portal用户
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens/{tokenId}/rotate:
post:
summary: 轮换当前Portal用户访问Token(new added)
operationId: rotateUserToken
deprecated: false
description: POST /openapi/v1/user-tokens/{tokenId}/rotate,仅支持Portal用户登录态访问
tags:
- Portal Management
security:
- PortalSessionAuth: []
parameters:
- name: tokenId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: 用户访问Token轮换成功
content:
application/json:
schema:
$ref: '#/components/schemas/OpenRotateUserTokenResponse'
'400':
description: 用户访问Token不可轮换
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'401':
description: 未登录或登录态已过期
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 仅支持Portal用户登录态访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'404':
description: 用户访问Token不存在或不属于当前Portal用户
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens/capabilities:
get:
summary: 获取Portal用户可创建Token能力(new added)
operationId: getUserTokenCapabilities
deprecated: false
description: GET /openapi/v1/user-tokens/capabilities,仅支持Portal用户登录态访问
tags:
- Portal Management
security:
- PortalSessionAuth: []
responses:
'200':
description: 成功获取Portal用户可创建Token能力
content:
application/json:
schema:
$ref: '#/components/schemas/OpenUserTokenCapability'
'401':
description: 未登录或登录态已过期
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 仅支持Portal用户登录态访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens/admin:
get:
summary: 管理员查询用户访问Token(new added)
operationId: adminListUserTokens
deprecated: false
description: GET /openapi/v1/user-tokens/admin,仅支持具备超级管理员权限的Portal用户登录态访问
tags:
- Portal Management
security:
- PortalSessionAuth: []
parameters:
- name: userId
in: query
required: false
schema:
type: string
- name: status
in: query
required: false
schema:
type: string
enum:
- all
- active
- expired
- revoked
default: all
responses:
'200':
description: 成功获取用户访问Token列表
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenUserTokenSummary'
'400':
description: 请求参数错误
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'401':
description: 未登录或登录态已过期
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 权限不足
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens/admin/{tokenId}:
delete:
summary: 管理员删除用户访问Token(new added)
operationId: adminDeleteUserToken
deprecated: false
description: DELETE /openapi/v1/user-tokens/admin/{tokenId},仅支持具备超级管理员权限的Portal用户登录态访问
tags:
- Portal Management
security:
- PortalSessionAuth: []
parameters:
- name: tokenId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: 用户访问Token删除成功
'401':
description: 未登录或登录态已过期
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 权限不足
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'404':
description: 用户访问Token不存在
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens/admin/{tokenId}/revoke:
post:
summary: 管理员撤销用户访问Token(new added)
operationId: adminRevokeUserToken
deprecated: false
description: POST /openapi/v1/user-tokens/admin/{tokenId}/revoke,仅支持具备超级管理员权限的Portal用户登录态访问
tags:
- Portal Management
security:
- PortalSessionAuth: []
parameters:
- name: tokenId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: 用户访问Token撤销成功
'401':
description: 未登录或登录态已过期
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 权限不足
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'404':
description: 用户访问Token不存在
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens/current:
get:
summary: 获取当前用户访问Token身份和权限范围(new added)
operationId: getCurrentUserToken
deprecated: false
description: GET /openapi/v1/user-tokens/current,仅支持用户访问Token调用,返回当前Token身份、权限范围和可调用OpenAPI能力
tags:
- User Token Management
responses:
'200':
description: 成功获取当前用户访问Token信息
content:
application/json:
schema:
$ref: '#/components/schemas/OpenUserTokenCurrentCapability'
'403':
description: 仅支持用户访问Token访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens/current/capabilities:
get:
summary: 获取当前用户访问Token能力(new added)
operationId: getCurrentUserTokenCapabilities
deprecated: false
description: GET /openapi/v1/user-tokens/current/capabilities,仅支持用户访问Token调用,返回当前Token身份、权限范围和可调用OpenAPI能力
tags:
- User Token Management
responses:
'200':
description: 成功获取当前用户访问Token能力
content:
application/json:
schema:
$ref: '#/components/schemas/OpenUserTokenCurrentCapability'
'403':
description: 仅支持用户访问Token访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/user-tokens/whoami:
get:
summary: 获取当前用户访问Token身份别名(new added)
operationId: getCurrentUserTokenWhoami
deprecated: false
description: GET /openapi/v1/user-tokens/whoami,/current 的别名,仅支持用户访问Token调用
tags:
- User Token Management
responses:
'200':
description: 成功获取当前用户访问Token信息
content:
application/json:
schema:
$ref: '#/components/schemas/OpenUserTokenCurrentCapability'
'403':
description: 仅支持用户访问Token访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/users:
get:
summary: 搜索用户(new added)
operationId: searchUsers
deprecated: false
description: GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问
tags:
- User Management
parameters:
- name: keyword
in: query
description: 用户名、显示名或邮箱关键字
required: true
schema:
type: string
- name: includeInactiveUsers
in: query
description: 是否包含禁用用户
required: false
schema:
type: boolean
default: false
- name: offset
in: query
description: 偏移量
required: false
schema:
type: integer
default: 0
minimum: 0
- name: limit
in: query
description: 返回数量
required: false
schema:
type: integer
default: 10
minimum: 1
responses:
'200':
description: 成功获取用户列表
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenUserInfoDTO'
'401':
description: 未登录或未授权访问
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 权限不足
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
post:
summary: 创建或更新用户(new added)
operationId: createOrUpdateUser
deprecated: false
description: POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator
tags:
- User Management
parameters:
- name: isCreate
in: query
description: true 表示创建用户,false 表示更新用户
required: false
schema:
type: boolean
default: false
- name: operator
in: query
description: 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenUserDTO'
required: true
responses:
'200':
description: 用户创建或更新成功
'400':
description: 请求参数错误
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 权限不足
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/users/{userId}:
get:
summary: 获取指定用户(new added)
operationId: getUserByUserId
deprecated: false
description: GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问
tags:
- User Management
parameters:
- name: userId
in: path
description: 用户ID
required: true
schema:
type: string
responses:
'200':
description: 成功获取用户
content:
application/json:
schema:
$ref: '#/components/schemas/OpenUserInfoDTO'
'400':
description: 请求参数错误或用户不存在
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'401':
description: 未登录或未认证
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 权限不足
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/users/enabled:
put:
summary: 修改用户启用状态(new added)
operationId: changeUserEnabled
deprecated: false
description: PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator
tags:
- User Management
parameters:
- name: operator
in: query
description: 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenUserDTO'
required: true
responses:
'200':
description: 用户状态修改成功
'400':
description: 请求参数错误
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
'403':
description: 权限不足
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionResponse'
/openapi/v1/apollo/audit/properties:
get:
summary: 获取审计配置(new added)
operationId: getAuditProperties
deprecated: false
description: GET /openapi/v1/apollo/audit/properties
tags:
- Portal Management
responses:
'200':
description: 成功获取审计配置
content:
application/json:
schema:
type: object
/openapi/v1/apollo/audit/logs:
get:
summary: 查询审计日志(new added)
operationId: findAuditLogs
deprecated: false
description: GET /openapi/v1/apollo/audit/logs
tags:
- Portal Management
parameters:
- name: page
in: query
required: false
schema:
type: integer
default: 0
- name: size
in: query
required: false
schema:
type: integer
default: 10
responses:
'200':
description: 成功获取审计日志
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/apollo/audit/logs/opName:
get:
summary: 按操作名查询审计日志(new added)
operationId: findAuditLogsByOpName
deprecated: false
description: GET /openapi/v1/apollo/audit/logs/opName
tags:
- Portal Management
parameters:
- name: opName
in: query
required: true
schema:
type: string
- name: page
in: query
required: false
schema:
type: integer
default: 0
- name: size
in: query
required: false
schema:
type: integer
default: 10
- name: startDate
in: query
required: false
schema:
type: string
- name: endDate
in: query
required: false
schema:
type: string
responses:
'200':
description: 成功获取审计日志
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/apollo/audit/trace:
get:
summary: 查询审计链路详情(new added)
operationId: findAuditTraceDetails
deprecated: false
description: GET /openapi/v1/apollo/audit/trace
tags:
- Portal Management
parameters:
- name: traceId
in: query
required: true
schema:
type: string
responses:
'200':
description: 成功获取审计链路详情
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/apollo/audit/logs/dataInfluences/field:
get:
summary: 查询审计数据影响(new added)
operationId: findAuditDataInfluencesByField
deprecated: false
description: GET /openapi/v1/apollo/audit/logs/dataInfluences/field
tags:
- Portal Management
parameters:
- name: entityName
in: query
required: true
schema:
type: string
- name: entityId
in: query
required: true
schema:
type: string
- name: fieldName
in: query
required: true
schema:
type: string
- name: page
in: query
required: false
schema:
type: integer
default: 0
- name: size
in: query
required: false
schema:
type: integer
default: 10
responses:
'200':
description: 成功获取审计数据影响
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/apollo/audit/logs/by-name-or-type-or-operator:
get:
summary: 搜索审计日志(new added)
operationId: searchAuditLogs
deprecated: false
description: GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator
tags:
- Portal Management
parameters:
- name: query
in: query
required: true
schema:
type: string
- name: page
in: query
required: false
schema:
type: integer
default: 0
- name: size
in: query
required: false
schema:
type: integer
default: 10
responses:
'200':
description: 成功搜索审计日志
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits:
get:
summary: 查询命名空间提交记录(new added)
operationId: findCommits
deprecated: false
description: GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits
tags:
- Portal Management
parameters:
- name: appId
in: path
required: true
schema:
type: string
- name: env
in: path
required: true
schema:
type: string
- name: clusterName
in: path
required: true
schema:
type: string
- name: namespaceName
in: path
required: true
schema:
type: string
- name: key
in: query
required: false
schema:
type: string
- name: page
in: query
required: false
schema:
type: integer
default: 0
- name: size
in: query
required: false
schema:
type: integer
default: 10
responses:
'200':
description: 成功获取提交记录
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/page-settings:
get:
summary: 获取Portal页面配置(new added)
operationId: getPageSettings
deprecated: false
description: GET /openapi/v1/page-settings
tags:
- Portal Management
responses:
'200':
description: 成功获取页面配置
content:
application/json:
schema:
type: object
/openapi/v1/consumers:
post:
summary: 创建开放平台消费者(new added)
operationId: createConsumer
deprecated: false
description: POST /openapi/v1/consumers
tags:
- Portal Management
parameters:
- name: expires
in: query
required: false
schema:
type: string
description: yyyyMMddHHmmss
requestBody:
content:
application/json:
schema:
type: object
required: true
responses:
'200':
description: 成功创建消费者
content:
application/json:
schema:
type: object
get:
summary: 查询开放平台消费者列表(new added)
operationId: getConsumerList
deprecated: false
description: GET /openapi/v1/consumers
tags:
- Portal Management
parameters:
- name: page
in: query
required: false
schema:
type: integer
default: 0
- name: size
in: query
required: false
schema:
type: integer
default: 10
responses:
'200':
description: 成功获取消费者列表
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/consumer-tokens/by-appId:
get:
summary: 按应用ID查询消费者Token(new added)
operationId: getConsumerTokenByAppId
deprecated: false
description: GET /openapi/v1/consumer-tokens/by-appId
tags:
- Portal Management
parameters:
- name: appId
in: query
required: true
schema:
type: string
responses:
'200':
description: 成功获取消费者Token
content:
application/json:
schema:
type: object
/openapi/v1/consumers/{token}/assign-role:
post:
summary: 给消费者授权(new added)
operationId: assignRoleToConsumer
deprecated: false
description: POST /openapi/v1/consumers/{token}/assign-role
tags:
- Portal Management
parameters:
- name: token
in: path
required: true
schema:
type: string
- name: type
in: query
required: true
schema:
type: string
- name: envs
in: query
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
required: true
responses:
'200':
description: 成功授权
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/consumers/by-appId:
delete:
summary: 按应用ID删除消费者(new added)
operationId: deleteConsumer
deprecated: false
description: DELETE /openapi/v1/consumers/by-appId
tags:
- Portal Management
parameters:
- name: appId
in: query
required: true
schema:
type: string
responses:
'200':
description: 成功删除消费者
/openapi/v1/import:
post:
summary: 导入配置兼容入口(new added)
operationId: importConfig
deprecated: false
description: POST /openapi/v1/import
tags:
- Portal Management
parameters:
- name: envs
in: query
required: true
schema:
type: string
- name: conflictAction
in: query
required: false
schema:
type: string
default: ignore
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
required: true
responses:
'200':
description: 导入成功
/openapi/v1/favorites:
get:
summary: 查询收藏(new added)
operationId: findFavorites
deprecated: false
description: GET /openapi/v1/favorites
tags:
- Portal Management
parameters:
- name: userId
in: query
required: false
schema:
type: string
- name: appId
in: query
required: false
schema:
type: string
- name: page
in: query
required: false
schema:
type: integer
default: 0
- name: size
in: query
required: false
schema:
type: integer
default: 10
responses:
'200':
description: 成功获取收藏
content:
application/json:
schema:
type: array
items:
type: object
post:
summary: 添加收藏(new added)
operationId: addFavorite
deprecated: false
description: POST /openapi/v1/favorites
tags:
- Portal Management
requestBody:
content:
application/json:
schema:
type: object
required: true
responses:
'200':
description: 成功添加收藏
content:
application/json:
schema:
type: object
/openapi/v1/favorites/{favoriteId}:
delete:
summary: 删除收藏(new added)
operationId: deleteFavorite
deprecated: false
description: DELETE /openapi/v1/favorites/{favoriteId}
tags:
- Portal Management
parameters:
- name: favoriteId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: 成功删除收藏
put:
summary: 收藏置顶(new added)
operationId: topFavorite
deprecated: false
description: PUT /openapi/v1/favorites/{favoriteId}
tags:
- Portal Management
parameters:
- name: favoriteId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: 成功置顶收藏
/openapi/v1/global-search/item-info/by-key-or-value:
get:
summary: 按Key或Value全局搜索配置(new added)
operationId: searchItemInfoByKeyOrValue
deprecated: false
description: GET /openapi/v1/global-search/item-info/by-key-or-value
tags:
- Portal Management
parameters:
- name: key
in: query
required: false
schema:
type: string
default: ''
- name: value
in: query
required: false
schema:
type: string
default: ''
responses:
'200':
description: 成功搜索配置
content:
application/json:
schema:
type: object
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories:
get:
summary: 查询命名空间发布历史(new added)
operationId: findReleaseHistoriesByNamespace
deprecated: false
description: GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories
tags:
- Portal Management
parameters:
- name: appId
in: path
required: true
schema:
type: string
- name: env
in: path
required: true
schema:
type: string
- name: clusterName
in: path
required: true
schema:
type: string
- name: namespaceName
in: path
required: true
schema:
type: string
- name: page
in: query
required: false
schema:
type: integer
default: 0
- name: size
in: query
required: false
schema:
type: integer
default: 10
responses:
'200':
description: 成功获取发布历史
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/server/portal-db/config:
post:
summary: 创建或更新Portal DB配置(new added)
operationId: createOrUpdatePortalDBConfig
deprecated: false
description: POST /openapi/v1/server/portal-db/config
tags:
- Portal Management
requestBody:
content:
application/json:
schema:
type: object
required: true
responses:
'200':
description: 成功创建或更新配置
content:
application/json:
schema:
type: object
delete:
summary: 删除Portal DB配置(new added)
operationId: deletePortalDBConfig
deprecated: false
description: DELETE /openapi/v1/server/portal-db/config
tags:
- Portal Management
parameters:
- name: key
in: query
required: true
schema:
type: string
responses:
'200':
description: 成功删除配置
/openapi/v1/server/envs/{env}/config-db/config:
post:
summary: 创建或更新Config DB配置(new added)
operationId: createOrUpdateConfigDBConfig
deprecated: false
description: POST /openapi/v1/server/envs/{env}/config-db/config
tags:
- Portal Management
parameters:
- name: env
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
required: true
responses:
'200':
description: 成功创建或更新配置
content:
application/json:
schema:
type: object
delete:
summary: 删除Config DB配置(new added)
operationId: deleteConfigDBConfig
deprecated: false
description: DELETE /openapi/v1/server/envs/{env}/config-db/config
tags:
- Portal Management
parameters:
- name: env
in: path
required: true
schema:
type: string
- name: key
in: query
required: true
schema:
type: string
- name: cluster
in: query
required: true
schema:
type: string
responses:
'200':
description: 成功删除配置
/openapi/v1/server/portal-db/config/find-all-config:
get:
summary: 查询全部Portal DB配置(new added)
operationId: findAllPortalDBConfig
deprecated: false
description: GET /openapi/v1/server/portal-db/config/find-all-config
tags:
- Portal Management
responses:
'200':
description: 成功获取配置列表
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/server/envs/{env}/config-db/config/find-all-config:
get:
summary: 查询指定环境全部Config DB配置(new added)
operationId: findAllConfigDBConfig
deprecated: false
description: GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config
tags:
- Portal Management
parameters:
- name: env
in: path
required: true
schema:
type: string
responses:
'200':
description: 成功获取配置列表
content:
application/json:
schema:
type: array
items:
type: object
/openapi/v1/system-info:
get:
summary: 获取系统信息(new added)
operationId: getSystemInfo
deprecated: false
description: GET /openapi/v1/system-info
tags:
- Portal Management
responses:
'200':
description: 成功获取系统信息
content:
application/json:
schema:
type: object
/openapi/v1/system-info/health:
get:
summary: 检查系统实例健康状态(new added)
operationId: checkSystemHealth
deprecated: false
description: GET /openapi/v1/system-info/health
tags:
- Portal Management
parameters:
- name: instanceId
in: query
required: true
schema:
type: string
responses:
'200':
description: 成功获取健康状态
content:
application/json:
schema:
type: object
/openapi/v1/configs/export:
get:
summary: 导出所有配置(new added)
operationId: exportAllConfigs
deprecated: false
description: GET /openapi/v1/configs/export
tags:
- Portal Management
parameters:
- name: envs
in: query
required: true
schema:
type: string
responses:
'200':
description: 成功导出配置
content:
application/octet-stream:
schema:
type: string
format: binary
/openapi/v1/configs/import:
post:
summary: 导入所有配置(new added)
operationId: importAllConfigs
deprecated: false
description: POST /openapi/v1/configs/import
tags:
- Portal Management
parameters:
- name: envs
in: query
required: true
schema:
type: string
- name: conflictAction
in: query
required: false
schema:
type: string
default: ignore
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
required: true
responses:
'200':
description: 导入成功
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export:
head:
summary: 检查应用配置导出权限(new added)
operationId: checkExportAppConfig
deprecated: false
description: HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export
tags:
- Portal Management
parameters:
- name: appId
in: path
required: true
schema:
type: string
- name: env
in: path
required: true
schema:
type: string
- name: clusterName
in: path
required: true
schema:
type: string
responses:
'200':
description: 可导出
get:
summary: 导出应用配置(new added)
operationId: exportAppConfig
deprecated: false
description: GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export
tags:
- Portal Management
parameters:
- name: appId
in: path
required: true
schema:
type: string
- name: env
in: path
required: true
schema:
type: string
- name: clusterName
in: path
required: true
schema:
type: string
responses:
'200':
description: 成功导出应用配置
content:
application/octet-stream:
schema:
type: string
format: binary
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import:
post:
summary: 导入应用配置(new added)
operationId: importAppConfig
deprecated: false
description: POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import
tags:
- Portal Management
parameters:
- name: appId
in: path
required: true
schema:
type: string
- name: env
in: path
required: true
schema:
type: string
- name: clusterName
in: path
required: true
schema:
type: string
- name: conflictAction
in: query
required: false
schema:
type: string
default: ignore
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
required: true
responses:
'200':
description: 导入成功
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export:
get:
summary: 导出命名空间配置项(new added)
operationId: exportNamespaceItems
deprecated: false
description: GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export
tags:
- Portal Management
parameters:
- name: appId
in: path
required: true
schema:
type: string
- name: env
in: path
required: true
schema:
type: string
- name: clusterName
in: path
required: true
schema:
type: string
- name: namespaceName
in: path
required: true
schema:
type: string
responses:
'200':
description: 成功导出命名空间配置项
content:
application/octet-stream:
schema:
type: string
format: binary
/openapi/v1/apps/search/by-appid-or-name:
get:
summary: 按应用ID或名称搜索应用(new added)
operationId: searchAppsByAppIdOrName
deprecated: false
description: GET /openapi/v1/apps/search/by-appid-or-name
tags:
- Portal Management
parameters:
- name: query
in: query
required: false
schema:
type: string
- name: page
in: query
required: false
schema:
type: integer
default: 0
- name: size
in: query
required: false
schema:
type: integer
default: 20
responses:
'200':
description: 成功搜索应用
content:
application/json:
schema:
type: object
/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import:
post:
summary: 导入命名空间配置项(new added)
operationId: importNamespaceItems
deprecated: false
description: POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import
tags:
- Portal Management
parameters:
- name: appId
in: path
required: true
schema:
type: string
- name: env
in: path
required: true
schema:
type: string
- name: clusterName
in: path
required: true
schema:
type: string
- name: namespaceName
in: path
required: true
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
required: true
responses:
'200':
description: 导入成功
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
PortalSessionAuth:
type: apiKey
in: cookie
name: SESSION
description: |
Apollo Portal登录会话Cookie
仅用于需要Portal用户登录态的Portal Management接口,不使用OpenAPI Consumer Token。
schemas:
OpenAppDTO:
type: object
properties:
dataChangeCreatedBy:
type: string
description: 数据创建者用户名,记录是谁创建了这个应用
dataChangeCreatedByDisplayName:
type: string
description: 数据创建者显示名称,用于展示创建者的友好名称
dataChangeLastModifiedBy:
type: string
description: 数据最后修改者用户名,记录最后一次修改应用信息的用户
dataChangeLastModifiedByDisplayName:
type: string
description: 数据最后修改者显示名称,用于展示最后修改者的友好名称
dataChangeCreatedTime:
type: string
description: 数据创建时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
dataChangeLastModifiedTime:
type: string
description: 数据最后修改时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
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: 应用负责人邮箱地址,用于接收应用相关通知
ownerDisplayName:
type: string
description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据
OpenCreateAppDTO:
type: object
properties:
assignAppRoleToSelf:
type: boolean
description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限
admins:
type: array
items:
type: string
uniqueItems: true
description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限
app:
$ref: '#/components/schemas/OpenAppDTO'
description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息
OpenItemDTO:
type: object
description: Apollo配置项核心数据对象,仅包含键值及基础审计信息
properties:
key:
type: string
description: 配置项的键名,在同一命名空间内唯一标识一个配置项
value:
type: string
description: 配置项的值,可以是字符串、数字、JSON等格式
type:
type: integer
description: 配置项类型
comment:
type: string
description: 配置项的注释说明,用于描述配置项的用途和含义
lineNum:
type: integer
format: int32
description: 配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序
extendInfo:
$ref: '#/components/schemas/OpenItemExtendDTO'
dataChangeCreatedBy:
type: string
description: 配置项创建者用户名,记录是谁创建了这个配置项
dataChangeCreatedByDisplayName:
type: string
description: 配置项创建者显示名称,用于展示创建者的友好名称
dataChangeLastModifiedBy:
type: string
description: 配置项最后修改者用户名,记录最后一次修改配置的用户
dataChangeLastModifiedByDisplayName:
type: string
description: 配置项最后修改者显示名称,用于展示最后修改者的友好名称
dataChangeCreatedTime:
type: string
description: 配置项创建时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
dataChangeLastModifiedTime:
type: string
description: 配置项最后修改时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
OpenItemExtendDTO:
type: object
description: Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息
properties:
namespaceId:
type: integer
format: int64
description: 所属命名空间的ID
isModified:
type: boolean
description: 是否有未发布的修改
isDeleted:
type: boolean
description: 是否被标记为删除(未发布)
isNewlyAdded:
type: boolean
description: 是否为新添加的配置项(未发布)
newValue:
type: string
description: 新的值
oldValue:
type: string
description: 上一次发布的值,用于对比变更
OpenItemPageDTO:
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: 当前页的配置项列表,包含具体的配置项数据
description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果
OpenClusterDTO:
type: object
properties:
dataChangeCreatedBy:
type: string
description: 集群创建者用户名,记录是谁创建了这个集群
dataChangeCreatedByDisplayName:
type: string
description: 集群创建者显示名称,用于展示创建者的友好名称
dataChangeLastModifiedBy:
type: string
description: 集群最后修改者用户名,记录最后一次修改集群信息的用户
dataChangeLastModifiedByDisplayName:
type: string
description: 集群最后修改者显示名称,用于展示最后修改者的友好名称
dataChangeCreatedTime:
type: string
description: 集群创建时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
dataChangeLastModifiedTime:
type: string
description: 集群最后修改时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
name:
type: string
description: 集群名称,在同一应用和环境下唯一标识一个集群
appId:
type: string
description: 所属应用的唯一标识符
id:
type: integer
description: 集群的唯一标识符
format: int64
parentClusterId:
type: integer
description: 父集群的ID
format: int64
comment:
type: string
description: 集群的备注说明
description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置
MapString:
type: object
additionalProperties:
type: string
OpenReleaseDTO:
type: object
properties:
dataChangeCreatedBy:
type: string
description: 发布创建者用户名,记录是谁创建了这次发布
dataChangeCreatedByDisplayName:
type: string
description: 发布创建者显示名称,用于展示创建者的友好名称
dataChangeLastModifiedBy:
type: string
description: 发布最后修改者用户名,记录最后一次修改发布信息的用户
dataChangeLastModifiedByDisplayName:
type: string
description: 发布最后修改者显示名称,用于展示最后修改者的友好名称
dataChangeCreatedTime:
type: string
description: 发布创建时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
dataChangeLastModifiedTime:
type: string
description: 发布最后修改时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
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'
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: 命名空间创建者用户名,记录是谁创建了这个应用命名空间
dataChangeCreatedByDisplayName:
type: string
description: 命名空间创建者显示名称,用于展示创建者的友好名称
dataChangeLastModifiedBy:
type: string
description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户
dataChangeLastModifiedByDisplayName:
type: string
description: 命名空间最后修改者显示名称,用于展示最后修改者的友好名称
dataChangeCreatedTime:
type: string
description: 命名空间创建时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
dataChangeLastModifiedTime:
type: string
description: 命名空间最后修改时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
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应用命名空间数据传输对象,表示应用级别的命名空间配置信息
OpenNamespaceUsageDTO:
type: object
properties:
namespaceName:
type: string
description: 命名空间名称
appId:
type: string
description: 所属应用的唯一标识符
clusterName:
type: string
description: 所属集群名称
envName:
type: string
description: 环境名称
instanceCount:
type: integer
description: 该命名空间关联的实例数量
branchInstanceCount:
type: integer
description: 分支命名空间关联的实例数量
linkedNamespaceCount:
type: integer
description: 关联到该公共命名空间的命名空间数量
description: 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标
OpenGrayReleaseRuleItemDTO:
type: object
properties:
clientAppId:
type: string
description: 客户端应用ID,指定哪个应用可以获取灰度配置
clientIpList:
type: array
uniqueItems: true
items:
type: string
description: 客户端IP地址列表,指定哪些IP地址可以获取灰度配置
clientLabelList:
type: array
uniqueItems: true
items:
type: string
description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端
description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件
OpenGrayReleaseRuleDTO:
type: object
properties:
dataChangeCreatedBy:
type: string
description: 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则
dataChangeCreatedByDisplayName:
type: string
description: 灰度规则创建者显示名称,用于展示创建者的友好名称
dataChangeLastModifiedBy:
type: string
description: 灰度规则最后修改者用户名,记录最后一次修改规则的用户
dataChangeLastModifiedByDisplayName:
type: string
description: 灰度规则最后修改者显示名称,用于展示最后修改者的友好名称
dataChangeCreatedTime:
type: string
description: 灰度规则创建时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
dataChangeLastModifiedTime:
type: string
description: 灰度规则最后修改时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
appId:
type: string
description: 所属应用的唯一标识符
clusterName:
type: string
description: 所属集群的名称
namespaceName:
type: string
description: 所属命名空间的名称
branchName:
type: string
description: 灰度分支名称,标识灰度发布的分支
ruleItems:
type: array
uniqueItems: true
items:
$ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO'
description: 灰度发布规则项列表,包含具体的灰度规则条件
description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置
OpenCreateNamespaceDTO:
type: object
properties:
appId:
type: string
description: 所属应用的唯一标识符
env:
type: string
description: 所在那个环境创建
clusterName:
type: string
description: 所属集群的名称
appNamespaceName:
type: string
description: 根据已创建的appnamespace来实例化namespace
description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项
OpenNamespaceDTO:
type: object
properties:
dataChangeCreatedBy:
type: string
description: 命名空间创建者用户名,记录是谁创建了这个命名空间
dataChangeCreatedByDisplayName:
type: string
description: 命名空间创建者显示名称,用于展示创建者的友好名称
dataChangeLastModifiedBy:
type: string
description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户
dataChangeLastModifiedByDisplayName:
type: string
description: 命名空间最后修改者显示名称,用于展示最后修改者的友好名称
dataChangeCreatedTime:
type: string
description: 命名空间创建时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
dataChangeLastModifiedTime:
type: string
description: 命名空间最后修改时间,ISO 8601格式的时间戳
example: "2025-09-29T12:34:56Z"
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: 命名空间包含的配置项列表
extendInfo:
$ref: '#/components/schemas/OpenNamespaceExtendDTO'
description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项
OpenNamespaceExtendDTO:
type: object
properties:
isConfigHidden:
type: boolean
description: '当当前用户无权限查看配置时置为 true'
parentAppId:
type: string
description: 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转
itemModifiedCnt:
type: integer
description: 未发布变更数
OpenNamespaceLockDTO:
type: object
properties:
namespaceName:
type: string
description: 命名空间名称
isLocked:
type: boolean
description: 是否被锁定
lockedBy:
type: string
description: 锁定者用户名
isEmergencyPublishAllowed:
type: boolean
description: 是否允许紧急发布
description: Apollo命名空间锁状态数据传输对象
OpenInstancePageDTO:
type: object
properties:
page:
type: integer
description: 当前页码,从0开始计数
size:
type: integer
description: 每页显示的记录数量
total:
type: integer
description: 总记录数,符合查询条件的实例总数量
format: int64
instances:
type: array
items:
$ref: '#/components/schemas/OpenInstanceDTO'
description: 当前页的实例列表,包含具体的实例数据
description: 分页实例数据传输对象,用于返回分页查询的实例列表结果
OpenEnvClusterDTO:
type: object
properties:
env:
type: string
description: '环境标识,例如 DEV、FAT、UAT、PROD'
clusters:
type: array
items:
type: string
description: 该环境下的集群名称列表
OpenEnvClusterInfo:
type: object
properties:
code:
type: integer
description: 查询状态码
message:
type: string
description: '相关信息'
env:
type: string
description: '环境标识'
clusters:
type: array
items:
$ref: '#/components/schemas/OpenClusterDTO'
description: '集群信息列表'
OpenMissEnvDTO:
type: object
properties:
code:
type: integer
description: 查询状态码
message:
type: string
OpenNamespaceTextModel:
type: object
properties:
appId:
type: string
description: '应用唯一标识'
env:
type: string
description: '环境标识'
clusterName:
type: string
description: '集群名称'
namespaceName:
type: string
description: '命名空间名称'
namespaceId:
type: integer
description: '命名空间ID'
format: int64
format:
type: string
description: '命名空间格式类型(properties/xml/json/yml等)'
configText:
type: string
description: '配置内容的原始文本'
operator:
type: string
description: '操作者用户名'
OpenNamespaceIdentifier:
type: object
properties:
appId:
type: string
description: '应用唯一标识'
env:
type: string
description: '环境标识'
clusterName:
type: string
description: '集群名称'
namespaceName:
type: string
description: '命名空间名称'
OpenItemDiffDTO:
type: object
properties:
code:
type: integer
description: '查找结果'
message:
type: string
description: '查找结果信息'
namespace:
$ref: '#/components/schemas/OpenNamespaceIdentifier'
createItems:
type: array
items:
$ref: '#/components/schemas/OpenItemDTO'
deleteItems:
type: array
items:
$ref: '#/components/schemas/OpenItemDTO'
updateItems:
type: array
items:
$ref: '#/components/schemas/OpenItemDTO'
OpenNamespaceSyncDTO:
type: object
properties:
syncToNamespaces:
type: array
items:
$ref: '#/components/schemas/OpenNamespaceIdentifier'
description: 目标命名空间标识列表
syncItems:
type: array
items:
$ref: '#/components/schemas/OpenItemDTO'
description: 需要修改的配置项列表
# operation:
# type: string
# enum: [update, delete, create]
OpenInstanceConfigDTO:
type: object
properties:
release:
$ref: '#/components/schemas/OpenReleaseDTO'
releaseDeliveryTime:
type: string
description: 配置下发时间(ISO 8601)
example: "2025-09-29T12:34:56Z"
dataChangeLastModifiedTime:
type: string
description: 最后修改时间(ISO 8601)
example: "2025-09-29T12:34:56Z"
OpenInstanceDTO:
type: object
properties:
id:
type: integer
description: 实例ID
format: int64
appId:
type: string
description: 实例所属应用ID
clusterName:
type: string
description: 实例所属集群名称
dataCenter:
type: string
description: 数据中心/机房标识
ip:
type: string
description: 实例IP地址
configs:
type: array
items:
$ref: '#/components/schemas/OpenInstanceConfigDTO'
description: 实例当前生效的配置列表
dataChangeCreatedTime:
type: string
description: 数据创建时间(ISO 8601)
example: "2025-09-29T12:34:56Z"
OpenOrganizationDto:
type: object
properties:
orgId:
type: string
description: 组织ID
orgName:
type: string
description: 组织名称
ExceptionResponse:
type: object
properties:
status:
type: integer
description: HTTP 状态码
message:
type: string
description: 错误信息
timestamp:
type: string
format: date-time
description: 时间戳
exception:
type: string
description: 错误类名
example:
status: 404
message: "Resource not found"
timestamp: "2025-09-29T12:34:56Z"
exception: "NotFoundException"
OpenPermissionConditionDTO:
type: object
properties:
hasPermission:
type: boolean
description: ''
OpenUserInfoDTO:
type: object
properties:
userId:
type: string
description: ''
name:
type: string
description: ''
email:
type: string
description: ''
enabled:
type: integer
description: ''
OpenUserDTO:
type: object
properties:
username:
type: string
description: 用户名
userDisplayName:
type: string
description: 用户显示名
password:
type: string
description: 用户密码
email:
type: string
description: 用户邮箱
enabled:
type: integer
description: 是否启用,1 表示启用,0 表示禁用
OpenCreateUserTokenRequest:
type: object
description: 创建Portal用户访问Token的请求
required:
- name
properties:
name:
type: string
description: 用户访问Token名称
operations:
type: array
uniqueItems: true
description: 授权的用户Token操作列表,空列表表示全部可用操作
items:
type: string
appIds:
type: array
uniqueItems: true
description: 授权的应用ID列表,空列表表示全部可访问应用
items:
type: string
envs:
type: array
uniqueItems: true
description: 授权的环境列表,空列表表示全部环境
items:
type: string
namespaces:
type: array
description: 授权的命名空间范围列表,空列表表示全部命名空间
items:
$ref: '#/components/schemas/OpenUserTokenNamespaceScope'
rateLimit:
type: integer
minimum: 0
description: 每秒限流阈值,0或空表示不限流
expires:
type: string
format: date-time
description: Token过期时间
OpenUserTokenSummary:
type: object
description: Portal用户访问Token摘要
required:
- id
- userId
- name
- tokenPrefix
- status
- operations
- appIds
- envs
- namespaces
- rateLimit
- expires
- dataChangeCreatedTime
properties:
id:
type: integer
format: int64
description: 用户访问Token ID
userId:
type: string
description: Token所属Portal用户ID
name:
type: string
description: 用户访问Token名称
tokenPrefix:
type: string
description: 用户访问Token前缀,用于识别Token但不暴露完整密钥
status:
type: string
description: Token状态
enum:
- active
- expired
- revoked
operations:
type: array
uniqueItems: true
description: 授权的用户Token操作列表,空列表表示全部可用操作
items:
type: string
appIds:
type: array
uniqueItems: true
description: 授权的应用ID列表,空列表表示全部可访问应用
items:
type: string
envs:
type: array
uniqueItems: true
description: 授权的环境列表,空列表表示全部环境
items:
type: string
namespaces:
type: array
description: 授权的命名空间范围列表,空列表表示全部命名空间
items:
$ref: '#/components/schemas/OpenUserTokenNamespaceScope'
rateLimit:
type: integer
minimum: 0
description: 每秒限流阈值,0或空表示不限流
expires:
type: string
format: date-time
description: Token过期时间
lastUsedTime:
type: string
format: date-time
description: Token最近使用时间
lastUsedIp:
type: string
description: Token最近使用IP
lastUsedUserAgent:
type: string
description: Token最近使用User-Agent
revokedAt:
type: string
format: date-time
description: Token撤销时间
revokedBy:
type: string
description: Token撤销人
dataChangeCreatedTime:
type: string
format: date-time
description: Token创建时间
OpenCreateUserTokenResponse:
allOf:
- $ref: '#/components/schemas/OpenUserTokenSummary'
- type: object
required:
- tokenValue
properties:
tokenValue:
type: string
description: 新创建的完整用户访问Token,仅在创建或轮换响应中返回一次
OpenRotateUserTokenResponse:
allOf:
- $ref: '#/components/schemas/OpenUserTokenSummary'
- type: object
required:
- tokenValue
properties:
tokenValue:
type: string
description: 轮换后的完整用户访问Token,仅在创建或轮换响应中返回一次
OpenUserTokenCapability:
type: object
description: 当前Portal用户可创建Token的能力
required:
- operations
- defaultExpireDays
- maxExpireDays
properties:
operations:
type: array
uniqueItems: true
description: 当前Portal用户可授予的用户Token操作列表
items:
type: string
defaultExpireDays:
type: integer
description: 默认过期天数
maxExpireDays:
type: integer
description: 最大过期天数
OpenUserTokenCurrentCapability:
type: object
description: 当前用户访问Token身份、权限范围和可调用OpenAPI能力
required:
- authType
- userId
- tokenId
- tokenName
- tokenPrefix
- rateLimit
- expires
- dataChangeCreatedTime
- denyAll
- allOperations
- operations
- allApps
- appIds
- allEnvs
- envs
- allNamespaces
- namespaces
- actions
properties:
authType:
type: string
description: 当前认证类型,用户访问Token固定为 USER_TOKEN
example: USER_TOKEN
userId:
type: string
description: Token所属Portal用户ID
tokenId:
type: integer
format: int64
description: 用户访问Token ID
tokenName:
type: string
description: 用户访问Token名称
tokenPrefix:
type: string
description: 用户访问Token前缀,用于识别Token但不暴露完整密钥
rateLimit:
type: integer
description: 每秒限流阈值,0或空表示不限流
expires:
type: string
format: date-time
description: Token过期时间
lastUsedTime:
type: string
format: date-time
description: Token最近使用时间
dataChangeCreatedTime:
type: string
format: date-time
description: Token创建时间
denyAll:
type: boolean
description: 是否拒绝所有OpenAPI访问
allOperations:
type: boolean
description: 是否允许当前用户拥有的全部操作
operations:
type: array
uniqueItems: true
description: 显式授权的操作列表,空列表配合 allOperations 表示全部操作
items:
type: string
allApps:
type: boolean
description: 是否允许当前用户可访问的全部应用
appIds:
type: array
uniqueItems: true
description: 显式授权的应用ID列表,空列表配合 allApps 表示全部应用
items:
type: string
allEnvs:
type: boolean
description: 是否允许全部环境
envs:
type: array
uniqueItems: true
description: 显式授权的环境列表,空列表配合 allEnvs 表示全部环境
items:
type: string
allNamespaces:
type: boolean
description: 是否允许全部命名空间
namespaces:
type: array
description: 显式授权的命名空间范围列表,空列表配合 allNamespaces 表示全部命名空间
items:
$ref: '#/components/schemas/OpenUserTokenNamespaceScope'
actions:
type: array
description: 当前Token可调用的OpenAPI操作目录
items:
$ref: '#/components/schemas/OpenUserTokenOpenApiAction'
OpenUserTokenNamespaceScope:
type: object
description: 用户访问Token的命名空间授权范围
properties:
appId:
type: string
description: 应用ID,空值或星号表示不限应用
env:
type: string
description: 环境,空值或星号表示不限环境
clusterName:
type: string
description: 集群名称,空值或星号表示不限集群
namespaceName:
type: string
description: 命名空间名称,空值或星号表示不限命名空间
OpenUserTokenOpenApiAction:
type: object
description: 用户访问Token可调用的OpenAPI操作说明
properties:
id:
type: string
description: OpenAPI操作标识
method:
type: string
description: HTTP方法
example: GET
path:
type: string
description: OpenAPI路径
requiredOperations:
type: array
description: 调用该OpenAPI操作需要满足的用户Token操作权限列表
items:
type: string
grantedOperations:
type: array
description: 当前Token已满足的操作权限列表
items:
type: string
operationMatch:
type: string
description: requiredOperations 的匹配方式,ANY 表示满足任一操作即可,NONE 表示无需操作权限
example: ANY
resourceScope:
type: string
description: 该OpenAPI操作涉及的资源范围类型
example: namespace
description:
type: string
description: OpenAPI操作说明
OpenEnvNamespaceRoleUserDTO:
type: object
properties:
appId:
type: string
description: ''
namespaceName:
type: string
description: ''
modifyRoleUsers:
type: array
items:
$ref: '#/components/schemas/OpenUserInfoDTO'
description:
description: ''
releaseRoleUsers:
type: array
items:
$ref: '#/components/schemas/OpenUserInfoDTO'
description:
description: ''
env:
type: string
description: ''
OpenClusterNamespaceRoleUserDTO:
type: object
properties:
appId:
type: string
description: ''
env:
type: string
description: ''
cluster:
type: string
description: ''
modifyRoleUsers:
type: array
items:
$ref: '#/components/schemas/OpenUserInfoDTO'
description:
description: ''
releaseRoleUsers:
type: array
items:
$ref: '#/components/schemas/OpenUserInfoDTO'
description:
description: ''
OpenNamespaceRoleUserDTO:
type: object
properties:
appId:
type: string
description: ''
namespaceName:
type: string
description: ''
modifyRoleUsers:
type: array
items:
$ref: '#/components/schemas/OpenUserInfoDTO'
description:
description: ''
releaseRoleUsers:
type: array
items:
$ref: '#/components/schemas/OpenUserInfoDTO'
description:
description: ''
OpenAppRoleUserDTO:
type: object
properties:
appId:
type: string
description: ''
masterUsers:
type: array
items:
$ref: '#/components/schemas/OpenUserInfoDTO'
description:
description: ''
OpenReleaseDiffDTO:
type: object
properties:
changes:
type: array
description: A list of changes, ensuring order if necessary.
items:
$ref: '#/components/schemas/OpenReleaseChangeDTO'
description: Map containing a single key-value pair of the changed item.
OpenReleaseChangeDTO:
type: object
properties:
changeType:
type: string
description: '修改类型'
key:
type: string
description: 'key'
newValue:
type: string
description: 'new value'
oldValue:
type: string
description: 'old value'
OpenAccessKeyDTO:
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
secret:
type: string
description: ''
appId:
type: string
description: ''
mode:
type: integer
description: ''
enabled:
type: boolean
description: ''
StringToStringBoolMap: # Map