# Public Cloud › Project Management › Service references › Storage 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/storage/

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

## Operations

- `GET /publicCloud/project/{projectId}/reference/storage/block/volumeType` — List block storage volume types
- `GET /publicCloud/project/{projectId}/reference/storage/file/shareType` — List file storage share types
- `GET /publicCloud/project/{projectId}/reference/storage/object` — Get object storage reference data

## List block storage volume types

`GET /v2/publicCloud/project/{projectId}/reference/storage/block/volumeType`

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

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:reference/storage/block/volumeType/get`

Returns the volume types with their IOPS, throughput and maximum volume size. The list holds one entry per volume type and region: a volume type sold in several regions appears once per region, with the figures of that region and the region in `location`. The regions already activated on the project and those the project can activate where a volume type is sold are both listed. `location.regionActivated` on each entry 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. Entries are grouped by volume type, then sorted by region name. For IOPS and throughput, `level` is the baseline, `maximum` the upper limit a volume can burst to, and `guaranteed` tells whether the baseline is guaranteed. `maximumSize` is the maximum volume size in GB.

### 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, case-insensitive. Keeps the entries of this region only. A region that does not exist is rejected. One the project can neither use nor activate returns an empty list. |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.storage.block.VolumeType[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `iops` | publicCloud.reference.storage.block.VolumeTypePerformance | read-only | Input/output operations per second of a volume of this type in this region |
| `iops.guaranteed` | boolean | read-only | Whether the baseline level is guaranteed |
| `iops.level` | publicCloud.reference.storage.block.VolumeTypePerformanceValue | read-only | Baseline performance of a volume. May be expressed per GB of volume size, see its unit. |
| `iops.level.unit` | publicCloud.reference.storage.block.VolumeTypePerformanceUnitEnum | read-only | Unit of the value. Units ending in `/GB` scale with the volume size. — one of `IOPS`, `IOPS/GB`, `MB/S`, `MB/S/GB` |
| `iops.level.value` | number | read-only | Numeric value, expressed in unit |
| `iops.maximum` | publicCloud.reference.storage.block.VolumeTypePerformanceValue | read-only | Upper performance limit of a volume |
| `iops.maximum.unit` | publicCloud.reference.storage.block.VolumeTypePerformanceUnitEnum | read-only | Unit of the value. Units ending in `/GB` scale with the volume size. — one of `IOPS`, `IOPS/GB`, `MB/S`, `MB/S/GB` |
| `iops.maximum.value` | number | read-only | Numeric value, expressed in unit |
| `location` | publicCloud.reference.Location | read-only | Region where the volume type is sold to the project, whether that region is already activated on the project (regionActivated), and the availability zones of that region (availabilityZones), 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. |
| `maximumSize` | integer | read-only | Maximum size of a volume of this type in this region in GB |
| `name` | publicCloud.blockStorage.VolumeTypeEnum | read-only | Volume type identifier, to use as the volume type when creating a volume — one of `CLASSIC`, `HIGH_SPEED`, `HIGH_SPEED_GEN2` |
| `throughput` | publicCloud.reference.storage.block.VolumeTypePerformance | read-only | Throughput of a volume of this type in this region. Null when no throughput figure is published for this region. |
| `throughput.guaranteed` | boolean | read-only | Whether the baseline level is guaranteed |
| `throughput.level` | publicCloud.reference.storage.block.VolumeTypePerformanceValue | read-only | Baseline performance of a volume. May be expressed per GB of volume size, see its unit. |
| `throughput.level.unit` | publicCloud.reference.storage.block.VolumeTypePerformanceUnitEnum | read-only | Unit of the value. Units ending in `/GB` scale with the volume size. — one of `IOPS`, `IOPS/GB`, `MB/S`, `MB/S/GB` |
| `throughput.level.value` | number | read-only | Numeric value, expressed in unit |
| `throughput.maximum` | publicCloud.reference.storage.block.VolumeTypePerformanceValue | read-only | Upper performance limit of a volume |
| `throughput.maximum.unit` | publicCloud.reference.storage.block.VolumeTypePerformanceUnitEnum | read-only | Unit of the value. Units ending in `/GB` scale with the volume size. — one of `IOPS`, `IOPS/GB`, `MB/S`, `MB/S/GB` |
| `throughput.maximum.value` | number | read-only | Numeric value, expressed in unit |

```json
[
  {
    "iops": {
      "guaranteed": true,
      "level": {
        "unit": "IOPS",
        "value": 0
      },
      "maximum": {
        "unit": "IOPS",
        "value": 0
      }
    },
    "location": {
      "availabilityZones": [
        "string"
      ],
      "region": "string",
      "regionActivated": true
    },
    "maximumSize": 0,
    "name": "CLASSIC",
    "throughput": {
      "guaranteed": true,
      "level": {
        "unit": "IOPS",
        "value": 0
      },
      "maximum": {
        "unit": "IOPS",
        "value": 0
      }
    }
  }
]
```

### Example

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

# 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/storage/block/volumeType");

print_r($result);
?>
```

