Virtual server ISO and Volume Operations

Hivelocity Virtual server endpoint details

Route: /api/v2/vps/volume

This resource is used to manage Virtual server instance volumes.

This method is used to pull Virtual server volume information provided a valid Virtual server instance device ID and/or facility code are provided and the requestor has sufficient access rights.

Parameters

NameDescription
facilityCode string (Required if deviceId is not provided)The facility code associated with the Virtual server instance. For example:TPA1
clientId integerThe unique client ID associated with the Virtual server instance
deviceId integer (Required if facilityCode is not provided)The unique device ID of the Virtual server instance to detach the ISO from
X-Fields stringAn optional fields mask

Sample Request

curl -X 'GET' \
  'https://core.hivelocity.net/api/v2/vps/volume?deviceId=$deviceId' \
  -H "X-API-KEY: $API_KEY" \
  -H 'accept: application/json'

Sample Response (200)

[
  {
    "size": 0,
    "type": "string",
    "createdAt": "2023-07-11T17:44:08.771Z",
    "volumeId": "string",
    "deviceId": 0
  }
]

Response Codes

CodeMessage
200Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

Method: POST - Creates a new volume

Provided with a valid Virtual server instance device ID and the volume size in GB to be created, this method will create a raw volume with the specified size on the Virtual server instance ID specified.

❗️

Warning: This endpoint incurs charges. The volume will be billed monthly regardless of the attached device's billing cycle length.

Parameters

NameDescription
size integer (Required in Payload)The disk size in GB to be created on the Virtual server
Available sizes: 50, 100, 200, 500
deviceId integer (Required in Payload)The unique Virtual server instance device ID to attach the disk to
X-Fields stringAn optional fields mask

Sample Request

curl -X 'POST' \
  'https://core.hivelocity.net/api/v2/vps/volume' \
  -H "X-API-KEY: $API_KEY" \
  -H 'accept: application/json' \
  -H 'content-type: application/json'
  -d{
  "size": 0,
  "deviceId": 0
}

Sample Response (201)

{
  "result": "string",
  "metaData": "string",
  "taskId": "string",
  "taskCreated": {},
  "deviceId": 0,
  "taskUpdated": {},
  "clientId": 0
}

Response Codes

CodeMessage
201Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

Route: /api/v2/vps/volume/<string:volumeId>/available-sizes>

This resource is used to pull available upgrade options for specified volume IDs.

This method is used to pull Virtual server volume upgrade information from a specified volume provided a valid Virtual server instance volume ID is provided and the requestor has sufficient access rights.

Parameters

NameDescription
volumeId string (Required in path)The unique volume ID to pull upgrade options for
X-Fields stringAn optional fields mask

Sample Request

curl -X 'GET' \
  'https://core.hivelocity.net/api/v2/vps/volume/$volumeId/available-sizes' \
  -H 'accept: application/json' \
  -H "X-API-KEY: $API_KEY"

Sample Response (200)

{
  "volumeProducts": [
    {
      "size": 0,
      "monthlyPrice": 0
    }
  ]
}

Response Codes

CodeMessage
200Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

Route: /api/v2/vps/volume/<string:volumeId>

This resource is used to manage particular Virtual server instance volumes.

This method is used to pull Virtual server volume information from a specified volume provided a valid Virtual server instance volume ID is provided and the requestor has sufficient access rights.

Parameters

NameDescription
volumeId string (Required)The volume ID to pull details for
X-Fields stringAn optional fields mask

Sample Request

curl -X 'GET' \
  'https://core.hivelocity.net/api/v2/vps/volume/$volumeId' \
  -H "X-API-KEY: $API_KEY" \
  -H 'accept: application/json'

Sample Response (200)

{
  "deviceId": 0,
  "size": 0,
  "type": "string",
  "volumeId": "string",
  "createdAt": "2023-09-12T13:55:12.341Z"
}

Response Codes

CodeMessage
200Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

