technitium 0.4.0

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

## Endpoint

`/api/blocked/list`

Obsolete path: `/api/listBlockedZones`

## Method

GET

## Description

Lists all blocked zones. When a specific domain is provided, lists the records for that domain within the blocked zones. Supports browsing up and down through zone labels.

## Authentication

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

## Permissions

Blocked: View

## Parameters

| Name | Type | Required | Conditional | Description |
|------|------|----------|-------------|-------------|
| `token` | string | Yes | No | The session token generated by the `login` or the `createToken` call. |
| `node` | string | No | No | The node domain name for which this API call is intended. When unspecified, the current node is used. This parameter can be used only when Clustering is initialized. |
| `domain` | string | No | No | The domain name to list records for. If not passed, the domain is set to empty string which corresponds to the zone root. |
| `direction` | string | No | No | The direction of browsing the zone. Valid values are `up` and `down`. Default is `down` when parameter is missing. Allows the server to skip empty labels in the domain name when browsing up or down. |

## Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `response.domain` | string | The domain that was queried. |
| `response.zones` | array | List of child zones under the queried domain. |
| `response.records` | array | List of DNS records for the domain. |
| `response.records[].name` | string | The record name (FQDN). |
| `response.records[].type` | string | The DNS record type (e.g., `NS`, `SOA`). |
| `response.records[].ttl` | string | Time to live, formatted as a human-readable string (e.g., `"14400 (4 hours)"`). |
| `response.records[].rData` | object | Record-type-specific data. Structure varies by record type. |
| `response.records[].rData.value` | string | For NS records: the nameserver value. |
| `response.records[].rData.primaryNameServer` | string | For SOA records: the primary nameserver. |
| `response.records[].rData.responsiblePerson` | string | For SOA records: the responsible person email (dot-notation). |
| `response.records[].rData.serial` | integer | For SOA records: the zone serial number. |
| `response.records[].rData.refresh` | integer | For SOA records: refresh interval in seconds. |
| `response.records[].rData.retry` | integer | For SOA records: retry interval in seconds. |
| `response.records[].rData.expire` | integer | For SOA records: expire time in seconds. |
| `response.records[].rData.minimum` | integer | For SOA records: minimum TTL in seconds. |
| `status` | string | `"ok"` on success. |

## Conditional Logic Notes

- The `node` parameter is only functional when Clustering is initialized; otherwise it is ignored or has no effect.
- The `direction` parameter defaults to `down` when omitted. It controls label-skipping behavior for navigating sparse zone trees.
- When `domain` is omitted, the query targets the zone root (empty string), which returns top-level blocked zone entries.

## Edge Cases

- If `domain` is not passed, the API defaults to the zone root (empty string), not an error.
- The `zones` array in the response can be empty if there are no child zones under the queried domain.
- The `records` array can also be empty if no records exist at the queried domain level.
- The `direction` parameter only accepts `up` or `down`; behavior with other values is unspecified.
- The `ttl` field is returned as a human-readable string (e.g., `"14400 (4 hours)"`), not as a raw integer.