A CRUD Interface for interacting with hostname table of Clickhouse
hostgroup_data with given id:
Path: /api/chf/cmm/hostgroups/id
Method: GET
Response: hostgroup_data object
{
"message": "Success",
"data": {
"id": 2,
"host": {
"host_type": "ip",
"host_value": "192.168.1.23",
"host_mask": 32
},
"group": "MACSiliconChip"
}
}id this is integer unique identifier
host is a json object with the following members:
host_type only supported value is “ip”host_value only use IPv4 or IPv6 addresses and netmaskgroup is a valid host group string
hostgroup_data:
Path: /api/chf/cmm/hostgroups/
Method: GET
Response:
{
"message": "Success",
"data": [
{
"id": 1,
"host": {
"host_type": "ip",
"host_value": "192.168.1.23",
"host_mask": 8
},
"group": "MACSiliconC2"
},
{
"id": 2,
"host": {
"host_type": "ip",
"host_value": "192.168.1.23",
"host_mask": 32
},
"group": "MACSiliconChip"
}
]
}hostgroup_data
Path: /api/chf/cmm/hostgroups
Method: POST
Arguments:
Body parameters:
[
{
[mandatory]"host":
{
[mandatory]"host_type": "ip",
[mandatory]"host_value": "192.168.1.23",
[mandatory]"host_mask": 32
},
[mandatory]"group": "MACSiliconChip"
},
{
[mandatory]"host":
{
[mandatory]"host_type": "ip",
[mandatory]"host_value": "192.168.1.23",
[mandatory]"host_mask": 8
},
[mandatory]"group": "MACSiliconC2"
}
]Response:
{
"message": "Success",
"data": [
{
"id": 1,
"host": {
"host_type": "ip",
"host_value": "192.168.1.23",
"host_mask": 32
},
"group": "MACSiliconChip"
},
{
"id": 2,
"host": {
"host_type": "ip",
"host_value": "192.168.1.23",
"host_mask": 8
},
"group": "MACSiliconC2"
}
]
}Path: /api/chf/cmm/hostgroups/
Method: PUT
Arguments:
idOnly the fields that needs to be changed can be sent
[
{
[mandatory]"id": 1,
[optional] "host": {
[mandatory]"host_type": "ip",
[mandatory]"host_value": "10.168.1.23",
[mandatory]"host_mask": 8
},
[optional] "group": "MACSiliconC2"
},
{
[mandatory]"id": 2,
[optional] "host": {
[mandatory]"host_type": "ip",
[mandatory]"host_value": "11.168.1.23",
[mandatory]"host_mask": 32
},
[optional] "group": "MACSiliconChip"
}
]Response:
{
"message": "Success",
"data": [
{
"id": 1,
"host": {
"host_type": "ip",
"host_value": "10.168.1.23",
"host_mask": 8
},
"group": "MACSiliconC2"
},
{
"id": 2,
"host": {
"host_type": "ip",
"host_value": "11.168.1.23",
"host_mask": 32
},
"group": "MACSiliconChip"
}
]
}id
/api/chf/cmm/hostgroups/{id}DELETEResponse:
{
"message": "Successfully removed the metadata entry with given id: '{id}'",
"data": null
}/api/chf/cmm/hostgroupsDELETEResponse:
{
"message": "Successfully removed all metadata entries",
"data": null
}