Method: PUT - Resize a volume

Provided with a valid size and Virtual server device ID in the payload, this method will resize a volume. NOTE, volumes may only be made larger and not smaller Use the method here to find available options for your volume to be resized to: Get a volume's list of upgradable sizes

❗️

Warning: This endpoint incurs charges.

Parameters

NameDescription
size integer (Required in Payload)The disk size in GB to be created on the Virtual server
deviceId integer (Required in Payload)The unique Virtual server instance device ID the volume is attached to
volumeId string (Required in path)The Volume Id to be resized
X-Fields stringAn optional fields mask

Sample Request

curl -X 'PUT' \
  'https://core.hivelocity.net/api/v2/vps/volume/$volumeId' \
  -H 'accept: application/json' \
  -H "X-API-KEY: $API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "size": 0,
  "deviceId": 0
}'

Sample Response (201)

{
  "deviceId": 0,
  "clientId": 0,
  "taskUpdated": {},
  "taskCreated": {},
  "result": "string",
  "taskId": "string",
  "metaData": "string"
}

Response Codes

CodeMessage
201Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

Method: DELETE - Deletes a volume

Provided with a valid Virtual server device ID in the payload, this method will delete a volume providing the requestor has sufficient access rights.

❗️

Warning: This will cancel the monthly billing service for this volume

Parameters

NameDescription
deviceId integer (Required in Payload)The unique Virtual server instance device ID the volume is attached to
volumeId string (Required in path)The Volume Id to be deleted
X-Fields stringAn optional fields mask

Sample Request

curl -X 'DELETE' \
  'https://core.hivelocity.net/api/v2/vps/volume/$volumeId' \
  -H 'accept: application/json' \
  -H "X-API-KEY: $API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "deviceId": 0
}'

Sample Response (201)

{
  "deviceId": 0,
  "clientId": 0,
  "taskUpdated": {},
  "taskCreated": {},
  "result": "string",
  "taskId": "string",
  "metaData": "string"
}

Response Codes

CodeMessage
201Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

Route: /api/v2/vps/iso/

This resource is used to manage Virtual server ISOs.

Provided a valid facility code and ISO ID, this method will return all available ISOs.

Parameters

NameDescription
facilityCode string (Required)The facility code associated with the Virtual server instance. For example:TPA1
clientId integerThe unique client ID associated with the generated ISO
X-Fields stringAn optional fields mask

Sample Request

curl -X 'GET' \
  'https://core.hivelocity.net/api/v2/vps/iso?facilityCode=$facilityCode \
  -H "X-API-KEY: $API_KEY" \
  -H 'accept: application/json'

Sample Response (200)

[
  {
    "bootable": true,
    "description": "string",
    "url": "string",
    "name": "string",
    "size": 0,
    "status": "string",
    "ready": true,
    "isoId": "string"
  }
]

Response Codes

CodeMessage
200Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

Method: POST - Create a new ISO

Provided a payload with the ISO details, this method will create a new ISO

Parameters

NameDescription
facilityCode string (Required in the payload)The facility code associated with the Virtual server instance. For example:TPA1
clientId integerThe unique client ID associated with the generated ISO
bootable string (Required in the payload)Indicates if this ISO is bootable or not (True/False)
description string (Required in the payload)The description of the ISO
url string (Required in the payload)The URL where the ISO can be downloaded at
name string (Required in the payload)The name of the ISO
X-Fields stringAn optional fields mask

Sample Request

curl -X 'POST' \
  'https://core.hivelocity.net/api/v2/vps/iso' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: $API-KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "facilityCode": "string",
  "bootable": true,
  "clientId": 0,
  "description": "string",
  "url": "string",
  "name": "string"
}'

Sample Response (200)

  "bootable": true,
  "description": "string",
  "url": "string",
  "name": "string",
  "size": 0,
  "status": "string",
  "ready": true,
  "isoId": "string"
}

Response Codes

CodeMessage
200Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

