technitium 0.4.0

Typed async Rust client for the Technitium DNS Server API
Documentation
# Admin: List Sessions

## Endpoint

`/api/admin/sessions/list`

## Method

GET

## Description

Returns a list of active user sessions.

## Authentication

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

## Permissions

Administration: 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 the API call is intended. When unspecified, the current node is used. Can only be used when Clustering is initialized. |

## Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `sessions` | array | List of active session objects. |
| `sessions[].username` | string | The username associated with the session. |
| `sessions[].isCurrentSession` | boolean | Whether this session is the one making the current request. |
| `sessions[].partialToken` | string | A partial (truncated) token string identifying the session. Used for deletion. |
| `sessions[].type` | string | Session type. Known values: `Standard`, `ApiToken`. |
| `sessions[].tokenName` | string or null | The name given to an API token session. Null for standard sessions. |
| `sessions[].lastSeen` | string (datetime) | ISO 8601 timestamp of the last activity on this session. |
| `sessions[].lastSeenRemoteAddress` | string | IP address from which the session was last accessed. |
| `sessions[].lastSeenUserAgent` | string | User-Agent string from the last request on this session. |

## Conditional Logic Notes

- The `node` parameter is only functional when Clustering is initialized; otherwise it is ignored or may cause an error.

## Edge Cases

- Sessions of type `ApiToken` will have a non-null `tokenName`; sessions of type `Standard` will have `tokenName` as null.
- The `isCurrentSession` flag identifies the session used to make the API call itself.