# Public Cloud › Compute › Instances › Service references API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Public Cloud product's sections: https://developers.eu.ovhcloud.com/reference/public-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 5 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/public-cloud/compute/instances/service-references/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/public-cloud/compute/instances/service-references.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/compute/instances/service-references.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/reference/productAvailability` — Get product availability
- `GET /publicCloud/project/{projectId}/reference/instance/flavor` — List instance flavors
- `GET /publicCloud/project/{projectId}/reference/instance/flavor/{id}` — Get an instance flavor
- `GET /publicCloud/project/{projectId}/reference/instance/image` — List instance images
- `GET /publicCloud/project/{projectId}/reference/instance/image/{id}` — Get an instance image

## Get product availability

`GET /v2/publicCloud/project/{projectId}/reference/productAvailability`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/compute/instances/service-references/#getProductAvailability

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:reference/productAvailability/get`

### Product availability

Returns the products available to this Public Cloud project, grouped by product type.

This is read-only reference data: the response is computed from the OVHcloud commercial catalog combined with the project's entitlements and its quota usage. It does not reflect existing resources and triggers no OpenStack call.

The response is an array with one entry per product type, in this order: `INSTANCE`, `VOLUME`, `LOADBALANCER`, `GATEWAY`, `FLOATING_IP`, `PUBLIC_IP`, `VOLUME_SNAPSHOT`, `VOLUME_BACKUP`, `INSTANCE_SNAPSHOT`, `SHARE`, `SHARE_SNAPSHOT`, `OBJECT_STORAGE`, `SWIFT`. Each type group carries its `models`. Each model carries the `locations` where it is sold to the project, in the regions activated on the project and in those the project can activate. Each location reports its availability zones, `regionActivated`, a `quotaStatus` with the quota resources that block it (`quotaLimitedBy`) and, for the `INSTANCE` type only, a `stockStatus` per availability zone.

`links` point to related operations: a `SPECS` link on a model leads to the reference route describing it, and a location whose `quotaStatus` is `INSUFFICIENT` carries a `QUOTA` link.

Every filter is optional: `type` keeps the group of that product type only, `region` the locations of that region (letter case ignored), `name` the models with exactly that name and `nameContains` the models whose name contains that value (letter case ignored).

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `name` | query | string |  | Optional exact model name filter, for example b3-8 |
| `nameContains` | query | string |  | Optional model name filter keeping the names that contain this value, letter case ignored |
| `projectId` | path | string | yes | Project ID |
| `region` | query | string |  | Optional region filter, letter case ignored |
| `type` | query | publicCloud.reference.ProductTypeEnum |  | Optional product type filter — one of `FLOATING_IP`, `GATEWAY`, `INSTANCE`, `INSTANCE_SNAPSHOT`, `LOADBALANCER`, `OBJECT_STORAGE`, `PUBLIC_IP`, `SHARE`, `SHARE_SNAPSHOT`, `SWIFT`, `VOLUME`, `VOLUME_BACKUP`, … |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.ProductAvailability[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `models` | publicCloud.reference.ProductAvailabilityModel[] | read-only | The offerings of this product type available to the project, each with its per-location availability. Null or empty when no model is available. |
| `models[].links` | publicCloud.reference.ProductAvailabilityLink[] | read-only | Related operations on the model. A SPECS link points to the reference route listing the technical specifications of the product type: the instance flavor route filtered on the model name, the volume type route, the load balancer flavor route, the gateway model route filtered on the model name, the file storage share type route, or the object storage route. Empty for products without specifications (IPs, snapshots, backups, Swift). |
| `models[].links[].href` | string | read-only | The API v2 path to call, including the /v2 prefix and any query string, for example /v2/publicCloud/project/{projectId}/reference/instance/flavor?name=b2-7. Prefix it with the API endpoint the response came from. |
| `models[].links[].kind` | publicCloud.reference.ProductAvailabilityLinkKindEnum | read-only | Kind. What the operation is: SPECS returns the technical specifications of the model. QUOTA returns the project's quota in the location. — one of `QUOTA`, `SPECS` |
| `models[].locations` | publicCloud.reference.ProductAvailabilityLocation[] | read-only | The locations where this model is available for the project, each with its activation state. Null or empty when the model is available in no location. |
| `models[].locations[].availabilityZones` | string[] | read-only | The availability zones within the location, for example eu-west-par-a, eu-west-par-b, eu-west-par-c. Empty for single-AZ regions. |
| `models[].locations[].links` | publicCloud.reference.ProductAvailabilityLink[] | read-only | Related operations on the location. When quotaStatus is INSUFFICIENT: a QUOTA link to read the quota of the location. Empty otherwise. |
| `models[].locations[].name` | string | read-only | Location name. The region or location identifier, for example GRA11. Identifies the location within a model availability entry. |
| `models[].locations[].quotaLimitedBy` | publicCloud.reference.ProductAvailabilityQuotaResourceEnum[] | read-only | Quota limited by. The quota resources without enough room, when quotaStatus is INSUFFICIENT. Empty otherwise. |
| `models[].locations[].quotaStatus` | publicCloud.reference.ProductAvailabilityQuotaStatusEnum | read-only | Quota status. Whether the project's quota in the location leaves room for one more unit of the model: one instance with its vCPUs and RAM, one volume, volume snapshot or volume backup of 1 GB, one load balancer, gateway or floating IP, one file storage share of the share type's minimum size, one file storage snapshot. SUFFICIENT or INSUFFICIENT is read from the last quota usage snapshot, which can lag a few minutes behind. SUFFICIENT as well for a product with no tracked quota (public IP, instance snapshot, object storage, Swift) in a region activated on the project. UNKNOWN when the region is not activated on the project or no quota usage is known for it. — one of `INSUFFICIENT`, `SUFFICIENT`, `UNKNOWN` |
| `models[].locations[].regionActivated` | boolean | read-only | Whether the region is already activated on the project. When false, the model is sold in the location but the region must be activated on the project before use. This says nothing about stock or quota. |
| `models[].locations[].stockStatus` | object | read-only | The current stock status of the model in the location, keyed by availability-zone name, for example eu-west-par-a. A 3AZ region has one entry per AZ. single-AZ and localzone regions have a single entry. Present only for the instance product type. Absent for every other product type. |
| `models[].name` | string | read-only | The offering name within its product type, to use when creating it: the flavor name for an instance (b3-8, win-b3-8) or a load balancer (SMALL to XL), the volume type for a volume (CLASSIC, HIGH_SPEED, HIGH_SPEED_GEN2), the model for a gateway (S to 3XL), the share type for file storage (STANDARD_1AZ), the storage class for object storage (STANDARD, STANDARD_IA, HIGH_PERF, GLACIER_IR, DEEP_ARCHIVE). Products sold as a single model (floating IP, public IP, snapshots, backups, Swift) use their product type as model name. |
| `type` | publicCloud.reference.ProductTypeEnum | read-only | Product type. The product family this group describes. Groups come in this order: INSTANCE, VOLUME, LOADBALANCER, GATEWAY, FLOATING_IP, PUBLIC_IP, VOLUME_SNAPSHOT, VOLUME_BACKUP, INSTANCE_SNAPSHOT, SHARE, SHARE_SNAPSHOT, OBJECT_STORAGE, SWIFT. — one of `FLOATING_IP`, `GATEWAY`, `INSTANCE`, `INSTANCE_SNAPSHOT`, `LOADBALANCER`, `OBJECT_STORAGE`, `PUBLIC_IP`, `SHARE`, `SHARE_SNAPSHOT`, `SWIFT`, `VOLUME`, `VOLUME_BACKUP`, … |

```json
[
  {
    "models": [
      {
        "links": [
          {
            "href": "string",
            "kind": "QUOTA"
          }
        ],
        "locations": [
          {
            "availabilityZones": [
              null
            ],
            "links": [
              null
            ],
            "name": "string",
            "quotaLimitedBy": [
              null
            ],
            "quotaStatus": "INSUFFICIENT",
            "regionActivated": true,
            "stockStatus": {
              "key": null
            }
          }
        ],
        "name": "string"
      }
    ],
    "type": "FLOATING_IP"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/reference/productAvailability" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/reference/productAvailability")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/reference/productAvailability");

print_r($result);
?>
```

## List instance flavors

`GET /v2/publicCloud/project/{projectId}/reference/instance/flavor`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/compute/instances/service-references/#getFlavors

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:reference/instance/flavor/get`

Returns the instance flavors available to the project, in the regions activated on the project and in those the project can activate. `location.regionActivated` on each flavor tells which regions must be activated on the project before use. `location.availabilityZones` lists the availability zones of the region, for example eu-west-par-a, eu-west-par-b and eu-west-par-c, and is empty for a single-AZ region. A region filter on a region that does not exist is rejected. On a region the project can neither use nor activate, it returns an empty list. A flavor is a read-only sizing template (vCPUs, RAM, disk) used to create or resize an instance. A new or disabled flavor, or a private flavor newly granted to the project, can take up to one minute to show in this list.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `name` | query | string |  | Optional flavor name filter, for example b2-7 |
| `projectId` | path | string | yes | Project ID |
| `region` | query | string |  | Optional region filter |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.instance.Flavor[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bandwidth` | publicCloud.instance.FlavorBandwidth | read-only | Network bandwidth an instance of the flavor gets in Mbit/s |
| `bandwidth.private` | integer | read-only | Bandwidth on private networks (vRack) in Mbit/s. Null when the flavor does not declare it. |
| `bandwidth.publicInbound` | integer | read-only | Inbound bandwidth on the public network in Mbit/s. Null when the flavor does not declare it. |
| `bandwidth.publicOutbound` | integer | read-only | Outbound bandwidth on the public network in Mbit/s. Null when the flavor does not declare it. |
| `description` | string | read-only | Free-form description of the flavor as reported by the backend. Null when no description is advertised for this flavor. |
| `disk` | integer | read-only | Size of the flavor's root disk in GB. This is the primary system disk provisioned for instances created from this flavor. |
| `ephemeral` | integer | read-only | Size of the flavor's ephemeral disk in GB. Ephemeral storage is transient. Its contents do not survive a rebuild or deletion of the instance. Zero when the flavor provides no ephemeral disk. |
| `gpus` | integer | read-only | Number of physical GPUs provided by the flavor. Zero for flavors without GPU. |
| `id` | string (uuid) | read-only | Identifier. The OpenStack/Nova flavor ID. Stable within a region and used to reference the flavor when creating an instance. |
| `isPublic` | boolean | read-only | Public availability. Whether the flavor is publicly available to the project. Private flavors are only visible to the projects they have been explicitly shared with. |
| `location` | publicCloud.reference.Location | read-only | Location. Region where this flavor is offered. The flavor catalog is per-region: a flavor returned for one region is not guaranteed to exist, or to carry the same characteristics, in another. regionActivated tells whether the region is already activated on the project. When false, the region must be activated on the project before use. availabilityZones lists the availability zones of the region, empty for a single-AZ region. |
| `location.availabilityZones` | string[] | read-only | Availability zones of the region, for example eu-west-par-a, eu-west-par-b and eu-west-par-c. Empty for a single-AZ region. |
| `location.region` | string | read-only | Region name, for example GRA11 |
| `location.regionActivated` | boolean | read-only | Whether the region is already activated on the project. When false, the region must be activated on the project before use. |
| `name` | string | read-only | The backend flavor name, for example b2-7, c2-15. This is the commercial/technical name used to identify the sizing in the catalog. |
| `ram` | integer | read-only | RAM in MB. Amount of memory provided by the flavor, expressed in MB. |
| `swap` | integer | read-only | Size of the flavor's swap space in MB. Zero when the flavor provides no swap. |
| `vcpus` | integer | read-only | vCPUs. Number of virtual CPUs provided by the flavor. |

```json
[
  {
    "bandwidth": {
      "private": 0,
      "publicInbound": 0,
      "publicOutbound": 0
    },
    "description": "string",
    "disk": 0,
    "ephemeral": 0,
    "gpus": 0,
    "id": "00000000-0000-0000-0000-000000000000",
    "isPublic": true,
    "location": {
      "availabilityZones": [
        "string"
      ],
      "region": "string",
      "regionActivated": true
    },
    "name": "string",
    "ram": 0,
    "swap": 0,
    "vcpus": 0
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/reference/instance/flavor" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/reference/instance/flavor")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/reference/instance/flavor");

print_r($result);
?>
```

## Get an instance flavor

`GET /v2/publicCloud/project/{projectId}/reference/instance/flavor/{id}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/compute/instances/service-references/#getFlavor

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:reference/instance/flavor/get`

Returns one instance flavor with its vCPUs, RAM and disk. `location.regionActivated` tells whether the flavor's region is already activated on the project. When false, the region must be activated on the project before use. `location.availabilityZones` lists the availability zones of the region, for example eu-west-par-a, eu-west-par-b and eu-west-par-c, and is empty for a single-AZ region. Use its `id` in `targetSpec.flavor` to create or resize an instance.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes | Id |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.instance.Flavor | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bandwidth` | publicCloud.instance.FlavorBandwidth | read-only | Network bandwidth an instance of the flavor gets in Mbit/s |
| `bandwidth.private` | integer | read-only | Bandwidth on private networks (vRack) in Mbit/s. Null when the flavor does not declare it. |
| `bandwidth.publicInbound` | integer | read-only | Inbound bandwidth on the public network in Mbit/s. Null when the flavor does not declare it. |
| `bandwidth.publicOutbound` | integer | read-only | Outbound bandwidth on the public network in Mbit/s. Null when the flavor does not declare it. |
| `description` | string | read-only | Free-form description of the flavor as reported by the backend. Null when no description is advertised for this flavor. |
| `disk` | integer | read-only | Size of the flavor's root disk in GB. This is the primary system disk provisioned for instances created from this flavor. |
| `ephemeral` | integer | read-only | Size of the flavor's ephemeral disk in GB. Ephemeral storage is transient. Its contents do not survive a rebuild or deletion of the instance. Zero when the flavor provides no ephemeral disk. |
| `gpus` | integer | read-only | Number of physical GPUs provided by the flavor. Zero for flavors without GPU. |
| `id` | string (uuid) | read-only | Identifier. The OpenStack/Nova flavor ID. Stable within a region and used to reference the flavor when creating an instance. |
| `isPublic` | boolean | read-only | Public availability. Whether the flavor is publicly available to the project. Private flavors are only visible to the projects they have been explicitly shared with. |
| `location` | publicCloud.reference.Location | read-only | Location. Region where this flavor is offered. The flavor catalog is per-region: a flavor returned for one region is not guaranteed to exist, or to carry the same characteristics, in another. regionActivated tells whether the region is already activated on the project. When false, the region must be activated on the project before use. availabilityZones lists the availability zones of the region, empty for a single-AZ region. |
| `location.availabilityZones` | string[] | read-only | Availability zones of the region, for example eu-west-par-a, eu-west-par-b and eu-west-par-c. Empty for a single-AZ region. |
| `location.region` | string | read-only | Region name, for example GRA11 |
| `location.regionActivated` | boolean | read-only | Whether the region is already activated on the project. When false, the region must be activated on the project before use. |
| `name` | string | read-only | The backend flavor name, for example b2-7, c2-15. This is the commercial/technical name used to identify the sizing in the catalog. |
| `ram` | integer | read-only | RAM in MB. Amount of memory provided by the flavor, expressed in MB. |
| `swap` | integer | read-only | Size of the flavor's swap space in MB. Zero when the flavor provides no swap. |
| `vcpus` | integer | read-only | vCPUs. Number of virtual CPUs provided by the flavor. |

```json
{
  "bandwidth": {
    "private": 0,
    "publicInbound": 0,
    "publicOutbound": 0
  },
  "description": "string",
  "disk": 0,
  "ephemeral": 0,
  "gpus": 0,
  "id": "00000000-0000-0000-0000-000000000000",
  "isPublic": true,
  "location": {
    "availabilityZones": [
      "string"
    ],
    "region": "string",
    "regionActivated": true
  },
  "name": "string",
  "ram": 0,
  "swap": 0,
  "vcpus": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/reference/instance/flavor/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/reference/instance/flavor/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/reference/instance/flavor/{id}");

print_r($result);
?>
```

## List instance images

`GET /v2/publicCloud/project/{projectId}/reference/instance/image`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/compute/instances/service-references/#getImages

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:reference/instance/image/get`

Returns the operating system images available to the project. Images are provided by the platform and are read-only.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |
| `region` | query | string |  | Optional region filter |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.instance.Image[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date. Timestamp at which the image was created on the backend, in RFC 3339 format. |
| `defaultUser` | string | read-only | Default login user of the image, as set by its publisher, for example almalinux or ubuntu. Null when the image declares none. |
| `id` | string (uuid) | read-only | Identifier. The OpenStack/Glance image ID. Stable within a region and used to reference the image when creating an instance. |
| `location` | publicCloud.common.Location | read-only | Location. Region (and, where applicable, availability zone) where this image is offered. The image catalog is per-region: an image returned for one region is not guaranteed to exist in another. |
| `location.availabilityZone` | string |  | Availability zone within the region |
| `location.region` | string | yes | Region code |
| `minDisk` | integer | read-only | Minimum root disk size in GB that an instance must provide to boot from this image. A flavor whose disk is smaller than this value cannot be used with the image. |
| `minRam` | integer | read-only | Minimum amount of memory in MB that an instance must provide to boot from this image. A flavor whose RAM is below this value cannot be used with the image. |
| `name` | string | read-only | Display name of the image as reported by the backend, for example the distribution and version, such as Debian 12 |
| `osType` | publicCloud.instance.ImageOSTypeEnum | read-only | Operating system type. Operating system family of the image (see ImageOSTypeEnum). Windows images can only boot on Windows flavors. — one of `BAREMETAL_LINUX`, `LINUX`, `WINDOWS` |
| `size` | integer | read-only | Size of the image on the backend, expressed in bytes |
| `status` | publicCloud.instance.ImageStatusEnum | read-only | Availability status of the image as reported by the backend (see ImageStatusEnum). Only images in an active status can be used to create an instance. — one of `ACTIVE`, `DEACTIVATED`, `DELETED`, `IMPORTING`, `KILLED`, `PENDING_DELETE`, `QUEUED`, `SAVING` |
| `updatedAt` | string (date-time) | read-only | Last update date. Timestamp of the last modification of the image on the backend, in RFC 3339 format. |
| `visibility` | publicCloud.instance.ImageVisibilityEnum | read-only | Visibility scope of the image (see ImageVisibilityEnum), for example whether it is a public OVHcloud-provided image or private to the project — one of `COMMUNITY`, `PRIVATE`, `PUBLIC`, `SHARED` |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "defaultUser": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "minDisk": 0,
    "minRam": 0,
    "name": "string",
    "osType": "BAREMETAL_LINUX",
    "size": 0,
    "status": "ACTIVE",
    "updatedAt": "2024-01-01T12:00:00Z",
    "visibility": "COMMUNITY"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/reference/instance/image" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/reference/instance/image")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/reference/instance/image");

print_r($result);
?>
```

## Get an instance image

`GET /v2/publicCloud/project/{projectId}/reference/instance/image/{id}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/compute/instances/service-references/#getImage

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:reference/instance/image/get`

Returns one operating system image. Use its `id` in `targetSpec.image` to create or rebuild an instance.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes | Id |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.instance.Image | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date. Timestamp at which the image was created on the backend, in RFC 3339 format. |
| `defaultUser` | string | read-only | Default login user of the image, as set by its publisher, for example almalinux or ubuntu. Null when the image declares none. |
| `id` | string (uuid) | read-only | Identifier. The OpenStack/Glance image ID. Stable within a region and used to reference the image when creating an instance. |
| `location` | publicCloud.common.Location | read-only | Location. Region (and, where applicable, availability zone) where this image is offered. The image catalog is per-region: an image returned for one region is not guaranteed to exist in another. |
| `location.availabilityZone` | string |  | Availability zone within the region |
| `location.region` | string | yes | Region code |
| `minDisk` | integer | read-only | Minimum root disk size in GB that an instance must provide to boot from this image. A flavor whose disk is smaller than this value cannot be used with the image. |
| `minRam` | integer | read-only | Minimum amount of memory in MB that an instance must provide to boot from this image. A flavor whose RAM is below this value cannot be used with the image. |
| `name` | string | read-only | Display name of the image as reported by the backend, for example the distribution and version, such as Debian 12 |
| `osType` | publicCloud.instance.ImageOSTypeEnum | read-only | Operating system type. Operating system family of the image (see ImageOSTypeEnum). Windows images can only boot on Windows flavors. — one of `BAREMETAL_LINUX`, `LINUX`, `WINDOWS` |
| `size` | integer | read-only | Size of the image on the backend, expressed in bytes |
| `status` | publicCloud.instance.ImageStatusEnum | read-only | Availability status of the image as reported by the backend (see ImageStatusEnum). Only images in an active status can be used to create an instance. — one of `ACTIVE`, `DEACTIVATED`, `DELETED`, `IMPORTING`, `KILLED`, `PENDING_DELETE`, `QUEUED`, `SAVING` |
| `updatedAt` | string (date-time) | read-only | Last update date. Timestamp of the last modification of the image on the backend, in RFC 3339 format. |
| `visibility` | publicCloud.instance.ImageVisibilityEnum | read-only | Visibility scope of the image (see ImageVisibilityEnum), for example whether it is a public OVHcloud-provided image or private to the project — one of `COMMUNITY`, `PRIVATE`, `PUBLIC`, `SHARED` |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "defaultUser": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "location": {
    "availabilityZone": "string",
    "region": "string"
  },
  "minDisk": 0,
  "minRam": 0,
  "name": "string",
  "osType": "BAREMETAL_LINUX",
  "size": 0,
  "status": "ACTIVE",
  "updatedAt": "2024-01-01T12:00:00Z",
  "visibility": "COMMUNITY"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/reference/instance/image/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/reference/instance/image/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/reference/instance/image/{id}");

print_r($result);
?>
```
