Getting StartedRegionsInstancesImagesImage SchemaList ImagesExamples (cURL)SnapshotsVolumesSSH KeysSecurity GroupsExamples

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 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, preconfigured, or snapshot.
  • 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 Optional - An image type name (base-os, 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": "string",
"name": "string",
"type": "snapshot",
"regions": ["ARC-IS-HAF-1"],
"created_at": "2020-03-16T16:01:12.954Z"
},
{
"id": "string",
"name": "string",
"type": "base-os",
"regions": ["ARC-IS-HAF-1", "NORD-NO-KRS-1"],
"created_at": "2020-03-06T14:07:18.311Z"
}
],
"total_count": 2,
"page": 1,
"per_page": 10
}

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 "X-Auth-Token: $TOKEN" \
"https://api.genesiscloud.com/compute/v1/images"