technitium 0.4.0

Typed async Rust client for the Technitium DNS Server API
Documentation
# Admin: Remove Secondary Node

## Endpoint

`/api/admin/cluster/primary/removeSecondary`

## Method

GET

## Description

Asks the selected Secondary node to leave the Cluster gracefully. The Secondary node will then initiate a Leave Cluster process as if the Leave Cluster action was performed on that node itself. This call can only be made at the Primary node.

## Authentication

Required. Token must be provided via the `token` parameter.

## Permissions

Administration: Delete

## Parameters

| Name | Type | Required | Conditional | Description |
|------|------|----------|-------------|-------------|
| `token` | string | Yes | No | The session token generated by the `login` or the `createToken` call. |
| `secondaryNodeId` | integer | Yes | No | The Secondary node ID which needs to be asked to leave the Cluster. |

## Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `clusterInitialized` | boolean | `true` indicating the cluster is still active. |
| `dnsServerDomain` | string | The FQDN of this DNS server. |
| `version` | string | The DNS server software version. |
| `clusterDomain` | string | The cluster domain name. |
| `heartbeatRefreshIntervalSeconds` | integer | Heartbeat refresh interval. |
| `heartbeatRetryIntervalSeconds` | integer | Heartbeat retry interval. |
| `configRefreshIntervalSeconds` | integer | Config refresh interval. |
| `configRetryIntervalSeconds` | integer | Config retry interval. |
| `nodes` | array | Updated list of cluster node objects (without the removed Secondary). |
| `nodes[].id` | integer | Unique node ID. |
| `nodes[].name` | string | Node FQDN. |
| `nodes[].url` | string | Node HTTPS API URL. |
| `nodes[].ipAddresses` | array of strings | Node IP addresses. |
| `nodes[].type` | string | Node type: `Primary` or `Secondary`. |
| `nodes[].state` | string | Node state: `Self`, `Connected`, or `Unreachable`. |
| `nodes[].lastSeen` | string (datetime) | Timestamp of last contact. |

## Conditional Logic Notes

- This call can only be made at the Primary node.
- The Primary node communicates with the Secondary node to initiate a graceful leave.
- Differs from Delete Secondary Node in that this is a graceful process -- the Secondary node is informed.

## Edge Cases

- If the Secondary node is unreachable, the graceful removal may fail. In that case, use Delete Secondary Node instead.
- After removal, the `nodes` array in the response will no longer contain the removed Secondary node.