# Storage & Backup › File Storage › Enterprise File Storage › Access Control 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

> 6 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/file-storage/enterprise-file-storage/access-control/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/storage-backup/file-storage/enterprise-file-storage/access-control.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/storage-backup/file-storage/enterprise-file-storage/access-control.json?format=openapi3

## Operations

- `GET /storage/netapp/{serviceName}/share/{shareId}/accessPath` — List access paths
- `GET /storage/netapp/{serviceName}/share/{shareId}/acl` — List ACLs
- `GET /storage/netapp/{serviceName}/share/{shareId}/accessPath/{accessPathId}` — Get an access path
- `GET /storage/netapp/{serviceName}/share/{shareId}/acl/{aclRuleId}` — Get an ACL
- `POST /storage/netapp/{serviceName}/share/{shareId}/acl` — Create an ACL
- `DELETE /storage/netapp/{serviceName}/share/{shareId}/acl/{aclRuleId}` — Delete an ACL

## List access paths

`GET /1.0/storage/netapp/{serviceName}/share/{shareId}/accessPath`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/access-control/#get-storage-netapp-servicename-share-shareid-accesspath

**Status:** Stable production version  
**IAM actions:** `storageNetApp:apiovh:share/accessPath/get`

Returns the paths used to mount the share, with the preferred one first. The list stays empty until the network status of the service is associated.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | storage.NetAppShareAccessPath[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | read-only | Access path ID |
| `path` | string | read-only | Access path, in the form IP:/junction-path |
| `preferred` | boolean | read-only | Is this the preferred access path? |

```json
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "path": "string",
    "preferred": true
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}/accessPath" \
  -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("/storage/netapp/{serviceName}/share/{shareId}/accessPath")

# 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("/storage/netapp/{serviceName}/share/{shareId}/accessPath");

print_r($result);
?>
```

## List ACLs

`GET /1.0/storage/netapp/{serviceName}/share/{shareId}/acl`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/access-control/#get-storage-netapp-servicename-share-shareid-acl

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

Returns the ACLs of the share, including those still being applied or removed. Check the status of each ACL to know whether it is in effect.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | storage.NetAppShareACLRule[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessLevel` | storage.NetAppShareACLPermissionEnum | yes | Rule access level — one of `ro`, `rw` |
| `accessTo` | string | yes | Rule destination |
| `accessType` | storage.NetAppShareACLTypeEnum | read-only | Rule access type — one of `ip` |
| `createdAt` | string (date-time) | read-only | Rule creation date |
| `id` | string (uuid) | read-only | Rule ID |
| `status` | storage.NetAppShareACLStatusEnum | read-only | Rule status — one of `active`, `applying`, `denying`, `error`, `queued_to_apply`, `queued_to_deny` |

```json
[
  {
    "accessLevel": "ro",
    "accessTo": "string",
    "accessType": "ip",
    "createdAt": "2024-01-01T12:00:00Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "status": "active"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}/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("/storage/netapp/{serviceName}/share/{shareId}/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("/storage/netapp/{serviceName}/share/{shareId}/acl");

print_r($result);
?>
```

## Get an access path

`GET /1.0/storage/netapp/{serviceName}/share/{shareId}/accessPath/{accessPathId}`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/access-control/#get-storage-netapp-servicename-share-shareid-accesspath-accesspathid

**Status:** Stable production version  
**IAM actions:** `storageNetApp:apiovh:share/accessPath/get`

Returns the path used to mount the share. The preferred path goes through the storage node that hosts the share.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `accessPathId` | path | string (uuid) | yes | Access path ID |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | storage.NetAppShareAccessPath | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | read-only | Access path ID |
| `path` | string | read-only | Access path, in the form IP:/junction-path |
| `preferred` | boolean | read-only | Is this the preferred access path? |

```json
{
  "id": "00000000-0000-0000-0000-000000000000",
  "path": "string",
  "preferred": true
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}/accessPath/{accessPathId}" \
  -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("/storage/netapp/{serviceName}/share/{shareId}/accessPath/{accessPathId}")

# 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("/storage/netapp/{serviceName}/share/{shareId}/accessPath/{accessPathId}");

print_r($result);
?>
```

## Get an ACL

`GET /1.0/storage/netapp/{serviceName}/share/{shareId}/acl/{aclRuleId}`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/access-control/#get-storage-netapp-servicename-share-shareid-acl-aclruleid

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

Returns the ACL and its status. An ACL in error is not applied to the share: delete it and create it again.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `aclRuleId` | path | string (uuid) | yes | Acl rule ID |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | storage.NetAppShareACLRule | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessLevel` | storage.NetAppShareACLPermissionEnum | yes | Rule access level — one of `ro`, `rw` |
| `accessTo` | string | yes | Rule destination |
| `accessType` | storage.NetAppShareACLTypeEnum | read-only | Rule access type — one of `ip` |
| `createdAt` | string (date-time) | read-only | Rule creation date |
| `id` | string (uuid) | read-only | Rule ID |
| `status` | storage.NetAppShareACLStatusEnum | read-only | Rule status — one of `active`, `applying`, `denying`, `error`, `queued_to_apply`, `queued_to_deny` |

```json
{
  "accessLevel": "ro",
  "accessTo": "string",
  "accessType": "ip",
  "createdAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "active"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}/acl/{aclRuleId}" \
  -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("/storage/netapp/{serviceName}/share/{shareId}/acl/{aclRuleId}")

# 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("/storage/netapp/{serviceName}/share/{shareId}/acl/{aclRuleId}");

print_r($result);
?>
```

## Create an ACL

`POST /1.0/storage/netapp/{serviceName}/share/{shareId}/acl`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/access-control/#post-storage-netapp-servicename-share-shareid-acl

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

Grants an IPv4 address or IPv4 CIDR block read-only or read-write access to the share. Creation is asynchronous: the ACL is returned with status queued_to_apply, follow its status until active. The call is rejected while the share is being created, resized, reverted or replicated.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Request body (required)

Type: `storage.NetAppShareACLRule`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessLevel` | storage.NetAppShareACLPermissionEnum | yes | Rule access level — one of `ro`, `rw` |
| `accessTo` | string | yes | Rule destination |
| `accessType` | storage.NetAppShareACLTypeEnum | read-only | Rule access type — one of `ip` |
| `createdAt` | string (date-time) | read-only | Rule creation date |
| `id` | string (uuid) | read-only | Rule ID |
| `status` | storage.NetAppShareACLStatusEnum | read-only | Rule status — one of `active`, `applying`, `denying`, `error`, `queued_to_apply`, `queued_to_deny` |

```json
{
  "accessLevel": "ro",
  "accessTo": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | storage.NetAppShareACLRule | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessLevel` | storage.NetAppShareACLPermissionEnum | yes | Rule access level — one of `ro`, `rw` |
| `accessTo` | string | yes | Rule destination |
| `accessType` | storage.NetAppShareACLTypeEnum | read-only | Rule access type — one of `ip` |
| `createdAt` | string (date-time) | read-only | Rule creation date |
| `id` | string (uuid) | read-only | Rule ID |
| `status` | storage.NetAppShareACLStatusEnum | read-only | Rule status — one of `active`, `applying`, `denying`, `error`, `queued_to_apply`, `queued_to_deny` |

```json
{
  "accessLevel": "ro",
  "accessTo": "string",
  "accessType": "ip",
  "createdAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "active"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}/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: storage.NetAppShareACLRule
result = client.post("/storage/netapp/{serviceName}/share/{shareId}/acl",
	accessLevel = None, # Rule access level (type: storage.NetAppShareACLPermissionEnum, nullable)
	accessTo = None, # Rule destination (type: string, nullable)
)

# 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: storage.NetAppShareACLRule
$result = $ovh->post("/storage/netapp/{serviceName}/share/{shareId}/acl", array(
	accessLevel => null, // Rule access level (type: storage.NetAppShareACLPermissionEnum, nullable)
	accessTo => null, // Rule destination (type: string, nullable)
));

print_r($result);
?>
```

## Delete an ACL

`DELETE /1.0/storage/netapp/{serviceName}/share/{shareId}/acl/{aclRuleId}`

Link: https://developers.eu.ovhcloud.com/reference/storage-backup/file-storage/enterprise-file-storage/access-control/#delete-storage-netapp-servicename-share-shareid-acl-aclruleid

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

Revokes access to the share. Clients already mounting the share using it lose access. Deletion is asynchronous: the ACL stays listed with status queued_to_deny or denying until it is removed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `aclRuleId` | path | string (uuid) | yes | Acl rule ID |
| `serviceName` | path | string (uuid) | yes | Service name |
| `shareId` | path | string (uuid) | yes | Share ID |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/storage/netapp/{serviceName}/share/{shareId}/acl/{aclRuleId}" \
  -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("/storage/netapp/{serviceName}/share/{shareId}/acl/{aclRuleId}")

# 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("/storage/netapp/{serviceName}/share/{shareId}/acl/{aclRuleId}");

print_r($result);
?>
```
