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

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

## Operations

- `GET /dedicated/ceph/{serviceName}/user` — List Ceph users
- `GET /dedicated/ceph/{serviceName}/user/{userName}` — Get a Ceph user
- `POST /dedicated/ceph/{serviceName}/user` — Create a Ceph user
- `DELETE /dedicated/ceph/{serviceName}/user/{userName}` — Delete a Ceph user

## List Ceph users

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

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

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

Returns the Ceph users of the cluster.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `key` | string | read-only | Key of user to connect into cluster |
| `keyType` | dedicated.ceph.userGet.response.keyTypeEnum | read-only | Type of the user key — one of `AES`, `AES256K` |
| `mdsCaps` | string | read-only | Capabilities of user on MDS |
| `monCaps` | string | read-only | Capabilities of user on MON |
| `name` | string | read-only | Name of ceph user |
| `osdCaps` | string | read-only | Capabilities of user on OSD |
| `serviceName` | string | read-only | ID of cluster |

```json
[
  {
    "key": "string",
    "keyType": "AES",
    "mdsCaps": "string",
    "monCaps": "string",
    "name": "string",
    "osdCaps": "string",
    "serviceName": "string"
  }
]
```

### Example

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

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

print_r($result);
?>
```

## Get a Ceph user

`GET /1.0/dedicated/ceph/{serviceName}/user/{userName}`

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

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

Returns a Ceph user. Use its key to connect a client to the cluster.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `key` | string | read-only | Key of user to connect into cluster |
| `keyType` | dedicated.ceph.userGet.response.keyTypeEnum | read-only | Type of the user key — one of `AES`, `AES256K` |
| `mdsCaps` | string | read-only | Capabilities of user on MDS |
| `monCaps` | string | read-only | Capabilities of user on MON |
| `name` | string | read-only | Name of ceph user |
| `osdCaps` | string | read-only | Capabilities of user on OSD |
| `serviceName` | string | read-only | ID of cluster |

```json
{
  "key": "string",
  "keyType": "AES",
  "mdsCaps": "string",
  "monCaps": "string",
  "name": "string",
  "osdCaps": "string",
  "serviceName": "string"
}
```

### Example

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

# 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}/user/{userName}");

print_r($result);
?>
```

## Create a Ceph user

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

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

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

Creates a Ceph user with no pool permissions. The name must contain at least three characters.

### Parameters

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

### Request body (required)

Type: `dedicated.ceph.user.Create`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `keyType` | dedicated.ceph.userCreate.keyTypeEnum |  | Type of the generated user key, AES unless given — one of `AES`, `AES256K` |
| `userName` | string | yes | Name of the new user |

```json
{
  "keyType": "AES",
  "userName": "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}/user" \
  -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.user.Create
result = client.post("/dedicated/ceph/{serviceName}/user",
	keyType = None, # Type of the generated user key, AES unless given (type: dedicated.ceph.userCreate.keyTypeEnum)
	userName = None, # Name of the new user (type: string)
)

# 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.user.Create
$result = $ovh->post("/dedicated/ceph/{serviceName}/user", array(
	keyType => null, // Type of the generated user key, AES unless given (type: dedicated.ceph.userCreate.keyTypeEnum)
	userName => null, // Name of the new user (type: string)
));

print_r($result);
?>
```

## Delete a Ceph user

`DELETE /1.0/dedicated/ceph/{serviceName}/user/{userName}`

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

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

Deletes the Ceph user from the cluster.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |
| `userName` | path | string | yes | User 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}/user/{userName}" \
  -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}/user/{userName}")

# 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}/user/{userName}");

print_r($result);
?>
```
