Groups

Groups are a named collection of virtual machines. Each group maps to a given set of IP addresses. If you contact support you can have a group map to a private network. More information can be found on the groups description.

Endpoints

These are relative to https://uk0.bigv.io

GET    /accounts/{account-id}/groups
GET    /accounts/{account-id}/groups/{group-id}
POST   /accounts/{account-id}/groups
PUT    /accounts/{account-id}/groups/{group-id}
DELETE /accounts/{account-id}/groups/{group-id}

# Non-nested endpoints (currently only GET)
GET    /groups
GET    /groups?account_id={account-id}
GET    /groups/{group-id}
  • Replace {account-id} with your account ID or name.
  • Replace {group-id} with the group ID or name.

Deletes will fail if the group is not empty (i.e., has Cloud Servers in it).


Attributes

  • id – unique key (integer).
  • account_id – ID of the account this group belongs to.
  • name – group name.

Examples

All Groups

Request
GET /accounts/{account-id}/groups/

# New style
GET /groups?account_id={account-id}
Curl
curl -H "Content-type: application/json" \
     -H "Authorization: Bearer {session-id}" \
     https://uk0.bigv.io/accounts/myaccountname/groups
Response (success: 200)
[
  {
    "account_id": 1,
    "id": 1,
    "name": "default"
  }
]

Single Group

Request
GET /accounts/{account-id}/groups/{group-id}

# New style
GET /groups/{group-id}
Curl
curl -H "Content-type: application/json" \
     -H "Authorization: Bearer {session-id}" \
     https://uk0.bigv.io/accounts/myaccountname/groups/1
Response (success: 200)
{
  "account_id": 1,
  "id": 1,
  "name": "default"
}

Create New Group

Request
POST /accounts/{account-id}/groups
Curl
curl -H "Content-type: application/json" \
     -H "Authorization: Bearer {session-id}" \
     -X POST \
     -d '{"name":"mynewgroup"}' \
     https://uk0.bigv.io/accounts/myaccountname/groups
Response (success: 200)
{
  "account_id": 3,
  "id": 5,
  "name": "mynewgroup"
}

Update Group

Request
PUT /accounts/{account-id}/groups/{group-id}
Curl
curl -H "Content-type: application/json" \
     -H "Authorization: Bearer {session-id}" \
     -X PUT \
     -d '{"name":"mynewgroupname"}' \
     https://uk0.bigv.io/accounts/myaccountname/groups/5

Response (success: 200)

{
  "account_id": 3,
  "id": 5,
  "name": "mynewgroupname"
}

Delete Group

Request
DELETE /accounts/{account-id}/groups/{group-id}
Curl
curl -H "Content-type: application/json" \
     -H "Authorization: Bearer {session-id}" \
     -X DELETE \
     https://uk0.bigv.io/accounts/myaccountname/groups/5
Response (success: 204)
Updated on May 22, 2019

Was this article helpful?

Related Articles

Have you tried Kubernetes?
Kubernetes (K8s) is helping enterprises to ship faster & scale their business. Sounds good? Let us build a K8s solution for your needs.
Register your interest