# Public Cloud › Storage › Object Storage › 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

> 1 operation 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/storage/object-storage/service-references/

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

## Operations

- `GET /publicCloud/project/{projectId}/reference/storage/object` — Get object storage reference data

## Get object storage reference data

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

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/storage/object-storage/service-references/#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);
?>
```
