GET
/
cloud
/
v1
/
images
/
{project_id}
/
{region_id}
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
image_list = client.cloud.instances.images.list(
    project_id=0,
    region_id=0,
)
print(image_list.count)
{
  "count": 1,
  "results": [
    {
      "architecture": "x86_64",
      "created_at": "2024-05-05T14:51:26.570866",
      "creator_task_id": "b10dd116-07f5-4225-abb7-f42da5cb78fb",
      "description": "string",
      "disk_format": "raw",
      "display_order": 2010,
      "hw_firmware_type": "bios",
      "hw_machine_type": "q35",
      "id": "44e136a7-15c1-4b5f-a086-20b7b3237d40",
      "is_baremetal": false,
      "min_disk": 3,
      "min_ram": 0,
      "name": "ubuntu-20.10-x64",
      "os_distro": "ubuntu",
      "os_type": "linux",
      "os_version": "20.10",
      "project_id": 1337,
      "region": "Luxembourg 1",
      "region_id": 7,
      "size": 2361393152,
      "ssh_key": "allow",
      "status": "active",
      "tags": [
        {
          "key": "my-tag",
          "read_only": false,
          "value": "my-tag-value"
        }
      ],
      "task_id": null,
      "updated_at": "2024-05-05T14:51:26.570866",
      "visibility": "public"
    }
  ]
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

Query Parameters

include_prices
boolean

Show price

private
string

Any value to show private images

tag_key
string[]

Filter by tag keys.

tag_key_value
string

Filter by tag key-value pairs. Must be a valid JSON string. 'curl -G --data-urlencode 'tag_key_value={"key": "value"}' --url 'http://localhost:1111/v1/images/1/1'"

visibility
enum<string>

Image visibility. Globally visible images are public

Available options:
private,
public,
shared

Response

200 - application/json

List of images

The response is of type object.