新建配置
此接口用于新建配置信息。
接口描述
通信协议:HTTP
URL:POST /api/v1/configmap
传参方式:body
请求参数
字段名 | 类型 | 是否必填 | 说明 |
---|---|---|---|
key | string | 是 | 配置项的 key,也叫配置项名称 |
type | string | 是 | 配置项 value 的类型 |
value | string / number / json | 是 | 配置项 value 的值 |
响应参数
新建成功,则响应体 message 字段返回“success”。
请求示例
curl --location --request POST 'http://localhost:3001/api/v1/configmap'
--header 'Content-Type: application/json'
--data-raw '
{
id: "",
key: "/a/b/test",
type: "String",
value: "ddddddddtest1111"
}'
响应示例
{
"status":200,
"message":"success",
"fieldErrors":null,
"data":null
}
错误码
具体请参见 错误码说明。