ISO in myV:

Route: /api/v2/vps/iso/<string:isoId>

This resource is used to manage Virtual server ISOs.

Provided a valid facility code and ISO ID, this method will return details for the ISO specified.

Parameters

NameDescription
facilityCode stringThe facility code associated with the Virtual server instance. For example:TPA1
clientId integerThe unique client ID associated with the generated ISO
X-Fields stringAn optional fields mask
isoId string (Required)The unique ID of the Virtual server instance ISO

Sample Request

curl -X 'GET' \
  'https://core.hivelocity.net/api/v2/vps/iso/$isoId' \
  -H "X-API-KEY: $API_KEY" \
  -H 'accept: application/json'

Sample Response (200)

{
  "description": "string",
  "size": 0,
  "bootable": true,
  "isoId": "string",
  "name": "string",
  "url": "string",
  "ready": true,
  "status": "string"
}

Response Codes

CodeMessage
200Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

Method: DELETE - Delete an ISO

Provided a valid facility code and ISO ID, this method will delete the ISO specified as long as the requestor has sufficient access rights.

Parameters

NameDescription
facilityCode stringThe facility code associated with the Virtual server instance. For example:TPA1
clientId integerThe unique client ID associated with the generated ISO
X-Fields stringAn optional fields mask
isoId string (Required)The unique ID of the Virtual server instance ISO to be deleted

Sample Request

curl -X 'DELETE' \
  'https://core.hivelocity.net/api/v2/vps/iso/$isoId?facilityCode=$facilityCode' \
  -H "X-API-KEY: $API_KEY" \
  -H 'accept: application/json'

Sample Response (201)

{
  "result": "string",
  "metaData": "string",
  "taskId": "string",
  "taskCreated": {},
  "deviceId": 0,
  "taskUpdated": {},
  "clientId": 0
}

Response Codes

CodeMessage
201Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

Route: /api/v2/vps/<int:deviceId>/attachiso

This ISO management resource is used to attach ISOs to the Virtual server instance.

Provided a valid ISO ID and Virtual server instance device ID, this method will attach the specified ISO to the specified Virtual server instance as long as the requestor has sufficient access rights.

Parameters

NameDescription
isoId string (Required in Payload)The unique ID of the Virtual server instance ISO
X-Fields stringAn optional fields mask
deviceId integer (Required)The unique device ID of the Virtual server instance to attach the ISO to.

Sample Request

curl -X 'POST' \
  'https://core.hivelocity.net/api/v2/vps/$deviceId/attachiso' \
  -H "X-API-KEY: $API_KEY" \
  -H 'accept: application/json' \
  -H 'content-type: application/json'
  -d{
  "isoId": "string"
}

Sample Response (201)

{
  "result": "string",
  "metaData": "string",
  "taskId": "string",
  "taskCreated": {},
  "deviceId": 0,
  "taskUpdated": {},
  "clientId": 0
}

Response Codes

CodeMessage
201Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

Route: /api/v2/vps/<int:deviceId>/detachiso

This ISO management resource is used to detached ISOs from Virtual server instances that already have an ISO attached to them.

Provided a Virtual server instance device ID that has an attached ISO, this method will detach an already attached ISO from the specified Virtual server instance as long as the requestor has sufficient access rights.

Parameters

NameDescription
X-Fields stringAn optional fields mask
deviceId integer (Required)The unique device ID of the Virtual server instance to detach the ISO from

Sample Request

curl -X 'POST' \
  'https://core.hivelocity.net/api/v2/vps/$deviceId/detachiso' \
  -H "X-API-KEY: $API_KEY" \
  -H 'accept: application/json'

Sample Response (201)

{
  "result": "string",
  "metaData": "string",
  "taskId": "string",
  "taskCreated": {},
  "deviceId": 0,
  "taskUpdated": {},
  "clientId": 0
}

Response Codes

CodeMessage
201Success
403You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.

What’s Next