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

> 5 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/cephfs/

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

## Operations

- `GET /dedicated/ceph/{serviceName}/cephfs` — List CephFS filesystems
- `GET /dedicated/ceph/{serviceName}/cephfs/{fsName}` — Get a CephFS filesystem
- `POST /dedicated/ceph/{serviceName}/cephfs/{fsName}/enable` — Enable a CephFS filesystem
- `POST /dedicated/ceph/{serviceName}/cephfs/{fsName}/disable` — Disable a CephFS filesystem
- `DELETE /dedicated/ceph/{serviceName}/cephfs/{fsName}` — Delete a CephFS filesystem

## List CephFS filesystems

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

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

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

Returns the CephFS filesystems of the cluster. The list is empty until a filesystem is enabled.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | read-only | Filesystem state |
| `fsName` | string | read-only | Filesystem name |

```json
[
  {
    "enabled": true,
    "fsName": "string"
  }
]
```

### Example

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

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

print_r($result);
?>
```

## Get a CephFS filesystem

`GET /1.0/dedicated/ceph/{serviceName}/cephfs/{fsName}`

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

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

Returns a CephFS filesystem of the cluster.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | read-only | Filesystem state |
| `fsName` | string | read-only | Filesystem name |

```json
{
  "enabled": true,
  "fsName": "string"
}
```

### Example

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

# 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}/cephfs/{fsName}");

print_r($result);
?>
```

## Enable a CephFS filesystem

`POST /1.0/dedicated/ceph/{serviceName}/cephfs/{fsName}/enable`

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

**Status:** Stable production version  
**IAM actions:** `dedicatedCeph:apiovh:cephfs/enable`

Enables the filesystem, which becomes available within a few minutes. Only one filesystem can be enabled, and it must be named fs-default.

### Parameters

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

### 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}/cephfs/{fsName}/enable" \
  -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.post("/dedicated/ceph/{serviceName}/cephfs/{fsName}/enable")

# 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->post("/dedicated/ceph/{serviceName}/cephfs/{fsName}/enable");

print_r($result);
?>
```

## Disable a CephFS filesystem

`POST /1.0/dedicated/ceph/{serviceName}/cephfs/{fsName}/disable`

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

**Status:** Stable production version  
**IAM actions:** `dedicatedCeph:apiovh:cephfs/disable`

Blocks access to the filesystem and keeps its data. The filesystem can be enabled again later.

### Parameters

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

### 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}/cephfs/{fsName}/disable" \
  -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.post("/dedicated/ceph/{serviceName}/cephfs/{fsName}/disable")

# 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->post("/dedicated/ceph/{serviceName}/cephfs/{fsName}/disable");

print_r($result);
?>
```

## Delete a CephFS filesystem

`DELETE /1.0/dedicated/ceph/{serviceName}/cephfs/{fsName}`

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

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

Permanently deletes the filesystem and all its data. Only a disabled filesystem can be deleted.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `fsName` | path | string | yes | Fs name |
| `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}/cephfs/{fsName}" \
  -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}/cephfs/{fsName}")

# 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}/cephfs/{fsName}");

print_r($result);
?>
```
