更新配置文件
PUT
/config/v1/configfiles
最后修改时间:2025-03-07 07:07:42
责任人:未设置
请求参数
Header 参数
X-Polaris-Token
string
可选
Body 参数application/json
id
integer
主键
namespace
string
命名空间
group
string
配置分组名称
name
string
配置文件名称
format
string
配置文件内容格式
comment
string
配置文件描述
content
string
配置文件内容
encrypt_algo
string
加密算法
encrypted
boolean
是否开启加密
tags
array [object {2}]
配置文 件标签
key
string
标签 key
value
string
标签 value
supported_client
string
可选
persistent
object
可选
encoding
string
编码模式
path
string
下发路径
postCmd
string
下发命令
示例
{
"id": 74,
"namespace": "default",
"group": "testGroup",
"name": "application5.txt",
"format": "yaml",
"comment": "config for test",
"content": "coffees: [ \"Latte\", \"Cappuccino\", \"Espresso\"]",
"encrypt_algo": "sint cillum aliquip",
"encrypted": false,
"tags": [
{
"key": "tagKey",
"value": "tagValue"
},
{
"key": "tagKey",
"value": "tagValue"
},
{
"key": "tagKey",
"value": "tagValue"
}
],
"supported_client": "dolor Ut",
"persistent": {
"encoding": "UTF-8",
"path": "/tmp/cody",
"postCmd": "echo aaa;\n echo ccc"
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'http://119.91.66.223:8090/config/v1/configfiles' \
--header 'X-Polaris-Token;' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 74,
"namespace": "default",
"group": "testGroup",
"name": "application5.txt",
"format": "yaml",
"comment": "config for test",
"content": "coffees: [ \"Latte\", \"Cappuccino\", \"Espresso\"]",
"encrypt_algo": "sint cillum aliquip",
"encrypted": false,
"tags": [
{
"key": "tagKey",
"value": "tagValue"
},
{
"key": "tagKey",
"value": "tagValue"
},
{
"key": "tagKey",
"value": "tagValue"
}
],
"supported_client": "dolor Ut",
"persistent": {
"encoding": "UTF-8",
"path": "/tmp/cody",
"postCmd": "echo aaa;\n echo ccc"
}
}'
返回响应
🟢200成功
application/json
Body
code
integer
状态码
info
string
提示信息
configFile
object
配置文件
id
integer
配置文件ID
namespace
string
命名空间
group
string
配置分组名称
name
string
配置文件名称
format
string
配置文件内容格式
comment
string
配置文件描述
content
string
配置文件内容
tags
array [object {2}]
配置文件标签
supported_client
string
支持客户端类型
persistent
object
可选
示例
{
"code": 200000,
"info": "execute success",
"configFile": {
"id": 8,
"name": "application5.txt",
"namespace": "default",
"group": "testGroup",
"content": "coffees: [ \"Latte\", \"Cappuccino\", \"Espresso\"]",
"format": "yaml",
"comment": "config for test",
"tags": [
{
"key": "tagKey",
"value": "tagValue"
}
],
"supported_client": "CLIENT_AGENT",
"persistent": {
"encoding": "UTF-8",
"path": "/tmp/cody",
"postCmd": "echo aaa;\n echo ccc"
}
}
}
修改于 2025-03-07 07:07:42