GET /v2/groups
Returns an array with the list of existing groups.
{
"groups": [
{
"id":"$group_id",
"name":"$group_name",
"owner":{
"id":"$owner_id",
"name":"$owner_name"
},
"members":[
],
"virtual_machines":[
],
"permisions":{
"global":[
],
"vm":[
]
},
"resources": [
{
"id": "$uid",
"type": "$type",
"label": "$label"
}
],
"rules": [
{
// fields are returned only if they have a value other than null
"id": "$rule_id",
"direction": "$direction",
"src_address": "$src_address",
"dst_address": "$dst_address",
"protocol": "$protocol",
"min_port": "$min_port",
"max_port": "$max_port",
"icmp_type": "$icmp_type",
"icmp_code": "$icmp_code"
}
]
}, { ... }
]
}
IN, OUTTCP, UDP, ICMP, SCTP, ESP, AH, IPIP, GREPUT /v2/groups
Adds a new group.
{
"name": "$name"
}
{
"groups": [
{
"id":"$group_id",
"name":"$group_name",
"owner":{
"id":"$owner_id",
"name":"$owner_name"
},
"members":[
],
"virtual_machines":[
],
"permisions":{
"global":[
],
"vm":[
]
},
"resources": [
],
"rules": [
]
}
]
}
POST /v2/groups/$GROUP_ID
Returns information about a single group with the specified $GROUP_ID.
{
"success":true,
"group":
{
"id":"$group_id",
"name":"$group_name",
"owner":{
"id":"$owner_id",
"name":"$owner_name",
},
"members":[
],
"virtual_machines":[
],
"permisions":{
"global":[
],
"vm":[
]
},
"resources": [
],
"rules": [
]
}
}
POST /v2/groups/$GROUP_ID/group-attach-user
Adds a user to the group with the specified $GROUP_ID.
{
"id" : $user_id
}
{
"success":true
}
POST /v2/groups/$GROUP_ID/group-attach-vm
Adds a server to the group with the specified $GROUP_ID.
{
"id" : $vm_id
}
{
"success":true
}
POST /v2/groups/$GROUP_ID/group-attach-resource
Adds a resource to the group with the specified $GROUP_ID.
{
"id" : $resource_id
}
{
"success":true
}
POST /v2/groups/$GROUP_ID/group-detach-user
Removes a user from the group with the specified $GROUP_ID.
{
"id" : $user_id
}
{
"success":true
}
POST /v2/groups/$GROUP_ID/group-detach-vm
Removes a server from the group with the specified $GROUP_ID.
{
"id" : $vm_id
}
{
"success":true
}
POST /v2/groups/$GROUP_ID/group-detach-resource
Removes a resource from the group with the specified $GROUP_ID.
{
"id" : $resource_id
}
{
"success":true
}
POST /v2/groups/$GROUP_ID/group-add-rule
Adds a firewall rule to the group with the specified $GROUP_ID.
{
"direction": "$direction",
"src_address": "$src_address",
"dst_address": "$dst_address",
"protocol": "$protocol",
"min_port": "$min_port",
"max_port": "$max_port",
"icmp_type": "$icmp_type",
"icmp_code": "$icmp_code"
}
IN, OUTTCP, UDP, ICMP, SCTP, ESP, AH, IPIP, GRE{
"success":true
}
POST /v2/groups/$GROUP_ID/group-update-rule
Edits the specified firewall rule of the group with the specified $GROUP_ID.
{
"rule_id": "$rule_id",
"direction": "$direction",
"src_address": "$src_address",
"dst_address": "$dst_address",
"protocol": "$protocol",
"min_port": "$min_port",
"max_port": "$max_port",
"icmp_type": "$icmp_type",
"icmp_code": "$icmp_code"
}
IN, OUTTCP, UDP, ICMP, SCTP, ESP, AH, IPIP, GRE{
"success":true
}
POST /v2/groups/$GROUP_ID/group-delete-rule
Removes a firewall rule from the group with the specified $GROUP_ID.
{
"rule_id": "$rule_id"
}
{
"success":true
}
POST /v2/groups/$GROUP_ID/firewall
Enables / disables the firewall for the group with the specified $GROUP_ID.
{
"active": $active
}
true, false{
"success":true
}
DELETE /v2/groups/$GROUP_ID
Adds a task to delete the group with the specified $GROUP_ID.
{
"success":true
}