VPS Snapshots
Details on the VPS endpoint dealing with Snapshots
Route: /api/v2/vps/snapshot
This resource is used to manage VPS snapshots.
Method: GET - Get all VPS Volume Snapshots available
This method will pull an array of VPS volume snapshots available.
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 VPS instance. |
deviceId integer | 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/snapshot?facilityCode=$facilityCode' \
-H "X-API-KEY: $API_KEY" \
-H 'accept: application/json'
Sample Response (200)
[
{
"volumeId": "string",
"size": 0,
"snapshotId": "string",
"snapshotType": "string",
"name": "string",
"state": "string",
"createdAt": "2024-07-15T16:36:17.948Z"
}
]
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 VPS Volume Snapshot
This method will create a new VPS instance snapshot when provided with the following parameters
Parameters
Name | Description |
---|---|
clientId integer (Required for Payload) | The unique client ID associated with the VPS instance. |
facilityCode string (Required for Payload) | The facility code associated with the VPS instance. For example:TPA1 |
volumeId string (Required for Payload) | The unique VPS instance volume ID the snapshot is taken of. |
name string (Required for Payload) | The name of the VPS instance snapshot. |
X-Fields string | An optional fields mask |
Sample Request
curl -X 'POST' \
'https://core.hivelocity.net/api/v2/vps/snapshot' \
-H "X-API-KEY: $API_KEY" \
-H 'accept: application/json' \
-H 'content-type: application/json'
-d{
"volumeId": "string",
"name": "string",
"clientId": 0,
"facilityCode": "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/snapshot/<string:snapshotId>
This is a resource to manage VPS instance snapshots.
Method: GET - Get a VPS snapshot by snapshot ID
Provided with a valid facility code and VPS instance snapshot ID, this method will return the details of the specified snapshot ID.
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 VPS instance. |
X-Fields string | An optional fields mask |
snapshotId string (Required ) | The unique VPS instance snapshot ID to get details on |
Sample Request
curl -X 'GET' \
'https://core.hivelocity.net/api/v2/vps/snapshot/$snapshotId' \
-H "X-API-KEY: $API_KEY" \
-H 'accept: application/json'
Sample Response (200)
{
"size": 0,
"snapshotId": "string",
"snapshotType": "string",
"name": "string",
"createdAt": "2023-07-11T19:19:08.166Z",
"volumeId": "string",
"state": "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 - Restore a VPS volume snapshot
Provided with a valid facility code and snapshot ID, the VPS instance volume associated will be restored with the snapshot ID provided in this method.
Parameters
Name | Description |
---|---|
facilityCode string (Required for Payload) | The facility code associated with the VPS instance. For example:TPA1 |
clientId integer (Required for Payload) | The unique client ID associated with the VPS instance. |
X-Fields string | An optional fields mask |
snapshotId string (Required ) | The unique VPS instance snapshot ID to restore from |
Sample Request
curl -X 'POST' \
'https://core.hivelocity.net/api/v2/vps/snapshot/$snapshotId' \
-H "X-API-KEY: $API_KEY" \
-H 'accept: application/json' \
-H 'content-type: application/json'
-d{
"facilityCode": "string",
"clientId": 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. |
Method: DELETE - Delete a VPS volume snapshot
This method will delete a VPS instance volume snapshot when provided with the facility code and snapshot ID.
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 VPS instance. |
X-Fields string | An optional fields mask |
snapshotId string (Required) | The unique VPS instance snapshot ID to delete |
Sample Request
curl -X 'DELETE' \
'https://core.hivelocity.net/api/v2/vps/snapshot/$snapshotId' \
-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/snapshotSchedule
This is a resource to manage VPS snapshot schedules.
Provided with a valid facility code and VPS instance device ID, this method will return the array of snapshot schedules for the VPS instance provided.
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 VPS instance. |
deviceId integer (Required) | The unique device ID of the VPS instance to get snapshot schedules from |
X-Fields string | An optional fields mask |
Sample Request
curl -X 'GET' \
'https://core.hivelocity.net/api/v2/vps/snapshotSchedule?deviceId=$deviceId' \
-H "X-API-KEY: $API_KEY" \
-H 'accept: application/json'
Sample Response (200)
[
{
"day": 0,
"snapshotScheduleId": "string",
"intervalType": "string",
"maxSnapshots": 0,
"minute": 0,
"timezone": "string",
"weekday": 0,
"volumeId": "string",
"hour": 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 - Create a VPS Snapshot Schedule
This method will create a schedule for the VPS instance snapshot when provided with the following parameters
Parameters
Name | Description |
---|---|
maxSnapshots integer (Required for payload) | The maximum number of snapshots to make with this snapshot schedule |
clientId integer (Required for payload) | The unique client ID associated with the generated ISO |
minute integer (Required for payload) | The minute of the hour to run the snapshot process (Valid range: 0- 59) |
facilityCode string (Required for payload) | The facility code associated with the VPS instance. For example:TPA1 |
day integer (Required for payload) | The day of the month to start the snapshot process (Valid range: 1-28) |
volumeId string (Required for payload) | Determines whether the VPS instance ISO is bootable or not. |
weekday integer (Required for payload) | The day of the week to start the snapshot process where 1 is Monday and 7 is Sunday (Valid range: 1-7) |
hour integer (Required for payload) | The hour of the day to start the snapshot process in 24 hour format (Valid range: 0 - 23) |
intervalType string (Required for payload) | The snapshot interval options: HOURLY, DAILY, WEEKLY, MONTHLY |
timezone string (Required for payload) | The timezone to use for the snapshot schedule in IANA format. Example: America/New_York |
X-Fields string | An optional fields mask |
Sample Request
curl -X 'POST' \
'https://core.hivelocity.net/api/v2/vps/snapshotSchedule' \
-H "X-API-KEY: $API_KEY" \
-H 'accept: application/json' \
-H 'content-type: application/json'
-d{
"maxSnapshots": 0,
"clientId": 0,
"minute": 0,
"facilityCode": "string",
"day": 0,
"volumeId": "string",
"weekday": 0,
"hour": 0,
"intervalType": "string",
"timezone": "string"
}
Sample Response (200)
{
"day": 0,
"snapshotScheduleId": "string",
"intervalType": "string",
"maxSnapshots": 0,
"minute": 0,
"timezone": "string",
"weekday": 0,
"volumeId": "string",
"hour": 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/snapshotSchedule/<string:snapshotScheduleId>
This is a resource used to manage VPS snapshot schedules.
Method: GET - Get the snapshot schedule(s) for a VPS instance
When provided with a valid facility code and snapshot schedule ID, this method will return the details of the specified VPS instance snapshot schedule ID.
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 VPS instance. |
X-Fields string | An optional fields mask |
snapshotScheduleId string (Required) | The unique ID associated with the snapshot schedule |
Sample Request
curl -X 'GET' \
'https://core.hivelocity.net/api/v2/vps/snapshotSchedule/$snapshotScheduleId' \
-H "X-API-KEY: $API_KEY" \
-H 'accept: application/json'
Sample Response (200)
{
"day": 0,
"snapshotScheduleId": "string",
"intervalType": "string",
"maxSnapshots": 0,
"minute": 0,
"timezone": "string",
"weekday": 0,
"volumeId": "string",
"hour": 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: DELETE - Delete a VPS Snapshot Schedule
When provided with a valid facility code and snapshot schedule ID, this method will delete the specified VPS instance snapshot schedule ID.
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 VPS instance. |
X-Fields string | An optional fields mask |
snapshotScheduleId string (Required) | The unique ID associated with the snapshot schedule |
Sample Request
curl -X 'DELETE' \
'https://core.hivelocity.net/api/v2/vps/snapshotSchedule/$snapshotScheduleId?facilityCode=$facilityCode' \
-H "X-API-KEY: $API_KEY"
-H 'accept: application/json'
Response Codes
Code | Message |
---|---|
204 | Success |
403 | You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission. |
Updated 4 months ago