POST
/api/v1/images/import-image/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/images/import-image/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "image_name": "Window_Image_BIOS", "public_url": "https://bucket_name.objectstore.e2enetworks.net/test.img", "location": "Delhi", "os": "CentOS"}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/images/import-image/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "image_name": "Window_Image_BIOS", "public_url": "https://bucket_name.objectstore.e2enetworks.net/test.img", "location": "Delhi", "os": "CentOS", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/images/import-image/");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({ "image_name": "Window_Image_BIOS", "public_url": "https://bucket_name.objectstore.e2enetworks.net/test.img", "location": "Delhi", "os": "CentOS" }),});console.log(await response.json());This API allows users to import a custom VM image from a public object storage URL.
The image will be available under the user’s account for use with compute resources.
For genreating public url of image:
Make sure to check the prerequisites for importing an image to E2E Cloud platform.
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
image_name
required
Name to assign to the imported image
string
Example
Window_Image_BIOSpublic_url
required
Publicly accessible URL of the image file
string format: uri
Example
https://bucket_name.objectstore.e2enetworks.net/test.imglocation
required
Region in which to import the image
string
Example
Delhios
required
Operating system type of the custom image
string
Example
CentOSResponses
Section titled “Responses”default
Section titled “default”Response
Was this page helpful?