# Reseller ACL

<a id="get-api-v1-resellers-acl-plans"></a>
#### `GET /api/v1/resellers/acl-plans`

*List Acl Plans*

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `object` | Successful Response |

**Response example (200):**

```json
{}
```

**cURL example:**

```bash
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/resellers/acl-plans
```

---

<a id="post-api-v1-resellers-acl-plans"></a>
#### `POST /api/v1/resellers/acl-plans`

*Create Acl Plan*

**Body fields:**

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `description` | string | no | — |
| `name` | string | yes | minLength=1; maxLength=100 |
| `permissions` | ResellerACLPermissions | no | — |

**Request body example:**

```json
{
  "description": "string",
  "name": "string",
  "permissions": {
    "account_create": true,
    "account_ip_change": false,
    "account_password_change": true,
    "account_plan_change": true,
    "account_suspend": true,
    "account_terminate": true,
    "api_access": false,
    "backup_create": true,
    "backup_download": true,
    "backup_remote": false,
    "backup_restore": true,
    "client_sso": true,
    "cron_manage": true,
    "database_manage": true,
    "database_phpmyadmin": true,
    "database_remote_access": false,
    "dns_dnssec": false,
    "dns_manage": true,
    "dns_zone_edit": true,
    "email_manage": true,
    "email_webmail": true,
    "file_manager": true,
    "file_manager_edit": true,
    "ftp_manage": true,
    "log_access": true,
    "modsecurity_manage": false,
    "php_extensions_manage": false,
    "php_version_change": true,
    "resource_usage_view": true,
    "shell_access": false,
    "ssl_install_custom": false,
    "ssl_manage": true
  }
}
```

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `object` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{}
```

**cURL example:**

```bash
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/resellers/acl-plans
```

---

<a id="delete-api-v1-resellers-acl-plans-acl-id"></a>
#### `DELETE /api/v1/resellers/acl-plans/{acl_id}`

*Delete Acl Plan*

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `acl_id` | string | yes | — |

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `object` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{}
```

**cURL example:**

```bash
curl -X DELETE \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/resellers/acl-plans/{acl_id}
```

---

<a id="get-api-v1-resellers-acl-plans-acl-id"></a>
#### `GET /api/v1/resellers/acl-plans/{acl_id}`

*Get Acl Plan*

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `acl_id` | string | yes | — |

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `object` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{}
```

**cURL example:**

```bash
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/resellers/acl-plans/{acl_id}
```

---

<a id="put-api-v1-resellers-acl-plans-acl-id"></a>
#### `PUT /api/v1/resellers/acl-plans/{acl_id}`

*Update Acl Plan*

Name, description and permissions are each optional. `permissions`, when sent, replaces the plan's whole permission set: a key left out takes its default value, not the stored one — read the plan first and send its set back with the change. An update that changes nothing writes no audit row.

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `acl_id` | string | yes | — |

**Body fields:**

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `description` | string | no | — |
| `name` | string | no | — |
| `permissions` | ResellerACLPermissions | no | — |

**Request body example:**

```json
{
  "description": "string",
  "name": "string",
  "permissions": {
    "account_create": true,
    "account_ip_change": false,
    "account_password_change": true,
    "account_plan_change": true,
    "account_suspend": true,
    "account_terminate": true,
    "api_access": false,
    "backup_create": true,
    "backup_download": true,
    "backup_remote": false,
    "backup_restore": true,
    "client_sso": true,
    "cron_manage": true,
    "database_manage": true,
    "database_phpmyadmin": true,
    "database_remote_access": false,
    "dns_dnssec": false,
    "dns_manage": true,
    "dns_zone_edit": true,
    "email_manage": true,
    "email_webmail": true,
    "file_manager": true,
    "file_manager_edit": true,
    "ftp_manage": true,
    "log_access": true,
    "modsecurity_manage": false,
    "php_extensions_manage": false,
    "php_version_change": true,
    "resource_usage_view": true,
    "shell_access": false,
    "ssl_install_custom": false,
    "ssl_manage": true
  }
}
```

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `object` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{}
```

**cURL example:**

```bash
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/resellers/acl-plans/{acl_id}
```

---