## List file storage share types

`GET /v2/publicCloud/project/{projectId}/reference/storage/file/shareType`

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

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:reference/storage/file/shareType/get`

Returns the file storage share types with their minimum and maximum share size in GB, IOPS and throughput, read from the OVHcloud commercial catalog. The list holds one entry per share type and region: a share type sold in several regions appears once per region, with the figures of that region and the region in `location`. The regions already activated on the project and those the project can activate where a share type is sold are both listed. `location.regionActivated` on each entry 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. Entries are sorted by share type name, then by region name. For IOPS and throughput, `level` is the baseline per GB, `maximum` the upper limit, and `guaranteed` tells whether the baseline is guaranteed. Use `name` as the share type when creating a share.

### 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, case-insensitive. Keeps the entries of this region only. A region that does not exist is rejected. One the project can neither use nor activate returns an empty list. |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.storage.file.ShareType[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `iops` | publicCloud.reference.storage.block.VolumeTypePerformance | read-only | Input/output operations per second of a file storage of this type in this region |
| `iops.guaranteed` | boolean | read-only | Whether the baseline level is guaranteed |
| `iops.level` | publicCloud.reference.storage.block.VolumeTypePerformanceValue | read-only | Baseline performance of a volume. May be expressed per GB of volume size, see its unit. |
| `iops.level.unit` | publicCloud.reference.storage.block.VolumeTypePerformanceUnitEnum | read-only | Unit of the value. Units ending in `/GB` scale with the volume size. — one of `IOPS`, `IOPS/GB`, `MB/S`, `MB/S/GB` |
| `iops.level.value` | number | read-only | Numeric value, expressed in unit |
| `iops.maximum` | publicCloud.reference.storage.block.VolumeTypePerformanceValue | read-only | Upper performance limit of a volume |
| `iops.maximum.unit` | publicCloud.reference.storage.block.VolumeTypePerformanceUnitEnum | read-only | Unit of the value. Units ending in `/GB` scale with the volume size. — one of `IOPS`, `IOPS/GB`, `MB/S`, `MB/S/GB` |
| `iops.maximum.value` | number | read-only | Numeric value, expressed in unit |
| `location` | publicCloud.reference.Location | read-only | Region where the file storage type is sold to the project, whether that region is already activated on the project (regionActivated), and the availability zones of that region (availabilityZones), 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. |
| `maximumSize` | integer | read-only | Maximum size of a file storage of this type in this region in GB |
| `minimumSize` | integer | read-only | Minimum size of a file storage of this type in this region in GB |
| `name` | publicCloud.storage.file.FileStorageTypeEnum | read-only | File storage type identifier, to use as the type when creating a file storage — one of `STANDARD_1AZ` |
| `protocols` | publicCloud.storage.file.FileStorageProtocolEnum[] | read-only | Protocols a file storage of this type supports |
| `throughput` | publicCloud.reference.storage.block.VolumeTypePerformance | read-only | Throughput of a file storage of this type in this region. Null when no throughput figure is published for this region. |
| `throughput.guaranteed` | boolean | read-only | Whether the baseline level is guaranteed |
| `throughput.level` | publicCloud.reference.storage.block.VolumeTypePerformanceValue | read-only | Baseline performance of a volume. May be expressed per GB of volume size, see its unit. |
| `throughput.level.unit` | publicCloud.reference.storage.block.VolumeTypePerformanceUnitEnum | read-only | Unit of the value. Units ending in `/GB` scale with the volume size. — one of `IOPS`, `IOPS/GB`, `MB/S`, `MB/S/GB` |
| `throughput.level.value` | number | read-only | Numeric value, expressed in unit |
| `throughput.maximum` | publicCloud.reference.storage.block.VolumeTypePerformanceValue | read-only | Upper performance limit of a volume |
| `throughput.maximum.unit` | publicCloud.reference.storage.block.VolumeTypePerformanceUnitEnum | read-only | Unit of the value. Units ending in `/GB` scale with the volume size. — one of `IOPS`, `IOPS/GB`, `MB/S`, `MB/S/GB` |
| `throughput.maximum.value` | number | read-only | Numeric value, expressed in unit |

```json
[
  {
    "iops": {
      "guaranteed": true,
      "level": {
        "unit": "IOPS",
        "value": 0
      },
      "maximum": {
        "unit": "IOPS",
        "value": 0
      }
    },
    "location": {
      "availabilityZones": [
        "string"
      ],
      "region": "string",
      "regionActivated": true
    },
    "maximumSize": 0,
    "minimumSize": 0,
    "name": "STANDARD_1AZ",
    "protocols": [
      "NFS"
    ],
    "throughput": {
      "guaranteed": true,
      "level": {
        "unit": "IOPS",
        "value": 0
      },
      "maximum": {
        "unit": "IOPS",
        "value": 0
      }
    }
  }
]
```

### Example

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

# 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/storage/file/shareType");

print_r($result);
?>
```

