Skip to main content

Images

A Genesis Cloud Image can be used to create an Instance. Currently, there are three types of images: base-os, preconfigured and snapshots.

  • The base-os images are public basic operating system images, like Ubuntu.
  • The cloud-image images are public cloud images like Ubuntu and Debian.
  • The preconfigured images are public images with applications or frameworks, like TensorFlow, already installed.
  • The snapshot images are backups of instances and are only visible to your account.

Not every image is compatible with all instance types. If an image is incompatible you will receive an error like this one:

{
"code": "02035",
"message": "the selected image cannot be run on this instance"
}

Tip: Check on the instance creation flow in the console, if a given instance and image config is supported.

Image Schema

  • id String - A unique number that can be used to identify and reference a specific image.
  • name String - The display name that has been given to an image. This is what is shown in the control panel and is generally a descriptive title for the image in question.
  • type String - Describes the kind of image. It may be one of base-os, cloud-image, preconfigured, or snapshot.
  • family String - Describes the operating system family.
  • slug String - The image slug.
  • versions Array - The list of versions if this is a cloud-image otherwise empty.
  • regions Array - List of region in which this image can be used in, see Regions.
  • created_at String - A time value given in ISO8601 combined date and time format that represents when the image was created.

List Images

To list all the images, send a GET request to /compute/v1/images.

GET /compute/v1/images (HTTP 200 - OK)

Query parameters

  • type String - An image type name (base-os, cloud-image preconfigured or snapshot) to filter the return list by type.
  • per_page Integer Optional - A positive integer lower than or equal to 100 indicating the number of items to return per page (default: 50).
  • page Integer Optional - A positive integer to choose the page to return.

Response body

The response will be a JSON object with pagination details and a key called images. This will be set to an array of image objects, each of which will contain the standard image attributes, see Image Schema:

{
"images": [
{
"id": "ac26fa2b-c6d5-47a7-bc4e-5a219797e70f",
"type": "base-os",
"family": "Ubuntu",
"slug": null,
"name": "Ubuntu 20.04",
"regions": ["ARC-IS-HAF-1", "EUC-DE-MUC-1", "NORD-NO-KRS-1"],
"versions": null,
"created_at": "2023-06-26T14:36:00.000Z"
},
{
"id": "45d06539-f8f5-48d9-816e-d4b1a8e5163e",
"type": "base-os",
"family": "Ubuntu",
"slug": null,
"name": "Ubuntu 18.04",
"regions": ["ARC-IS-HAF-1", "NORD-NO-KRS-1"],
"versions": null,
"created_at": "2023-06-26T14:36:00.000Z"
}
],
"total_count": 2,
"page": 1,
"per_page": 50
}

List all base-os images

To retrieve only base-os images, include the type query parameter set to base-os:

GET /compute/v1/images?type=base-os (HTTP 200 - OK)

List all snapshot images

To retrieve only base-os images, include the type query parameter set to snapshot:

GET /compute/v1/images?type=snapshot (HTTP 200 - OK)

Note that you can get a list of all snapshots with more information in the dedicated snapshots endpoint. Also you can retrieve all snapshots of an instance with more information in the dedicated instance's snapshots endpoint.

Examples (cURL)

# Get all images
curl -H "Authorization: Bearer $TOKEN" \
"https://api.genesiscloud.com/compute/v1/images"