# Storage & Backup › Block Storage › Cloud Disk Array › ACL 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

> 4 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/acl/

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

## Operations

- `GET /dedicated/ceph/{serviceName}/acl` — List IP ACLs
- `GET /dedicated/ceph/{serviceName}/acl/{aclId}` — Get an IP ACL
- `POST /dedicated/ceph/{serviceName}/acl` — Create IP ACLs
- `DELETE /dedicated/ceph/{serviceName}/acl/{aclId}` — Delete an IP ACL

## List IP ACLs

`GET /1.0/dedicated/ceph/{serviceName}/acl`

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

**Status:** Stable production version  
**IAM actions:** `dedicatedCeph:apiovh:acl/get`

Returns the IP ACLs of the cluster. Only the networks listed in an ACL can connect to the cluster.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.ceph.aclGet.response[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `family` | dedicated.ceph.aclGet.response.familyEnum | read-only | Family of IP ACL — one of `IPV4`, `IPV6` |
| `id` | integer | read-only | ID of IP ACL |
| `netmask` | ip | read-only | IP address (e.g., 192.0.2.0) |
| `network` | ip | read-only | IP address (e.g., 192.0.2.0) |

```json
[
  {
    "family": "IPV4",
    "id": 0,
    "netmask": "192.0.2.0",
    "network": "192.0.2.0"
  }
]
```

### Example

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

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

print_r($result);
?>
```

## Get an IP ACL

`GET /1.0/dedicated/ceph/{serviceName}/acl/{aclId}`

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

**Status:** Stable production version  
**IAM actions:** `dedicatedCeph:apiovh:acl/get`

Returns an IP ACL, which allows one network to connect to the cluster.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `aclId` | path | integer | yes | Acl ID |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.ceph.aclGet.response | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `family` | dedicated.ceph.aclGet.response.familyEnum | read-only | Family of IP ACL — one of `IPV4`, `IPV6` |
| `id` | integer | read-only | ID of IP ACL |
| `netmask` | ip | read-only | IP address (e.g., 192.0.2.0) |
| `network` | ip | read-only | IP address (e.g., 192.0.2.0) |

```json
{
  "family": "IPV4",
  "id": 0,
  "netmask": "192.0.2.0",
  "network": "192.0.2.0"
}
```

### Example

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

# 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}/acl/{aclId}");

print_r($result);
?>
```

## Create IP ACLs

`POST /1.0/dedicated/ceph/{serviceName}/acl`

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

**Status:** Stable production version  
**IAM actions:** `dedicatedCeph:apiovh:acl/create`

Creates one IP ACL for each network in aclList, to allow it to connect to the cluster. The ACLs also apply to CephFS.

### Parameters

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

### Request body (required)

Type: `dedicated.ceph.acl.Create`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `aclList` | string[] | yes | List of new ACLs |

```json
{
  "aclList": [
    "string"
  ]
}
```

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/ceph/{serviceName}/acl" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```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
)

# Request body type: dedicated.ceph.acl.Create
result = client.post("/dedicated/ceph/{serviceName}/acl",
	aclList = None, # List of new ACLs (type: array)
)

# 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

// Request body type: dedicated.ceph.acl.Create
$result = $ovh->post("/dedicated/ceph/{serviceName}/acl", array(
	aclList => null, // List of new ACLs (type: array)
));

print_r($result);
?>
```

## Delete an IP ACL

`DELETE /1.0/dedicated/ceph/{serviceName}/acl/{aclId}`

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

**Status:** Stable production version  
**IAM actions:** `dedicatedCeph:apiovh:acl/delete`

Deletes the IP ACL. Clients in its network can no longer connect to the cluster.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `aclId` | path | integer | yes | Acl ID |
| `serviceName` | path | string | yes | Service name |

### Responses

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

```json
"string"
```

### Example

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

# 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}/acl/{aclId}");

print_r($result);
?>
```