## Get object storage reference data

`GET /v2/publicCloud/project/{projectId}/reference/storage/object`

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

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

Returns the storage classes with their minimum billed retention, the values accepted at bucket creation, and the allowed durations for restoring an archived object. Region capabilities, such as replication support, are returned by each region in `/reference/region`.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.storage.object.ObjectStorage | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bucketOptions` | publicCloud.reference.storage.object.BucketOptions | read-only | Allowed values for the bucket creation options |
| `bucketOptions.encryptionAlgorithms` | publicCloud.storage.object.BucketEncryptionAlgorithmEnum[] | read-only | Server-side encryption algorithms selectable at bucket creation |
| `bucketOptions.objectLockModes` | publicCloud.storage.object.BucketObjectLockModeEnum[] | read-only | Object lock retention modes selectable at bucket creation |
| `bucketOptions.userRoles` | publicCloud.reference.storage.object.UserRole[] | read-only | User roles assignable on a bucket, one of which is flagged as the default |
| `bucketOptions.userRoles[].isDefault` | boolean | read-only | Whether this role is the one preselected when granting a user access to a bucket |
| `bucketOptions.userRoles[].name` | publicCloud.reference.storage.object.UserRoleEnum | read-only | Unique identifier of the role — one of `ADMIN`, `DENY`, `READ_ONLY`, `READ_WRITE` |
| `bucketOptions.versioningStatuses` | publicCloud.storage.object.BucketVersioningStatusEnum[] | read-only | Versioning statuses selectable at bucket creation |
| `storageClasses` | publicCloud.reference.storage.object.StorageClass[] | read-only | Object storage classes and their billing constraints |
| `storageClasses[].minBilledRetentionDays` | integer | read-only | Minimum number of days an object is billed for in this storage class, even when deleted earlier. Null when the class has no minimum billed retention. |
| `storageClasses[].name` | publicCloud.storage.object.StorageClassEnum | read-only | Unique identifier of the storage class — one of `DEEP_ARCHIVE`, `GLACIER_IR`, `HIGH_PERF`, `STANDARD`, `STANDARD_IA` |
| `validation` | publicCloud.reference.storage.object.Validation | read-only | Input validation constraints applied to object storage resources |
| `validation.objectRestore` | publicCloud.reference.storage.object.ObjectRestoreValidation | read-only | Bounds for the duration an archived object is restored for |
| `validation.objectRestore.defaultDays` | integer | read-only | Number of days preselected when no duration is provided |
| `validation.objectRestore.maxDays` | integer | read-only | Maximum number of days an object can be restored for |
| `validation.objectRestore.minDays` | integer | read-only | Minimum number of days an object can be restored for |

```json
{
  "bucketOptions": {
    "encryptionAlgorithms": [
      "AES256"
    ],
    "objectLockModes": [
      "COMPLIANCE"
    ],
    "userRoles": [
      {
        "isDefault": true,
        "name": "ADMIN"
      }
    ],
    "versioningStatuses": [
      "DISABLED"
    ]
  },
  "storageClasses": [
    {
      "minBilledRetentionDays": 0,
      "name": "DEEP_ARCHIVE"
    }
  ],
  "validation": {
    "objectRestore": {
      "defaultDays": 0,
      "maxDays": 0,
      "minDays": 0
    }
  }
}
```

### Example

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

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

print_r($result);
?>
```
