REST - Groups

Listing groups

Query

POST /v2/groups

Returns an array with a list of existing groups.

Response

{
    "success":true,
    "groups":[
        {
            "id":"$group_id",
            "name":"$group_name",
            "owner":{
                "id":"$owner_id",
                "name":"$owner_name",
            },
            "members":[
            
            ],
            "virtual_machines":[
            
            ],
            "permisions":{
                "global":[
                
                ],
                "vm":[
                
                ]
            }
        }, { ... }
    ]
}

Returned information

  • $group_id (string) - UUID of the group
  • $group_name (string) - name of the group
  • $owner_id (string) - UUID of the group owner
  • $owner_name (string) - name of the group owner


Retrieving group information

Query

POST /v2/groups/$GROUP_ID

Returns information about a single group with the specified $GROUP_ID.

Response

{
    "success":true,
    "group":
    {
        "id":"$group_id",
        "name":"$group_name",
        "owner":{
            "id":"$owner_id",
            "name":"$owner_name",
        },
        "members":[
        
        ],
        "virtual_machines":[
        
        ],
        "permisions":{
            "global":[
            
            ],
            "vm":[
            
            ]
        }
    }
}

Returned information

  • $group_id (string) - UUID of the group
  • $group_name (string) - name of the group
  • $owner_id (string) - UUID of the group owner
  • $owner_name (string) - name of the group owner


Adding a user to a group

Query

POST /v2/groups/$GROUP_ID/group-attach-user

Adds a user to a group with the specified $GROUP_ID.

Request content

{ 
  "id" : $user_id
}

Adding a user to a group

  • $user_id (string) - UUID of the user

Response

{  
  "success":true
}


Adding a server to a group

Query

POST /v2/groups/$GROUP_ID/group-attach-vm

Add a server to a group with the specified $GROUP_ID.

Request content

{ 
  "id" : $vm_id
}

Parameter description

  • $vm_id (string) - UUID of the server

Response

{  
  "success":true
}


Removing a user from a group

Query

POST /v2/groups/$GROUP_ID/group-detach-user

Adds a task to remove a user from a group with the specified $GROUP_ID.

Request content

{ 
  "id" : $user_id
}

Parameter description

  • $user_id (string) - UUID of the user

Response

{  
  "success":true
}


Removing a server from a group

Query

POST /v2/groups/$GROUP_ID/group-detach-vm

Adds a task to remove a server from a group with the specified $GROUP_ID.

Request content

{ 
  "id" : $vm_id
}

Parameter description

  • $vm_id (string) - UUID of the server

Response

{  
  "success":true
}


Deleting a group

Query

DELETE  /v2/groups/$GROUP_ID

Adds a task to delete a group with the specified $GROUP_ID.

Response

{  
  "success":true
}