Volumes¶
E2E Networks Block storage API will help you to create, update and Delete Block storage
Create an API Key and access token:-¶
For create a API Key and Access Token to refer this link :-
https://www.e2enetworks.com/help/knowledge-base/how-to-create-an-api-access-token/
List of Block Storages:-¶
To find a list of Block Storages to send a GET request:-
https://api.e2enetworks.com/myaccount/api/v1/block_storage/?apikey=10a6b7cb-b05d-45cd-b347-78388381633b&location=Delhi
The request returns a JSON object that contains the following attributes:
Name | Type | Description |
---|---|---|
name | string | The name assigned to the block storage. |
vm_id | Integer | A unique integer identifier created and assigned to the block storage after its creation. |
vm_name | string | The name assigned to the block storage. |
block_id | Integer | A unique integer identifier created and assigned to the block storage after its creation. |
created_on | integer | A string represents both the date and time when the block storage is created. |
status | string | A string that denotes the type: “Attached†or “Detached†|
size | integer | An integer denotes the size of block storage. |
Headers¶
Request Headers¶
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
Response Headers:-¶
content-type: application/json; charset=utf-8
status: 202 Accepted
Body¶
Response Body¶
{
"code": 200,
"data": [
{
"block_id": 7966,
"name": "BS_250GB_446",
"size": 256000,
"status": "Attached",
"template": {
"DEV_PREFIX": "vd",
"DRIVER": "raw",
"TOTAL_IOPS_SEC": "3750"
},
"vm_detail": {
"vm_id": 100157,
"vm_name": "SDC-8-45GB-CentOS-8-0-390",
"all_action_disabled": false
},
"created_on": "2022-03-07T10:01:04Z"
}
],
"errors": {},
"message": "Success"
}
Create a Block Storage¶
To Create a new Block Storage to send a Post request
https://api.e2enetworks.com/myaccount/api/v1/block_storage/?apikey=10a6b7cb-b05d-45cd-b347-78388381633b&location=Delhi
Attributes and respective values required to send this POST request are:
Name | Type | Description | Required |
---|---|---|---|
name | string | The name assigned to the block storage. | True |
iops | integer | A unique integer identifier assigned to the block storage its creation. | True |
size | Integer | An integer denotes the size of block storage. | True |
The request returns a JSON object that contains the following attributes:
Name | Type | Description |
---|---|---|
image_name | string | The name assigned to the block storage after its creation. |
block_storage_id | Integer | A unique integer identifier created and assigned to the block storage after its creation. |
Delete a Block Storage¶
To Delete a Block Storage to send a Delete request
https://api.e2enetworks.com/myaccount/api/v1/block_storage/7966/?apikey=10a6b7cb-b05d-45cd-b347-78388381633b&location=Delhi
The request returns a JSON object that contains the following attributes:
Name | Type | Description |
---|---|---|
image_name | string | The name assigned to the block storage after its creation. |
image_id | Integer | A unique integer identifier created and assigned to the block storage after its creation. |
Attach Block Storage from Node¶
To Attach a Block Storage from Node to send a Post request:-
https://api.e2enetworks.com/myaccount/api/v1/block_storage/7966/vm/attach/?apikey=10a6b7cb-b05d-45cd-b347-78388381633b&location=Delhi
Attributes and respective values required to send this POST request are:
Name | Type | Description | Required |
---|---|---|---|
vm_id | Integer | A unique integer identifier created and assigned to the node after its creation. | True |
The request returns a JSON object that contains the following attributes:
Name | Type | Description |
---|---|---|
vm_id | integer | A unique integer identifier created and assigned to the node after its creation. |
image_id | Integer | A unique integer identifier created and assigned to the block storage after its creation. |
Detach Block Storage from Node¶
To Detach a Block Storage from Node to send a Post request
https://api.e2enetworks.com/myaccount/api/v1/block_storage/7966/vm/detach/?apikey=10a6b7cb-b05d-45cd-b347-78388381633b
Attributes and respective values required to send this POST request are:
Name | Type | Description | Required |
---|---|---|---|
vm_id | Integer | A unique integer identifier created and assigned to the node after its creation. | True |
The request returns a JSON object that contains the following attributes:
Name | Type | Description |
---|---|---|
vm_id | integer | A unique integer identifier created and assigned to the node after its creation. |
image_id | Integer | A unique integer identifier created and assigned to the block storage after its creation. |
Create a Snapshots¶
To Create a snapshots to send a Post request:-
https://api.e2enetworks.com/myaccount/api/v1/block_storage/7966/snapshot/?apikey=10a6b7cb-b05d-45cd-b347-78388381633b&location=Delhi
Attributes and respective values required to send this POST request are:
Name | Type | Description | Required |
---|---|---|---|
name | string | A string provides the name. | True |
The request returns a JSON object that contains the following attributes:
Name | Type | Description |
---|---|---|
snapshort_id | integer | A unique integer identifier created and assigned to the block storage after its taking the snapshot. |
image_id | Integer | A unique integer identifier created and assigned to the block storage after its creation. |
Create a Block Storage through Snapshots¶
To Create a Block storage to send a Post request:-
https://api.e2enetworks.com/myaccount/api/v1/block_storage/7972/restore/?apikey=10a6b7cb-b05d-45cd-b347-78388381633b&location=Delhi
Attributes and respective values required to send this POST request are:
Name | Type | Description | Required |
---|---|---|---|
vm_id | Integer | A unique integer identifier created and assigned to the node after its creation. | True |
name | string | The name assigned to the block storage. | True |
iops | integer | A unique integer identifier assigned to the block storage its creation. | True |
snapshort_id | integer | A unique integer identifier created and assigned to the block storage after its taking the snapshot. | True |
List of Snapshots¶
To find a list of snapshots to send a Post request:-
https://api.e2enetworks.com/myaccount/api/v1/block_storage/7972/snapshot/?apikey=10a6b7cb-b05d-45cd-b347-78388381633b&location=Delhi
Name | Type | Description |
---|---|---|
snapshort_id | integer | A unique integer identifier created and assigned to the block storage after its taking the snapshot. |
snapshot_name | string | The name assigned to the snapshot when its created. |
size | integer | An integer denotes the size of block storage. |
created_date | integer | A string represents both the date and time when the block storage is created. |
Headers¶
Request Headers¶
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
Response Headers:-¶
content-type: application/json; charset=utf-8
status: 202 Accepted
Body¶
Response Body¶
{
"code": 200,
"data": [
{
"snapshot_id": 0,
"snapshot_name": "snapshot-537",
"size": 256000,
"create_date": "2022-03-07T12:02:53Z"
},
{
"snapshot_id": 1,
"snapshot_name": "snapshot-479",
"size": 256000,
"create_date": "2022-03-07T12:03:20Z"
},
],
"errors": {},
"message": "Success"
}
Delete Snapshots¶
To Delete a snapshots to send a Delete request
https://api.e2enetworks.com/myaccount/api/v1/block_storage/7972/snapshot/2?apikey=10a6b7cb-b05d-45cd-b347-78388381633b&location=Delhi