An image is required for creating an IDrive® Compute instance. IDrive® Compute provides images in the form of standard distributions and application stacks. Instance snapshots and backups are also stored as images. You can create/upload a custom image as well.
List of Images
GET |
https://la3.images.api.idrivecompute.io/v2/images |
Authorizations |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -X GET \ https://la3.images.api.idrivecompute.io/v2/images
Response Samples
{ "images": [ { "image_state": "available", "container_format": "bare", "min_ram": 0, "updated_at": "2022-10-09T05:06:24Z", "boot_roles": "reader,member,creator", "file": "/v2/images/b87a0bdc-e76f-4140-8739-b98e0d8bedd4/file", "owner": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "b87a0bdc-e76f-4140-8739-b98e0d8bedd4", "size": 1656873472, "user_id": "191931bc755f410784fe42594c8e588d", "image_type": "backup", "self": "/v2/images/b87a0bdc-e76f-4140-8739-b98e0d8bedd4", "disk_format": "qcow2", "os_hash_algo": "sha512", "base_image_ref": "b8d917df-e706-4a65-84e6-c17c868e19b4", "owner_project_name": "john_smith", "owner_id": "b88176b3de3f4771aa183e8bd7e1edc7", "status": "active", "image_location": "snapshot", "tags": [], "hw_qemu_guest_agent": "yes", "visibility": "private", "owner_user_name": "TvLW9TvrZbOhrzJ8CmmY", "min_disk": 60, "virtual_size": null, "instance_uuid": "496880cc-f3ec-4b70-b5d1-2d6cb4c72ffd", "name": "CentOS8Stream-SCPU-2GB-LA3-1-backup", "checksum": "70322483b660e5ec7782fd64403a28ac", "created_at": "2022-10-09T05:04:26Z", "os_hidden": false, "backup_type": "daily", "protected": false, "os_hash_value": "5a4bfbca44", "schema": "/v2/schemas/image" }, { "container_format": "bare", "min_ram": 0, "updated_at": "2022-09-28T07:20:55Z", "file": "/v2/images/6a5a789e-18a9-4766-8c69-43ff79017367/file", "owner": "b7e277b7d53449f9941b9ea61cae99e3", "id": "6a5a789e-18a9-4766-8c69-43ff79017367", "size": 1010761728, "self": "/v2/images/6a5a789e-18a9-4766-8c69-43ff79017367", "disk_format": "qcow2", "os_hash_algo": "sha512", "schema": "/v2/schemas/image", "status": "active", "tags": [ "application_stack" ], "hw_qemu_guest_agent": "yes", "visibility": "public", "min_disk": 0, "virtual_size": null, "name": "OpenVPN-Ubuntu-20.04 LTS-x86_64", "checksum": "dc8c4e6360fbdec5663a3041dbe8dd32", "created_at": "2022-09-28T07:20:14Z", "os_hidden": false, "protected": false, "os_hash_value": "f5f36c8fbb9e79268" } ], "next": "/v2/images?marker=6a5a789e-18a9-4766-8c69-43ff79017367&limit=2", "schema": "/v2/schemas/images", "first": "/v2/images?limit=2" }
Create Image
Image creation is a two-step process where an image object is created first and then the image file is uploaded.
Image object
POST |
https://la3.images.api.idrivecompute.io/v2/images |
Authorizations |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -H "Content-Type: application/json" \ -X POST \ -d "{ "container_format": "bare", "disk_format": "qcow2", "name": "My-Ubuntu",
"visibility": "private"
}" \ https://la3.images.api.idrivecompute.io/v2/images
Response Samples
Upon successful request, it creates an image object in the queued
state. TheLocation
response header contains the URI for the image.
{ "container_format": "bare", "min_ram": 0, "updated_at": "2022-10-10T08:49:31Z", "file": "/v2/images/cd5fc6e3-e35a-4386-977f-9d26711912c5/file", "owner": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "cd5fc6e3-e35a-4386-977f-9d26711912c5", "size": null, "self": "/v2/images/cd5fc6e3-e35a-4386-977f-9d26711912c5", "disk_format": "qcow2", "os_hash_algo": null, "schema": "/v2/schemas/image", "status": "queued", "tags": [], "visibility": "private", "min_disk": 0, "virtual_size": null, "name": "My-Ubuntu", "checksum": null, "created_at": "2022-10-10T08:49:31Z", "os_hidden": false, "protected": false, "os_hash_value": null }
Uploading a file into an image object
POST |
https://la3.images.api.idrivecompute.io/v2/images |
Authorizations |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -X PUT \ -H "Content-Type: application/octet-stream" \ --data-binary ${BINARY_FILE} http://la3.images.api.idrivecompute.io/v2/images /cd5fc6e3-e35a-4386-977f-9d26711912c5/file
Response Samples
The response is empty and returns the HTTP 204 response code in the case of a successful request.
View Image
GET |
https://la3.images.api.idrivecompute.io/v2/images/{image_id} |
Authorizations |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN} \ -X GET \ https://la3.images.api.idrivecompute.io/v2/images/ 056ed3c5-b996-4039-9a63-5d928fc2ee64
Response Samples
{ "image_state": "available", "container_format": "bare", "min_ram": 0, "updated_at": "2022-10-10T08:25:58Z", "boot_roles": "reader,member,creator,nova_forced_host", "file": "/v2/images/056ed3c5-b996-4039-9a63-5d928fc2ee64/file", "owner": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "056ed3c5-b996-4039-9a63-5d928fc2ee64", "size": 1770455040, "user_id": "e28a6c3017d64ea0bcc7f02d30927f91", "image_type": "snapshot", "self": "/v2/images/056ed3c5-b996-4039-9a63-5d928fc2ee64", "disk_format": "qcow2", "os_hash_algo": "sha512", "clean_attempts": "1", "owner_project_name": "john_smith", "owner_id": "b88176b3de3f4771aa183e8bd7e1edc7", "status": "active", "image_location": "snapshot", "tags": [], "hw_qemu_guest_agent": "yes", "visibility": "private", "owner_user_name": "john_smith", "min_disk": 40, "virtual_size": null, "instance_uuid": "a0267171-6327-4dba-a5e9-583cc9256478", "name": "My New Image", "checksum": "e0ffc7d0febb48353adf85601c54128f", "created_at": "2022-07-01T02:45:04Z", "os_hidden": false, "protected": false, "os_hash_value": "e7639a70a500d13147e89a8d79c9c78a", "schema": "/v2/schemas/image" }
Update Image
PATCH |
https://la3.images.api.idrivecompute.io/v2/images/{image_id} |
Authorizations |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN} \ -H "Content-Type: application/openstack-images-v2.1-json-patch" -X PATCH \ -d "[ { "op": "add", "path": "/name", "value": "My New Image" } ]" \ https://la3.images.api.idrivecompute.io/v2/images/ 056ed3c5-b996-4039-9a63-5d928fc2ee64
Response Samples
{ "image_state": "available", "container_format": "bare", "min_ram": 0, "updated_at": "2022-10-10T08:25:58Z", "boot_roles": "reader,member,creator,nova_forced_host", "file": "/v2/images/056ed3c5-b996-4039-9a63-5d928fc2ee64/file", "owner": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "056ed3c5-b996-4039-9a63-5d928fc2ee64", "size": 1770455040, "user_id": "e28a6c3017d64ea0bcc7f02d30927f91", "image_type": "snapshot", "self": "/v2/images/056ed3c5-b996-4039-9a63-5d928fc2ee64", "disk_format": "qcow2", "os_hash_algo": "sha512", "clean_attempts": "1", "owner_project_name": "john_smith", "owner_id": "b88176b3de3f4771aa183e8bd7e1edc7", "status": "active", "image_location": "snapshot", "tags": [], "hw_qemu_guest_agent": "yes", "visibility": "private", "owner_user_name": "john_smith", "min_disk": 40, "virtual_size": null, "instance_uuid": "a0267171-6327-4dba-a5e9-583cc9256478", "name": "My New Image", "checksum": "e0ffc7d0febb48353adf85601c54128f", "created_at": "2022-07-01T02:45:04Z", "os_hidden": false, "protected": false, "os_hash_value": "e7639a70a500d13147e89a8d79e", "schema": "/v2/schemas/image" }
Delete Image
DELETE |
https://la3.images.api.idrivecompute.io/v2/images/{image_id} |
Authorizations |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -X DELETE \ https://la3.images.api.idrivecompute.io/v2/images/ 341e7365-6c72-4995-a2bd-9f5c344f7350
Response Samples
The response is empty and returns the HTTP 204 response code in the case of a successful request.