fn blocking_get_settings()
Get the stored subset of the server settings (blocking, web-service TLS, DNSSEC validation, DNS-over-TLS).
fn blocking_set_state(enable: boolean)
Enable or disable DNS blocking permanently (writes only `enableBlocking`).
| Argument | Type | Required | Description |
|---|
| enable | boolean | yes | |
fn blocking_temporary_disable(minutes: number)
Temporarily disable blocking for N minutes; it re-enables automatically afterwards.
| Argument | Type | Required | Description |
|---|
| minutes | number | yes | Minutes to disable blocking (e.g. 5, 15, 30, 60, 1440) |
fn blocking_set_lists(blockListUrls?: array, allowListUrls?: array)
Set the block-list and/or allow-list URLs; only the lists you provide are changed, and an
| Argument | Type | Required | Description |
|---|
| blockListUrls? | array | no | |
| allowListUrls? | array | no | |
fn blocking_force_update_lists()
Force an immediate refresh of all configured block-list URLs.
fn web_service_set_tls(certificatePath?: string, certificatePassword?: string, useSelfSignedCertificate?: boolean, enableTls?: boolean, tlsPort?: number, httpToTlsRedirect?: boolean)
Configure the admin web service TLS (HTTPS) listener: install a
| Argument | Type | Required | Description |
|---|
| certificatePath? | string | no | PKCS#12 (.pfx/.p12) cert path on the server. Relative paths resolve |
| certificatePassword? | string | no | Export password for the PKCS#12 file. Supply via vault expression. |
| useSelfSignedCertificate? | boolean | no | Set false when installing a real cert via certificatePath. |
| enableTls? | boolean | no | Enable/disable the HTTPS listener (webServiceTlsPort). |
| tlsPort? | number | no | HTTPS listener port (Technitium default 53443). |
| httpToTlsRedirect? | boolean | no | Redirect plaintext HTTP to HTTPS. Enable only AFTER verifying the cert. |
fn dnssec_validation_set(enable: boolean)
Enable or disable DNSSEC validation of upstream answers
| Argument | Type | Required | Description |
|---|
| enable | boolean | yes | Whether the resolver validates DNSSEC on upstream answers. |
fn zone_list()
List all zones (factory: one `zone` per entry, keyed by zone name).
fn zone_create(zone: string, catalog?: string)
Create an authoritative zone. If a zone of the same type, in the `catalog` given if any, already exists it is left as it is (`unchanged`); any other existing zone is an error.
| Argument | Type | Required | Description |
|---|
| zone | string | yes | Zone name, e.g. lab.example.com |
| catalog? | string | no | Name of an existing catalog zone to join as a member zone, so secondaries |
fn zone_delete(zone: string)
Delete a zone. A zone that does not exist is reported as deleted.
| Argument | Type | Required | Description |
|---|
| zone | string | yes | |
fn zone_enable(zone: string)
Enable a previously disabled zone.
| Argument | Type | Required | Description |
|---|
| zone | string | yes | |
fn zone_disable(zone: string)
Disable a zone without deleting it.
| Argument | Type | Required | Description |
|---|
| zone | string | yes | |
fn record_list(zone: string)
List all records in a zone (factory: one `zoneRecord` per record).
| Argument | Type | Required | Description |
|---|
| zone | string | yes | |
fn record_get(zone?: string, domain: string)
Read the live records at a single domain straight from Technitium (factory: one `zoneRecord` each). Ground-truth read-back for one name — unlike `record_list` it queries a single domain rather than the whole zone.
| Argument | Type | Required | Description |
|---|
| zone? | string | no | Zone name; inferred by Technitium if omitted |
| domain | string | yes | Record owner FQDN to read live |
fn record_add(zone?: string, domain: string, type: string, ttl?: number)
Add a record. `rData` carries the type-specific fields (e.g. { ipAddress } for A, { cname } for CNAME, { exchange, preference } for MX).
| Argument | Type | Required | Description |
|---|
| zone? | string | no | Zone name; inferred from domain if omitted |
| domain | string | yes | Record owner FQDN |
| type | string | yes | A | AAAA | CNAME | TXT | MX | SRV | NS | PTR | ... |
| ttl? | number | no | |
fn record_update(zone?: string, domain: string, type: string, ttl?: number, disable?: boolean, comments?: string, expiryTtl?: number, newDomain?: string)
Update a record. `rData` identifies the existing record; `newRData` carries the new values (mapped to Technitium's new* params, except for APP, CNAME and DNAME, which take the new values as they are).
| Argument | Type | Required | Description |
|---|
| zone? | string | no | |
| domain | string | yes | |
| type | string | yes | |
| ttl? | number | no | New TTL; the record's current TTL is kept when omitted |
| disable? | boolean | no | Disable or enable the record; its current state is kept when omitted |
| comments? | string | no | New comment; the current comment is kept when omitted |
| expiryTtl? | number | no | Seconds after last modification to auto-delete (0 = never); kept when omitted |
| newDomain? | string | no | Rename the record owner, if set |
fn record_ensure(records: array)
Make records match the given data and TTL, safe to rerun: adds a record that is missing, updates one whose TTL differs, and leaves one that already matches (action `unchanged`). Each entry's `mode` decides what happens to other records of its type at its name: `replace` makes it the only one (the others are removed and stored as `deleted`); `add` leaves them as they are. Fans out over `records` in one run.
| Argument | Type | Required | Description |
|---|
| records | array | yes | |
fn record_delete(zone?: string, domain: string, type: string)
Delete a record. `rData` identifies which record (e.g. { ipAddress }).
| Argument | Type | Required | Description |
|---|
| zone? | string | no | |
| domain | string | yes | |
| type | string | yes | |
fn allowed_add(domain: string)
Add a domain to the built-in Allowed zone.
| Argument | Type | Required | Description |
|---|
| domain | string | yes | |
fn allowed_delete(domain: string)
Remove a domain from the built-in Allowed zone.
| Argument | Type | Required | Description |
|---|
| domain | string | yes | |
fn allowed_list(domain?: string)
List every domain in the built-in Allowed zone, or under `domain` (factory: one `listEntry` per domain). Walks the zone's label tree, one API call per branching node.
| Argument | Type | Required | Description |
|---|
| domain? | string | no | List only this domain and the domains under it; the whole zone if omitted |
fn allowed_flush()
Remove all domains from the built-in Allowed zone.
fn blocked_add(domain: string)
Add a domain to the built-in Blocked zone.
| Argument | Type | Required | Description |
|---|
| domain | string | yes | |
fn blocked_delete(domain: string)
Remove a domain from the built-in Blocked zone.
| Argument | Type | Required | Description |
|---|
| domain | string | yes | |
fn blocked_list(domain?: string)
List every domain in the built-in Blocked zone, or under `domain` (factory: one `listEntry` per domain). Walks the zone's label tree, one API call per branching node.
| Argument | Type | Required | Description |
|---|
| domain? | string | no | List only this domain and the domains under it; the whole zone if omitted |
fn blocked_flush()
Remove all domains from the built-in Blocked zone.
fn client_resolve(domain: string, type?: string, server?: string, protocol?: enum, dnssecValidation?: boolean)
Resolve a domain via the server's DNS client, for debugging. Output is ephemeral.
| Argument | Type | Required | Description |
|---|
| domain | string | yes | |
| type? | string | no | |
| server? | string | no | this-server | recursive-resolver | system-dns | <ip/hostname> |
| protocol? | enum | no | |
| dnssecValidation? | boolean | no | |
fn logs_query(appName?: string, classPath?: string, pageNumber?: number, entriesPerPage?: number, descendingOrder?: boolean, start?: string, end?: string, clientIpAddress?: string, protocol?: string, responseType?: string, rcode?: string, qname?: string, qtype?: string, qclass?: string)
Query recent DNS query logs, one page per call (factory: one `queryLog` per entry, keyed on its content, plus a `queryLogPage` with the page and the totals). Requires the Query Logs (Sqlite) DNS app to be installed.
| Argument | Type | Required | Description |
|---|
| appName? | string | no | DNS app providing query logs (override if your install differs) |
| classPath? | string | no | App class path (override if your install differs) |
| pageNumber? | number | no | |
| entriesPerPage? | number | no | |
| descendingOrder? | boolean | no | |
| start? | string | no | ISO 8601 start time |
| end? | string | no | ISO 8601 end time |
| clientIpAddress? | string | no | |
| protocol? | string | no | |
| responseType? | string | no | |
| rcode? | string | no | DNS response code, e.g. NxDomain |
| qname? | string | no | |
| qtype? | string | no | |
| qclass? | string | no | |
fn cache_flush()
Flush the entire DNS cache.
fn cache_list(domain?: string)
List cached zones/records under a domain (factory: one `cacheEntry` per name).
| Argument | Type | Required | Description |
|---|
| domain? | string | no | Sub-tree to list; root if omitted |
fn cache_delete(domain: string)
Delete a cached domain entry.
| Argument | Type | Required | Description |
|---|
| domain | string | yes | |
fn dashboard_stats(start?: string, end?: string)
Get dashboard query statistics for a time range.
| Argument | Type | Required | Description |
|---|
| start? | string | no | ISO 8601 start (when type=Custom) |
| end? | string | no | ISO 8601 end (when type=Custom) |
fn settings_backup(options?: record)
Download a full settings backup (zip) and store it as a `backup` file. May contain secrets.
| Argument | Type | Required | Description |
|---|
| options? | record | no | |
fn settings_restore(filePath: string, options?: record, deleteExistingFiles?: boolean)
Restore settings from a local backup zip (multipart upload). Verify the file before running this.
| Argument | Type | Required | Description |
|---|
| filePath | string | yes | Absolute path to the backup zip on the swamp host |
| options? | record | no | |
| deleteExistingFiles? | boolean | no | Delete the server's existing files for each section being restored |