...
The following curl commands can be used to upload a Day 2 Configuration template.
Command to POST (create
...
) Template:
Code Block |
---|
|
curl -i -d @create_config_template.json -X POST http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config/template/ |
...
In Day2 apply configuration API each instance of configuration is identified by rb_name, rb_version and profile_name. The body of the API contains set of parameter and value list.
CRUD Operations
Command to POST (create
...
and modify) Configuration Values
Code Block |
---|
|
curl -i -d @values.json -X POST http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config/{template-name}/value |
With the following JSON content (values.json )
Code Block |
---|
language | js |
---|
title | Profile JSON Body |
---|
|
{
"config-name": "kafka-role-1"
"description":"testing Kafka Day 2 config configuration",
"values":{
"namespace":"kafka",
"topic":{
"name":"orders",
"cluster":"my-cluster",
"partitions":10,
"replicas":2
}
}
} |
...
Code Block |
---|
language | js |
---|
title | Profile JSON Body |
---|
|
{
"rb-name":"kafka",
"rb-version":"kafka-config-1",
"profile-name":"1234567890",
"template-name": "kafka-1"
"config-name": "kafka-role-1"
"config-version":"1.0"
}
} |
POST used for both loading new configuration values and also modifying the existing configuration values
Command to GET Configuration Values
Code Block |
---|
|
# Get all Values
curl -i http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config/{template-name}/value
# Get one Value with config version
curl -i http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config/{template-name}/value/{config-version} |
...
Code Block |
---|
|
curl -i -X DELETE http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config/{template-name}/value/{config-version} |
Command to PUT Configuration Values for Rollback
...