# Public Cloud › Project Management › 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

> 3 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/project-management/service-references/

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

## Operations

- `GET /publicCloud/project/{projectId}/reference/productAvailability` — Get product availability
- `GET /publicCloud/project/{projectId}/reference/region` — List regions
- `GET /publicCloud/project/{projectId}/reference/region/{name}` — Get a region

## Get product availability

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

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/project-management/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 regions

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

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/project-management/service-references/#getRegions

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:reference/region/get`

Returns the regions with their type, status, location and available services.

### 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 |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `activated` | boolean | read-only | Whether the region is activated on the project. When false, the region exists but has not yet been activated for the project. |
| `availabilityZones` | string[] | read-only | Availability zones in this region |
| `continent` | string | read-only | Continent code |
| `country` | string | read-only | Country code |
| `datacenterName` | string | read-only | Datacenter display name |
| `name` | string | read-only | Region identifier, for example GRA1 |
| `objectStorage` | publicCloud.reference.RegionObjectStorage | read-only | Object storage capabilities of the region. Null when the region offers no object storage. |
| `objectStorage.bareContainerOnly` | boolean | read-only | Whether the region only supports bare containers, without the additional bucket features (encryption, versioning, object lock, lifecycle, replication) |
| `objectStorage.isReplicationTarget` | boolean | read-only | Whether a bucket in this region can be used as the destination of a replication rule |
| `objectStorage.lifecycleTargetClasses` | publicCloud.storage.object.StorageClassLifecycleEnum[] | read-only | Storage classes that can be used as a transition target in a lifecycle rule in this region |
| `objectStorage.replicationSupported` | boolean | read-only | Whether replication rules can be configured on buckets located in this region |
| `objectStorage.storageClasses` | publicCloud.storage.object.StorageClassEnum[] | read-only | Storage classes orderable in this region |
| `services` | string[] | read-only | Available services. Includes objectStorage when S3™ object storage is available in the region, that is the region has a non-null objectStorage block whose bareContainerOnly is false. |
| `status` | publicCloud.reference.RegionStatusEnum | read-only | Region status — one of `DISABLED`, `ENABLED`, `MAINTENANCE` |
| `type` | location.TypeEnum | read-only | Region type. Null when the catalog reports an unrecognized type. — one of `LOCAL-ZONE`, `REGION-1-AZ`, `REGION-3-AZ` |

```json
[
  {
    "activated": true,
    "availabilityZones": [
      "string"
    ],
    "continent": "string",
    "country": "string",
    "datacenterName": "string",
    "name": "string",
    "objectStorage": {
      "bareContainerOnly": true,
      "isReplicationTarget": true,
      "lifecycleTargetClasses": [
        "DEEP_ARCHIVE"
      ],
      "replicationSupported": true,
      "storageClasses": [
        "DEEP_ARCHIVE"
      ]
    },
    "services": [
      "string"
    ],
    "status": "DISABLED",
    "type": "LOCAL-ZONE"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/reference/region" \
  -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/region")

# 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/region");

print_r($result);
?>
```

## Get a region

`GET /v2/publicCloud/project/{projectId}/reference/region/{name}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/project-management/service-references/#getRegion

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:reference/region/get`

Returns one region: its availability zones, location, status and available services, including its object storage capabilities.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | path | string | yes | Name |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.Region | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `activated` | boolean | read-only | Whether the region is activated on the project. When false, the region exists but has not yet been activated for the project. |
| `availabilityZones` | string[] | read-only | Availability zones in this region |
| `continent` | string | read-only | Continent code |
| `country` | string | read-only | Country code |
| `datacenterName` | string | read-only | Datacenter display name |
| `name` | string | read-only | Region identifier, for example GRA1 |
| `objectStorage` | publicCloud.reference.RegionObjectStorage | read-only | Object storage capabilities of the region. Null when the region offers no object storage. |
| `objectStorage.bareContainerOnly` | boolean | read-only | Whether the region only supports bare containers, without the additional bucket features (encryption, versioning, object lock, lifecycle, replication) |
| `objectStorage.isReplicationTarget` | boolean | read-only | Whether a bucket in this region can be used as the destination of a replication rule |
| `objectStorage.lifecycleTargetClasses` | publicCloud.storage.object.StorageClassLifecycleEnum[] | read-only | Storage classes that can be used as a transition target in a lifecycle rule in this region |
| `objectStorage.replicationSupported` | boolean | read-only | Whether replication rules can be configured on buckets located in this region |
| `objectStorage.storageClasses` | publicCloud.storage.object.StorageClassEnum[] | read-only | Storage classes orderable in this region |
| `services` | string[] | read-only | Available services. Includes objectStorage when S3™ object storage is available in the region, that is the region has a non-null objectStorage block whose bareContainerOnly is false. |
| `status` | publicCloud.reference.RegionStatusEnum | read-only | Region status — one of `DISABLED`, `ENABLED`, `MAINTENANCE` |
| `type` | location.TypeEnum | read-only | Region type. Null when the catalog reports an unrecognized type. — one of `LOCAL-ZONE`, `REGION-1-AZ`, `REGION-3-AZ` |

```json
{
  "activated": true,
  "availabilityZones": [
    "string"
  ],
  "continent": "string",
  "country": "string",
  "datacenterName": "string",
  "name": "string",
  "objectStorage": {
    "bareContainerOnly": true,
    "isReplicationTarget": true,
    "lifecycleTargetClasses": [
      "DEEP_ARCHIVE"
    ],
    "replicationSupported": true,
    "storageClasses": [
      "DEEP_ARCHIVE"
    ]
  },
  "services": [
    "string"
  ],
  "status": "DISABLED",
  "type": "LOCAL-ZONE"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/reference/region/{name}" \
  -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/region/{name}")

# 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/region/{name}");

print_r($result);
?>
```
