# Storage & Backup › Block Storage › Cloud Disk Array › Blocklist API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Storage & Backup product's sections: https://developers.eu.ovhcloud.com/reference/storage-backup/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 2 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/storage-backup/block-storage/cloud-disk-array/blocklist/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/storage-backup/block-storage/cloud-disk-array/blocklist.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/storage-backup/block-storage/cloud-disk-array/blocklist.json?format=openapi3

## Operations

- `GET /dedicated/ceph/{serviceName}/osd/blocklist` — List blocklist entries
- `DELETE /dedicated/ceph/{serviceName}/osd/blocklist/{address}` — Delete a blocklist entry

## List blocklist entries

`GET /1.0/dedicated/ceph/{serviceName}/osd/blocklist`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/block-storage/cloud-disk-array/blocklist/#get-dedicated-ceph-servicename-osd-blocklist

**Status:** Beta version  
**IAM actions:** `dedicatedCeph:apiovh:osd/blocklist`

Returns the client sessions currently blocklisted by the OSDs.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.ceph.osd.blocklist | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `entries` | dedicated.ceph.osd.blocklist.entry[] | read-only | List of blocklisted entities |
| `entries[].address` | string | read-only | Ceph address of the blocked client |
| `entries[].expiration` | string (date-time) | read-only | Ceph blocklist entry expiration date time |

```json
{
  "entries": [
    {
      "address": "string",
      "expiration": "2024-01-01T12:00:00Z"
    }
  ]
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/ceph/{serviceName}/osd/blocklist" \
  -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("/dedicated/ceph/{serviceName}/osd/blocklist")

# 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("/dedicated/ceph/{serviceName}/osd/blocklist");

print_r($result);
?>
```

## Delete a blocklist entry

`DELETE /1.0/dedicated/ceph/{serviceName}/osd/blocklist/{address}`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/block-storage/cloud-disk-array/blocklist/#delete-dedicated-ceph-servicename-osd-blocklist-address

**Status:** Beta version  
**IAM actions:** `dedicatedCeph:apiovh:osd/blocklist/delete`

Removes the client session from the OSD blocklist. This may corrupt data: read the Ceph documentation before calling.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `address` | path | string | yes | Address |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/dedicated/ceph/{serviceName}/osd/blocklist/{address}" \
  -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.delete("/dedicated/ceph/{serviceName}/osd/blocklist/{address}")

# 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->delete("/dedicated/ceph/{serviceName}/osd/blocklist/{address}");

print_r($result);
?>
```
