配置灰度
全量 / 灰度发布、停灰度与提升草稿。
全量 / 灰度发布、停灰度与提升草稿。
默认 Base URL:http://127.0.0.1:8090。管理面接口需 Authorization(登录返回的 token)。
配置灰度
全量(normal)与灰度(gray)发布;多条 active gray 可并存。发布 body 为 ConfigFileRelease。
/config/v1/files/release需要鉴权发布配置
`release_type` 为 normal 或 gray;gray 时 `beta_labels` 必填。
参数
- Authorizationheader · string必填
登录返回的 token。
- (body)body · ConfigFileRelease[]必填
请求体为 ConfigFileRelease 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。
- idbody · string可选
id
- namebody · string必填
name
- namespacebody · string必填
namespace
- groupbody · string可选
group
- file_namebody · string可选
file_name
- contentbody · string可选
content
- commentbody · string可选
comment
- versionbody · uint64可选
version
- labelsbody · map<string,string>可选
labels
- formatbody · string可选
format
- release_descriptionbody · string可选
release_description
- release_typebody · string可选
release_type
- beta_labelsbody · ClientLabel[]可选
beta_labels
- keybody · string可选
key
- valuebody · MatchString可选
value
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
- supported_clientbody · enum(ConfigFileSupportedClient)可选
supported_client 枚举:CLIENT_SDK | CLIENT_AGENT | CLIENT_ALL
- persistentbody · ConfigFilePersistent可选
persistent
- encodingbody · string可选
encoding
- pathbody · string可选
path
- post_cmdbody · string可选
post_cmd
- encryptedbody · bool可选
是否为加密配置文件
- encrypt_algobody · string可选
加密算法
- config_typebody · enum(ConfigFileType)可选
config_type 枚举:CONFIG_FILE | CONFIG_TEMPLATE
- placeholder_value_mapbody · map<string,PlaceholderValue>可选
placeholder_value_map
- placeholderbody · string可选
占位符名称
- valuesbody · MatchString[]可选
values
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
响应字段
- codebody · uint32必填
业务码,成功多为 200000。
- infobody · string可选
提示信息。
- configFileReleasebody · ConfigFileRelease可选
返回中的 ConfigFileRelease 实体字段(批量接口在 responses[] 内)。
- idbody · string可选
id
- namebody · string可选
name
- namespacebody · string可选
namespace
- groupbody · string可选
group
- file_namebody · string可选
file_name
- contentbody · string可选
content
- commentbody · string可选
comment
- md5body · string可选
md5
- versionbody · uint64可选
version
- ctimebody · string可选
ctime
- create_bybody · string可选
create_by
- mtimebody · string可选
mtime
- modify_bybody · string可选
modify_by
- labelsbody · map<string,string>可选
labels
- activebody · bool可选
当前生效配置
- formatbody · string可选
format
- release_descriptionbody · string可选
release_description
- release_typebody · string可选
release_type
- beta_labelsbody · ClientLabel[]可选
beta_labels
- keybody · string可选
key
- valuebody · MatchString可选
value
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
- supported_clientbody · enum(ConfigFileSupportedClient)可选
supported_client 枚举:CLIENT_SDK | CLIENT_AGENT | CLIENT_ALL
- persistentbody · ConfigFilePersistent可选
persistent
- encodingbody · string可选
encoding
- pathbody · string可选
path
- post_cmdbody · string可选
post_cmd
- encryptedbody · bool可选
是否为加密配置文件
- encrypt_algobody · string可选
加密算法
- config_typebody · enum(ConfigFileType)可选
config_type 枚举:CONFIG_FILE | CONFIG_TEMPLATE
- placeholder_value_mapbody · map<string,PlaceholderValue>可选
placeholder_value_map
- placeholderbody · string可选
占位符名称
- valuesbody · MatchString[]可选
values
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
curl -sS -X POST 'http://127.0.0.1:8090/config/v1/files/release' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '{"namespace":"default","group":"docs-multi-gray","file_name":"app.yaml","name":"gray-env-a","release_type":"gray","content":"mode: gray-a\n","beta_labels":[{"key":"env","value":{"type":0,"value":"gray-a","value_type":0}}]}'{
"code": 200000,
"info": "execute success",
"amount": 1
}/config/v1/files/releases需要鉴权查询发布记录
查看全量与灰度发布列表。
参数
- Authorizationheader · string必填
登录返回的 token。
- namespacequery · string可选
命名空间。
- groupquery · string可选
分组。
- file_namequery · string可选
文件名(亦兼容 fileName)。
- namequery · string可选
release 名(亦兼容 release_name)。
- only_activequery · bool可选
仅 active。
- offsetquery · integer可选
偏移。
- limitquery · integer可选
分页大小。
curl -sS 'http://127.0.0.1:8090/config/v1/files/releases?namespace=default&group=docs-multi-gray&file_name=app.yaml' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success",
"data": [{ "name": "gray-env-a", "release_type": "gray", "active": true }]
}/config/v1/files/release/versions需要鉴权查询发布版本
查询某文件的发布版本列表。
参数
- Authorizationheader · string必填
登录返回的 token。
- namespacequery · string必填
命名空间。
- groupquery · string必填
分组。
- file_namequery · string必填
文件名。
curl -sS 'http://127.0.0.1:8090/config/v1/files/release/versions?namespace=default&group=docs-multi-gray&file_name=app.yaml' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success",
"amount": 1
}/config/v1/files/releases/stopbeta需要鉴权停止灰度
按版本停止某条灰度;body 为 ConfigFileRelease 数组。
参数
- Authorizationheader · string必填
登录返回的 token。
- namespacebody · string必填
命名空间。
- groupbody · string必填
分组。
- file_namebody · string必填
文件名。
- namebody · string必填
灰度 release 名。
curl -sS -X POST 'http://127.0.0.1:8090/config/v1/files/releases/stopbeta' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[{"namespace":"default","group":"docs-multi-gray","file_name":"app.yaml","name":"gray-env-a"}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/config/v1/files/releases/rollback需要鉴权回滚发布
回滚配置发布;body 为数组。
参数
- Authorizationheader · string必填
登录返回的 token。
- (body)body · ConfigFileRelease[]必填
请求体为 ConfigFileRelease 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。
- idbody · string可选
id
- namebody · string可选
name
- namespacebody · string可选
namespace
- groupbody · string可选
group
- file_namebody · string可选
file_name
- contentbody · string可选
content
- commentbody · string可选
comment
- versionbody · uint64可选
version
- labelsbody · map<string,string>可选
labels
- formatbody · string可选
format
- release_descriptionbody · string可选
release_description
- release_typebody · string可选
release_type
- beta_labelsbody · ClientLabel[]可选
beta_labels
- keybody · string可选
key
- valuebody · MatchString可选
value
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
- supported_clientbody · enum(ConfigFileSupportedClient)可选
supported_client 枚举:CLIENT_SDK | CLIENT_AGENT | CLIENT_ALL
- persistentbody · ConfigFilePersistent可选
persistent
- encodingbody · string可选
encoding
- pathbody · string可选
path
- post_cmdbody · string可选
post_cmd
- encryptedbody · bool可选
是否为加密配置文件
- encrypt_algobody · string可选
加密算法
- config_typebody · enum(ConfigFileType)可选
config_type 枚举:CONFIG_FILE | CONFIG_TEMPLATE
- placeholder_value_mapbody · map<string,PlaceholderValue>可选
placeholder_value_map
- placeholderbody · string可选
占位符名称
- valuesbody · MatchString[]可选
values
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
响应字段
- codebody · uint32必填
业务码,成功多为 200000。
- infobody · string可选
提示信息。
- configFileReleasebody · ConfigFileRelease可选
返回中的 ConfigFileRelease 实体字段(批量接口在 responses[] 内)。
- idbody · string可选
id
- namebody · string可选
name
- namespacebody · string可选
namespace
- groupbody · string可选
group
- file_namebody · string可选
file_name
- contentbody · string可选
content
- commentbody · string可选
comment
- md5body · string可选
md5
- versionbody · uint64可选
version
- ctimebody · string可选
ctime
- create_bybody · string可选
create_by
- mtimebody · string可选
mtime
- modify_bybody · string可选
modify_by
- labelsbody · map<string,string>可选
labels
- activebody · bool可选
当前生效配置
- formatbody · string可选
format
- release_descriptionbody · string可选
release_description
- release_typebody · string可选
release_type
- beta_labelsbody · ClientLabel[]可选
beta_labels
- keybody · string可选
key
- valuebody · MatchString可选
value
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
- supported_clientbody · enum(ConfigFileSupportedClient)可选
supported_client 枚举:CLIENT_SDK | CLIENT_AGENT | CLIENT_ALL
- persistentbody · ConfigFilePersistent可选
persistent
- encodingbody · string可选
encoding
- pathbody · string可选
path
- post_cmdbody · string可选
post_cmd
- encryptedbody · bool可选
是否为加密配置文件
- encrypt_algobody · string可选
加密算法
- config_typebody · enum(ConfigFileType)可选
config_type 枚举:CONFIG_FILE | CONFIG_TEMPLATE
- placeholder_value_mapbody · map<string,PlaceholderValue>可选
placeholder_value_map
- placeholderbody · string可选
占位符名称
- valuesbody · MatchString[]可选
values
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
curl -sS -X PUT 'http://127.0.0.1:8090/config/v1/files/releases/rollback' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[{"namespace":"default","group":"docs-multi-gray","file_name":"app.yaml","name":"v1"}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/config/v1/files/releases/promote-gray需要鉴权灰度转草稿
将灰度内容提升为草稿;Enrich 文档缺失,以 handler 为准。
参数
- Authorizationheader · string必填
登录返回的 token。
- (body)body · ConfigFileRelease[]必填
请求体为 ConfigFileRelease 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。
- idbody · string可选
id
- namebody · string可选
name
- namespacebody · string可选
namespace
- groupbody · string可选
group
- file_namebody · string可选
file_name
- contentbody · string可选
content
- commentbody · string可选
comment
- versionbody · uint64可选
version
- labelsbody · map<string,string>可选
labels
- formatbody · string可选
format
- release_descriptionbody · string可选
release_description
- release_typebody · string可选
release_type
- beta_labelsbody · ClientLabel[]可选
beta_labels
- keybody · string可选
key
- valuebody · MatchString可选
value
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
- supported_clientbody · enum(ConfigFileSupportedClient)可选
supported_client 枚举:CLIENT_SDK | CLIENT_AGENT | CLIENT_ALL
- persistentbody · ConfigFilePersistent可选
persistent
- encodingbody · string可选
encoding
- pathbody · string可选
path
- post_cmdbody · string可选
post_cmd
- encryptedbody · bool可选
是否为加密配置文件
- encrypt_algobody · string可选
加密算法
- config_typebody · enum(ConfigFileType)可选
config_type 枚举:CONFIG_FILE | CONFIG_TEMPLATE
- placeholder_value_mapbody · map<string,PlaceholderValue>可选
placeholder_value_map
- placeholderbody · string可选
占位符名称
- valuesbody · MatchString[]可选
values
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
响应字段
- codebody · uint32必填
业务码,成功多为 200000。
- infobody · string可选
提示信息。
- configFileReleasebody · ConfigFileRelease可选
返回中的 ConfigFileRelease 实体字段(批量接口在 responses[] 内)。
- idbody · string可选
id
- namebody · string可选
name
- namespacebody · string可选
namespace
- groupbody · string可选
group
- file_namebody · string可选
file_name
- contentbody · string可选
content
- commentbody · string可选
comment
- md5body · string可选
md5
- versionbody · uint64可选
version
- ctimebody · string可选
ctime
- create_bybody · string可选
create_by
- mtimebody · string可选
mtime
- modify_bybody · string可选
modify_by
- labelsbody · map<string,string>可选
labels
- activebody · bool可选
当前生效配置
- formatbody · string可选
format
- release_descriptionbody · string可选
release_description
- release_typebody · string可选
release_type
- beta_labelsbody · ClientLabel[]可选
beta_labels
- keybody · string可选
key
- valuebody · MatchString可选
value
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
- supported_clientbody · enum(ConfigFileSupportedClient)可选
supported_client 枚举:CLIENT_SDK | CLIENT_AGENT | CLIENT_ALL
- persistentbody · ConfigFilePersistent可选
persistent
- encodingbody · string可选
encoding
- pathbody · string可选
path
- post_cmdbody · string可选
post_cmd
- encryptedbody · bool可选
是否为加密配置文件
- encrypt_algobody · string可选
加密算法
- config_typebody · enum(ConfigFileType)可选
config_type 枚举:CONFIG_FILE | CONFIG_TEMPLATE
- placeholder_value_mapbody · map<string,PlaceholderValue>可选
placeholder_value_map
- placeholderbody · string可选
占位符名称
- valuesbody · MatchString[]可选
values
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
curl -sS -X POST 'http://127.0.0.1:8090/config/v1/files/releases/promote-gray' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '{"namespace":"default","group":"docs-multi-gray","file_name":"app.yaml","name":"gray-env-a"}'{
"code": 200000,
"info": "execute success",
"amount": 1
}/config/v1/files/release需要鉴权获取当前发布
获取当前发布。
参数
- Authorizationheader · string必填
登录返回的 token。
- namespacequery · string可选
namespace
- groupquery · string可选
group
- namequery · string可选
name
curl -sS -X GET 'http://127.0.0.1:8090/config/v1/files/release' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success"
}/config/v1/files/releases/delete需要鉴权删除发布记录
删除发布记录。
参数
- Authorizationheader · string必填
登录返回的 token。
- (body)body · ConfigFileRelease[]必填
请求体为 ConfigFileRelease 的 JSON 数组;下列为单条字段。
- idbody · string可选
id
- namebody · string可选
name
- namespacebody · string可选
namespace
- groupbody · string可选
group
- file_namebody · string可选
file_name
- contentbody · string可选
content
- commentbody · string可选
comment
- versionbody · uint64可选
version
- labelsbody · map<string,string>可选
labels
- formatbody · string可选
format
- release_descriptionbody · string可选
release_description
- release_typebody · string可选
release_type
- beta_labelsbody · ClientLabel[]可选
beta_labels
- keybody · string可选
key
- valuebody · MatchString可选
value
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
- supported_clientbody · enum(ConfigFileSupportedClient)可选
supported_client 枚举:CLIENT_SDK | CLIENT_AGENT | CLIENT_ALL
- persistentbody · ConfigFilePersistent可选
persistent
- encodingbody · string可选
encoding
- pathbody · string可选
path
- post_cmdbody · string可选
post_cmd
- encryptedbody · bool可选
encrypted
- encrypt_algobody · string可选
encrypt_algo
- config_typebody · enum(ConfigFileType)可选
config_type 枚举:CONFIG_FILE | CONFIG_TEMPLATE
- placeholder_value_mapbody · map<string,PlaceholderValue>可选
placeholder_value_map
响应字段
- codebody · uint32必填
业务码。
- infobody · string可选
提示信息。
- ConfigFileReleasebody · ConfigFileRelease可选
实体字段。
- idbody · string可选
id
- namebody · string可选
name
- namespacebody · string可选
namespace
- groupbody · string可选
group
- file_namebody · string可选
file_name
- contentbody · string可选
content
- commentbody · string可选
comment
- md5body · string可选
md5
- versionbody · uint64可选
version
- ctimebody · string可选
ctime
- create_bybody · string可选
create_by
- mtimebody · string可选
mtime
- modify_bybody · string可选
modify_by
- labelsbody · map<string,string>可选
labels
- activebody · bool可选
active
- formatbody · string可选
format
- release_descriptionbody · string可选
release_description
- release_typebody · string可选
release_type
- beta_labelsbody · ClientLabel[]可选
beta_labels
- keybody · string可选
key
- valuebody · MatchString可选
value
- typebody · enum(MatchStringType)可选
type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · string可选
value
- value_typebody · enum(ValueType)可选
value_type 枚举:TEXT | PARAMETER
- supported_clientbody · enum(ConfigFileSupportedClient)可选
supported_client 枚举:CLIENT_SDK | CLIENT_AGENT | CLIENT_ALL
- persistentbody · ConfigFilePersistent可选
persistent
- encodingbody · string可选
encoding
- pathbody · string可选
path
- post_cmdbody · string可选
post_cmd
- encryptedbody · bool可选
encrypted
- encrypt_algobody · string可选
encrypt_algo
- config_typebody · enum(ConfigFileType)可选
config_type 枚举:CONFIG_FILE | CONFIG_TEMPLATE
- placeholder_value_mapbody · map<string,PlaceholderValue>可选
placeholder_value_map
curl -sS -X POST 'http://127.0.0.1:8090/config/v1/files/releases/delete' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[]'{
"code": 200000,
"info": "execute success"
}/config/v1/files/createandpub需要鉴权创建并发布
创建并发布。
参数
- Authorizationheader · string必填
登录返回的 token。
- release_namebody · string可选
release_name
- namespacebody · string可选
namespace
- groupbody · string可选
group
- file_namebody · string可选
file_name
- contentbody · string可选
content
- commentbody · string可选
comment
- formatbody · string可选
format
- release_descriptionbody · string可选
release_description
- labelsbody · map<string,string>可选
labels
- encryptedbody · bool可选
encrypted
- encrypt_algobody · string可选
encrypt_algo
- persistentbody · ConfigFilePersistent可选
persistent
- encodingbody · string可选
encoding
- pathbody · string可选
path
- post_cmdbody · string可选
post_cmd
- config_typebody · enum(ConfigFileType)可选
config_type 枚举:CONFIG_FILE | CONFIG_TEMPLATE
- placeholder_value_mapbody · map<string,PlaceholderValue>可选
placeholder_value_map
响应字段
- codebody · uint32必填
业务码。
- infobody · string可选
提示信息。
- ConfigFilePublishInfobody · ConfigFilePublishInfo可选
实体字段。
- release_namebody · string可选
release_name
- namespacebody · string可选
namespace
- groupbody · string可选
group
- file_namebody · string可选
file_name
- contentbody · string可选
content
- commentbody · string可选
comment
- formatbody · string可选
format
- release_descriptionbody · string可选
release_description
- labelsbody · map<string,string>可选
labels
- md5body · string可选
md5
- encryptedbody · bool可选
encrypted
- encrypt_algobody · string可选
encrypt_algo
- persistentbody · ConfigFilePersistent可选
persistent
- encodingbody · string可选
encoding
- pathbody · string可选
path
- post_cmdbody · string可选
post_cmd
- config_typebody · enum(ConfigFileType)可选
config_type 枚举:CONFIG_FILE | CONFIG_TEMPLATE
- placeholder_value_mapbody · map<string,PlaceholderValue>可选
placeholder_value_map
curl -sS -X POST 'http://127.0.0.1:8090/config/v1/files/createandpub' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[]'{
"code": 200000,
"info": "execute success"
}/config/v1/files/op/history需要鉴权操作/发布历史
操作/发布历史。
参数
- Authorizationheader · string必填
登录返回的 token。
- namespacequery · string可选
namespace
- groupquery · string可选
group
- namequery · string可选
name
- offsetquery · integer可选
offset
- limitquery · integer可选
limit
curl -sS -X GET 'http://127.0.0.1:8090/config/v1/files/op/history' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success"
}/config/v1/files/release/history需要鉴权发布历史(兼容路径)
发布历史(兼容路径)。
参数
- Authorizationheader · string必填
登录返回的 token。
- namespacequery · string可选
namespace
- groupquery · string可选
group
- namequery · string可选
name
- offsetquery · integer可选
offset
- limitquery · integer可选
limit
curl -sS -X GET 'http://127.0.0.1:8090/config/v1/files/release/history' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success"
}