VPS ISO and Volume Operations
Hivelocity VPS endpoint details
Route: /api/v2/vps/volume
This resource is used to manage VPS instance volumes.
Method: GET - Get all VPS Instance volumes available.
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
Name | Description |
---|---|
facilityCode string (Required if deviceId is not provided) | The facility code associated with the VPS instance. For example:TPA1 |
clientId integer | The 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 string | An 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
Code | Message |
---|---|
200 | Success |
403 | You 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
Name | Description |
---|---|
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 string | An 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
Code | Message |
---|---|
201 | Success |
403 | You 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.
Method: GET - Get a VPS Instance Volume
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
Name | Description |
---|---|
volumeId string (Required in path) | The unique volume ID to pull upgrade options for |
X-Fields string | An 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
Code | Message |
---|---|
200 | Success |
403 | You 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.
Method: GET - Get a VPS Instance Volume
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
Name | Description |
---|---|
volumeId string (Required) | The volume ID to pull details for |
X-Fields string | An 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
Code | Message |
---|---|
200 | Success |
403 | You 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
Name | Description |
---|---|
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 string | An 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
Code | Message |
---|---|
201 | Success |
403 | You 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
Name | Description |
---|---|
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 string | An 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
Code | Message |
---|---|
201 | Success |
403 | You 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.
Method: GET - Get all VPS ISOs available
Provided a valid facility code and ISO ID, this method will return all available ISOs.
Parameters
Name | Description |
---|---|
facilityCode string (Required) | The facility code associated with the VPS instance. For example:TPA1 |
clientId integer | The unique client ID associated with the generated ISO |
X-Fields string | An 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
Code | Message |
---|---|
200 | Success |
403 | You 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
Name | Description |
---|---|
facilityCode string (Required in the payload) | The facility code associated with the VPS instance. For example:TPA1 |
clientId integer | The 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 string | An 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
Code | Message |
---|---|
200 | Success |
403 | You 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.
Method: GET - Get the details of the VPS ISO ID specified
Provided a valid facility code and ISO ID, this method will return details for the ISO specified.
Parameters
Name | Description |
---|---|
facilityCode string | The facility code associated with the VPS instance. For example:TPA1 |
clientId integer | The unique client ID associated with the generated ISO |
X-Fields string | An 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
Code | Message |
---|---|
200 | Success |
403 | You 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
Name | Description |
---|---|
facilityCode string | The facility code associated with the VPS instance. For example:TPA1 |
clientId integer | The unique client ID associated with the generated ISO |
X-Fields string | An 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
Code | Message |
---|---|
201 | Success |
403 | You 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.
Method: POST - Attach ISO to 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
Name | Description |
---|---|
isoId string (Required in Payload) | The unique ID of the VPS instance ISO |
X-Fields string | An 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
Code | Message |
---|---|
201 | Success |
403 | You 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.
Method: POST - Detach ISO from a VPS instance
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
Name | Description |
---|---|
X-Fields string | An 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
Code | Message |
---|---|
201 | Success |
403 | You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission. |
Updated about 1 year ago