Getting StartedExamplesImagesList ImagesExamples (cURL)InstancesSSH KeysSecurity GroupsSnapshotsVolumes

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.

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:

  • 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.
  • created_at String - A time value given in ISO8601 combined date and time format that represents when the image was created.
{
"images": [
{
"id": "string",
"name": "string",
"type": "snapshot",
"created_at": "2020-03-16T16:01:12.954Z"
},
{
"id": "string",
"name": "string",
"type": "base-os",
"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. Note that you can retrieve all snapshots of an instance with more information in the dedicated instance's snapshots endpoint.

Examples (cURL)

curl -H 'X-Auth-Token: <TOKEN>' \
'https://api.genesiscloud.com/compute/v1/images?page=1&per_page=10'