technitium 0.4.0

Typed async Rust client for the Technitium DNS Server API
Documentation
# Import Blocked Zones

## Endpoint

`/api/blocked/import`

Obsolete path: `/api/importBlockedZones`

## Method

POST

## Description

Imports domain names into Blocked Zones. Accepts a comma-separated list of domain names in the request body and adds them all to the Blocked Zones in a single operation.

## Authentication

Required. A valid session token generated by the `login` or `createToken` call.

## Permissions

Blocked: Modify

## Parameters

### Query Parameters

| Name | Type | Required | Conditional | Description |
|------|------|----------|-------------|-------------|
| `token` | string | Yes | No | The session token generated by the `login` or the `createToken` call. |

### Body Parameters

Content-Type must be `application/x-www-form-urlencoded`.

| Name | Type | Required | Conditional | Description |
|------|------|----------|-------------|-------------|
| `blockedZones` | string | Yes | No | A comma-separated list of domain names to be imported into the Blocked Zones. Example: `google.com,twitter.com` |

## Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `status` | string | `"ok"` on success. |

## Conditional Logic Notes

- This is the only Blocked Zones endpoint that uses the POST method; all others use GET.
- The request body must use `application/x-www-form-urlencoded` content type, not JSON or multipart.
- The `token` is passed as a query parameter in the URL, while `blockedZones` is passed in the request body.

## Edge Cases

- The `blockedZones` body parameter is a comma-separated string, not a JSON array. Domains should not be quoted or wrapped in brackets.
- Behavior when importing domains that already exist in the Blocked Zones is unspecified; likely idempotent (duplicates are silently ignored).
- Behavior with an empty `blockedZones` value is unspecified.
- Behavior with whitespace around commas (e.g., `google.com, twitter.com`) is unspecified; it is safer to not include spaces.
- No `node` parameter is documented, so cluster-aware targeting may not be supported.
- The response provides no count or list of which domains were actually imported.