Custom images
Create Disk Image
Creates a new disk image entry, processes the logo directly, and provides a pre-signed URL only for uploading the disk image
Request
The request is a multipart/form-data
to support file upload
{
"name": string,
"distribution": string,
"version": string,
"os": string,
"region": string,
"image_sha256": string,
"image_md5": string,
"logo_base64": string,
"image_size": number
}
name
- (required) Name of the disk image
distribution
- (required) Operating system distribution (e.g. ubuntu
, centos
)
version
- (required) Version of the operating system
os
- (optional) Operating system type. Defaults to linux
. Supports windows
and linux
region
- (optional) The region where the image will be available
image_sha256
- (required) SHA256 checksum of the disk image
image_md5
- (required) MD5 checksum of the diskimage
logo_base64
- (optional) The logo SVG file uploaded as a base64 encoded string
image_size
- (required) The size of images in bytes
Response
{
"id": "cddfc9f4-ed69-48b9-94eb-18dd0f8234f8",
"name": "my-new-image",
"distribution": "ubuntu",
"version": "22.04",
"os": "linux",
"region": "LON1",
"status": "upload_pending",
"disk_image_url": "https://objectstore.civo.com/-/disk.img/presigned_url_for user_to_upload",
"logo_url": "https://objectstore.civo.com/-/logo.svg",
"image_size": 2346823089
}
cURL
curl -X POST https://api.civo.com/v2/disk_images \
-H "Authorization: Bearer $CIVO_API_KEY" \
-F "name=my-new-image" \
-F "distribution=ubuntu" \
-F "version=22.04" \
-F "os=linux" \
-F "region=LON1" \
-F "image_sha256=a1b2c3d4e5f6..." \
-F "image_md5=sy867ucf234hjk27..." \
-F "image_size=2346823089" \ , <30gb , pressigned url with size limit = image_size
-F "logo_base64=dfgk6sy867ucf234hjk27"
Delete Disk Image
Deletes a disk image entry and the actual image file from the object store
Request
The request needs a path parameter
DELETE /v2/disk_images/:id
Response
204 No Content
if successful404 Not Found
if not successful
cURL
curl -X DELETE https://api.civo.com/v2/disk_images/cddfc9f4-ed69-48b9-94eb-18dd0f8234f8 \
-H "Authorization: Bearer $CIVO_API_KEY"
Get Disk Image
Retrieves the details of a specific disk image
Request
The request needs a path parameter
GET /v2/disk_images/:id
Response
{
"id": "cddfc9f4-ed69-48b9-94eb-18dd0f8234f8",
"name": "my-new-image",
"distribution": "ubuntu",
"version": "22.04",
"os": "linux",
"region": "LON1",
"status": "available",
"logo_url": "https://objectstore.civo.com/-/logo.svg",
"disk_image_url": "https://objectstore.civo.com/-/disk.img/presigned_url_for user_to_upload"",
"image_size": 2346823089 ,
}
cURL
curl -X GET https://api.civo.com/v2/disk_images/cddfc9f4-ed69-48b9-94eb-18dd0f8234f8 \
-H "Authorization: Bearer $CIVO_API_KEY"
List Disk Image
Retrieves a list of all disk images for the user
Request
The request needs a path parameter
GET /v2/disk_images?type=string
The type
parameter is optional and if used will list only user-created disk images
Response
{
"id": "cddfc9f4-ed69-48b9-94eb-18dd0f8234f8",
"name": "my-new-image",
"distribution": "ubuntu",
"version": "22.04",
"os": "linux",
"region": "LON1",
"status": "available",
"logo_url": "https://objectstore.civo.com/-/logo.svg",
"disk_image_url": "https://objectstore.civo.com/-/disk.img/presigned_url_for user_to_upload"",
"image_size": 2346823089 ,
}
cURL
curl -X GET https://api.civo.com/v2/disk_images?type=custom \
-H "Authorization: Bearer $CIVO_API_KEY"
curl -X GET https://api.civo.com/v2/disk_images/ \
-H "Authorization: Bearer $CIVO_API_KEY"