Config templates
Config file template management.
Config file template management.
Default Base URL: http://127.0.0.1:8090. Management APIs require Authorization (token from login).
Config templates
Config file template management.
/config/v1/templatesAuth requiredList config templates
List config templates.
Parameters
- Authorizationheader · stringrequired
Token from login.
curl -sS -X GET 'http://127.0.0.1:8090/config/v1/templates' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success"
}/config/v1/templatesAuth requiredCreate config templates
Create config templates.
Parameters
- Authorizationheader · stringrequired
Token from login.
- (body)body · ConfigFileTemplate[]required
JSON array of ConfigFileTemplate; fields below are per-item.
- idbody · uint64optional
id
- namebody · stringoptional
name
- contentbody · stringoptional
content
- formatbody · stringoptional
format
- commentbody · stringoptional
comment
Response fields
- codebody · uint32required
Business code.
- infobody · stringoptional
Info.
- ConfigFileTemplatebody · ConfigFileTemplateoptional
Entity fields.
- idbody · uint64optional
id
- namebody · stringoptional
name
- contentbody · stringoptional
content
- formatbody · stringoptional
format
- commentbody · stringoptional
comment
- ctimebody · stringoptional
ctime
- mtimebody · stringoptional
mtime
curl -sS -X POST 'http://127.0.0.1:8090/config/v1/templates' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[]'{
"code": 200000,
"info": "execute success"
}/config/v1/templatesAuth requiredUpdate config templates
Update config templates.
Parameters
- Authorizationheader · stringrequired
Token from login.
- (body)body · ConfigFileTemplate[]required
JSON array of ConfigFileTemplate; fields below are per-item.
- idbody · uint64optional
id
- namebody · stringoptional
name
- contentbody · stringoptional
content
- formatbody · stringoptional
format
- commentbody · stringoptional
comment
Response fields
- codebody · uint32required
Business code.
- infobody · stringoptional
Info.
- ConfigFileTemplatebody · ConfigFileTemplateoptional
Entity fields.
- idbody · uint64optional
id
- namebody · stringoptional
name
- contentbody · stringoptional
content
- formatbody · stringoptional
format
- commentbody · stringoptional
comment
- ctimebody · stringoptional
ctime
- mtimebody · stringoptional
mtime
curl -sS -X PUT 'http://127.0.0.1:8090/config/v1/templates' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[]'{
"code": 200000,
"info": "execute success"
}