POST
/api/v1/block_storage/import/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/block_storage/import/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "name": "test-volume", "size": 250, "iops": 5000, "path_url": "https://objectstore.e2enetworks.net/test-volume/vol-11.raw"}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/block_storage/import/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "name": "test-volume", "size": 250, "iops": 5000, "path_url": "https://objectstore.e2enetworks.net/test-volume/vol-11.raw", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/block_storage/import/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "name": "test-volume", "size": 250, "iops": 5000, "path_url": "https://objectstore.e2enetworks.net/test-volume/vol-11.raw" }),});console.log(await response.json());Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID Find your project id here
location
required
string
Deployment region for the resource. Accepted values: Delhi, Chennai.
Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
Name of the volume image.
string
Example
test-volumesize
required
Size of the volume image in GB.
integer
Example
250iops
required
Input/output operations per second for the volume image.
integer
Example
5000path_url
required
URL of the Volume image. Currently, only raw format is allowed.
string format: uri
Example
https://objectstore.e2enetworks.net/test-volume/vol-11.rawResponses
Section titled “Responses”Volume imported successfully
Media typeapplication/json
object
code
integer
data
object
id
integer
image_name
string
resource_type
string
label_id
integer
errors
object
message
string
Example
{ "code": 200, "data": { "id": 31937, "image_name": "meghna" }, "errors": {}, "message": "Success"}