VPS ISO and Volume Operations

Hivelocity VPS endpoint details

Route: /api/v2/vps/volume

This resource is used to manage VPS instance volumes.

This method is used to pull VPS volume information provided a valid VPS 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 VPS instance. For example:TPA1
clientId integerThe unique client ID associated with the VPS instance
deviceId integer (Required if facilityCode is not provided)The unique device ID of the VPS 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 VPS 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 VPS 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 VPS
Available sizes: 50, 100, 200, 500
deviceId integer (Required in Payload)The unique VPS 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 uptions for specified volume IDs.

This method is used to pull VPS volume upgrade information from a specified volume provided a valid VPS 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 VPS instance volumes.

This method is used to pull VPS volume information from a specified volume provided a valid VPS 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 VPS 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 VPS
deviceId integer (Required in Payload)The unique VPS 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 VPS 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 VPS 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 VPS 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 VPS 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 VPS 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 VPS 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 VPS 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 VPS 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 VPS 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 VPS 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 VPS instance.

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

Parameters

NameDescription
isoId string (Required in Payload)The unique ID of the VPS instance ISO
X-Fields stringAn optional fields mask
deviceId integer (Required)The unique device ID of the VPS 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 VPS instances that already have an ISO attached to them.

Provided a VPS instance device ID that has an attached ISO, this method will detach an already attached ISO from the specified VPS 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 VPS 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