Interface ITsakApiClient

Namespace: redb.Tsak.Client
Assembly: redb.Tsak.Client.dll

Contract for the Tsak runtime REST API client.
All methods throw on non-success responses.

public interface ITsakApiClient : IDisposable

Methods

AnalyzeStorageAsync(string?, string?, string?, string?, CancellationToken)

Refreshes the planner statistics of one table, or of the whole database when no table is named (admin).

Task<RedbAnalyzeResult> AnalyzeStorageAsync(string? instance = null, string? context = null, string? table = null, string? schema = null, CancellationToken ct = default)

CordonNodeAsync(string, CancellationToken)

Cordon a node (take on no new work; drain to peers) for planned maintenance.

Task<ClusterCordonResponse> CordonNodeAsync(string nodeId, CancellationToken ct = default)

CreateApiKeyAsync(string, string[]?, string?, DateTime?, CancellationToken)

Create a new API key.

Task<ApiKeyCreatedResponse> CreateApiKeyAsync(string name, string[]? roles = null, string? userId = null, DateTime? expiresAt = null, CancellationToken ct = default)

CreateUserAsync(TsakCreateUserRequest, CancellationToken)

Create a new user.

Task<TsakUserInfo> CreateUserAsync(TsakCreateUserRequest request, CancellationToken ct = default)

DeleteUserAsync(string, CancellationToken)

Delete a user.

Task<TsakUserActionResponse> DeleteUserAsync(string login, CancellationToken ct = default)

DisableWatchdogAsync(CancellationToken)

Disable watchdog monitoring.

Task DisableWatchdogAsync(CancellationToken ct = default)

DiscardExchangeAsync(string, CancellationToken)

Discard a dead-lettered exchange.

Task<ExchangeReplayResult> DiscardExchangeAsync(string entryId, CancellationToken ct = default)

DownloadLogFileAsync(string, CancellationToken)

Download a log file as ZIP bytes.

Task<byte[]> DownloadLogFileAsync(string filename, CancellationToken ct = default)

EnableWatchdogAsync(CancellationToken)

Enable watchdog monitoring.

Task EnableWatchdogAsync(CancellationToken ct = default)

FireJobAsync(string, CancellationToken)

Fire a scheduled job immediately (out of schedule).

Task<SchedulerActionResponse> FireJobAsync(string jobKey, CancellationToken ct = default)

FireJobAsync(string, string?, CancellationToken)

Fire a job of the scheduler of context immediately (out of schedule).

Task<SchedulerActionResponse> FireJobAsync(string jobKey, string? context, CancellationToken ct = default)

ForceStopRouteAsync(string, string, CancellationToken)

Force-stop a route immediately (no drain).

Task<RouteActionResponse> ForceStopRouteAsync(string contextName, string routeId, CancellationToken ct = default)

GetAlertStatusAsync(CancellationToken)

Alert-delivery status: whether delivery is active and which channels are enabled.

Task<AlertDeliveryStatus> GetAlertStatusAsync(CancellationToken ct = default)

GetAssembliesAsync(CancellationToken)

GET /api/system/assemblies — assemblies actually loaded on the node (Admin only).

Task<AssembliesResponse> GetAssembliesAsync(CancellationToken ct = default)

GetAuditAsync(string?, string?, string?, DateTimeOffset?, DateTimeOffset?, int?, int?, CancellationToken)

Query the persistent admin-action audit trail, newest-first. All filters are optional;

Task<AuditQueryResult> GetAuditAsync(string? actor = null, string? action = null, string? target = null, DateTimeOffset? since = null, DateTimeOffset? until = null, int? limit = null, int? offset = null, CancellationToken ct = default)

GetClusterDeployAdviceAsync(CancellationToken)

GET /api/health/deploy/cluster: the same advice for every alive node of the cluster.

Task<ClusterDeployAdviceResponse> GetClusterDeployAdviceAsync(CancellationToken ct = default)

GetClusterStatusAsync(CancellationToken)

Get cluster status.

Task<ClusterStatusResponse> GetClusterStatusAsync(CancellationToken ct = default)

GetConfigAsync(CancellationToken)

Get the effective (merged, redacted) configuration of this node (admin).

Task<EffectiveConfigResult> GetConfigAsync(CancellationToken ct = default)

GetContextAsync(string, CancellationToken)

Get details of a specific context.

Task<ContextDetail> GetContextAsync(string name, CancellationToken ct = default)

GetContextInflightAsync(string, CancellationToken)

Browse all in-flight exchanges across all routes in a context.

Task<InflightExchangeDto[]> GetContextInflightAsync(string contextName, CancellationToken ct = default)

GetDashboardAsync(CancellationToken)

Get aggregated dashboard snapshot.

Task<DashboardSnapshot> GetDashboardAsync(CancellationToken ct = default)

GetDeployAdviceAsync(CancellationToken)

GET /api/health/deploy: hot swap a new package into this node, or deploy it cold. The 409 of a cold deploy is an

Task<DeployAdviceResponse> GetDeployAdviceAsync(CancellationToken ct = default)

GetDiagnosticDumpAsync(CancellationToken)

Get full system diagnostic dump.

Task<DiagnosticDump> GetDiagnosticDumpAsync(CancellationToken ct = default)

GetFailedExchangesAsync(string?, string?, string?, DateTimeOffset?, DateTimeOffset?, int?, int?, CancellationToken)

Query dead-lettered exchanges (failed at a route checkpoint), newest-first, paged.

Task<FailedExchangeQueryResult> GetFailedExchangesAsync(string? context = null, string? route = null, string? status = null, DateTimeOffset? since = null, DateTimeOffset? until = null, int? limit = null, int? offset = null, CancellationToken ct = default)

GetHealthAsync(CancellationToken)

Get system health status.

Task<HealthCheckResult> GetHealthAsync(CancellationToken ct = default)

GetInfoAsync(CancellationToken)

Get system information.

Task<SystemInfoResponse> GetInfoAsync(CancellationToken ct = default)

GetLifecycleEventsAsync(string?, string?, string?, DateTime?, int?, CancellationToken)

Get lifecycle events with optional filters.

Task<LifecycleEvent[]> GetLifecycleEventsAsync(string? context = null, string? route = null, string? type = null, DateTime? since = null, int? limit = null, CancellationToken ct = default)

GetLogFilesAsync(CancellationToken)

List available log files on the worker node.

Task<LogFilesResponse> GetLogFilesAsync(CancellationToken ct = default)

GetLogsAsync(long?, int?, string?, CancellationToken)

Get buffered log entries. Supports incremental fetch via afterId.

Task<LogsResponse> GetLogsAsync(long? afterId = null, int? limit = null, string? level = null, CancellationToken ct = default)

GetLogsBeforeAsync(long, int?, string?, CancellationToken)

Get the buffered log entries older than beforeId, newest first: the page before the oldest

Task<LogsResponse> GetLogsBeforeAsync(long beforeId, int? limit = null, string? level = null, CancellationToken ct = default)

GetMetricsAsync(CancellationToken)

Get system metrics.

Task<MetricsResponse> GetMetricsAsync(CancellationToken ct = default)

GetMetricsHistoryAsync(int, CancellationToken)

Get metrics history over a time window.

Task<MetricsHistoryResponse> GetMetricsHistoryAsync(int minutes = 5, CancellationToken ct = default)

GetModuleAsync(string, CancellationToken)

Get details of a specific module.

Task<ModuleInfo> GetModuleAsync(string name, CancellationToken ct = default)

GetRouteAsync(string, string, CancellationToken)

Get detailed info for a specific route.

Task<RouteDetail> GetRouteAsync(string contextName, string routeId, CancellationToken ct = default)

GetRouteDiagnosticsAsync(string, string, CancellationToken)

Get diagnostic dump for a specific route.

Task<RouteDiagnosticDump> GetRouteDiagnosticsAsync(string contextName, string routeId, CancellationToken ct = default)

GetRouteInflightAsync(string, string, CancellationToken)

Browse in-flight exchanges for a specific route.

Task<InflightExchangeDto[]> GetRouteInflightAsync(string contextName, string routeId, CancellationToken ct = default)

GetRouteMetricsAsync(string, string, CancellationToken)

Get per-route metrics summary.

Task<RouteMetricsSummary> GetRouteMetricsAsync(string contextName, string routeId, CancellationToken ct = default)

GetSchedulerStatusAsync(CancellationToken)

Get scheduler status.

Task<SchedulerStatusResponse> GetSchedulerStatusAsync(CancellationToken ct = default)

GetStorageStatsAsync(string?, string?, CancellationToken)

Index and table statistics of one instance plus the window its usage counters cover (operator).

Task<RedbStorageStats> GetStorageStatsAsync(string? instance = null, string? context = null, CancellationToken ct = default)

GetUserAsync(string, CancellationToken)

Get user by login.

Task<TsakUserInfo> GetUserAsync(string login, CancellationToken ct = default)

GetWatchdogAlertsAsync(CancellationToken)

Get active watchdog alerts.

Task<WatchdogAlert[]> GetWatchdogAlertsAsync(CancellationToken ct = default)

GetWatchdogStatusAsync(CancellationToken)

Get watchdog status and state.

Task<WatchdogState> GetWatchdogStatusAsync(CancellationToken ct = default)

ListApiKeysAsync(CancellationToken)

List all API keys.

Task<ApiKeyInfo[]> ListApiKeysAsync(CancellationToken ct = default)

ListClusterNodesAsync(CancellationToken)

List cluster nodes.

Task<ClusterNodesResponse> ListClusterNodesAsync(CancellationToken ct = default)

ListContextsAsync(CancellationToken)

List all route contexts.

Task<ContextSummary[]> ListContextsAsync(CancellationToken ct = default)

ListEndpointsAsync(string, CancellationToken)

List endpoints for a context.

Task<TsakEndpointInfo[]> ListEndpointsAsync(string contextName, CancellationToken ct = default)

ListModulesAsync(CancellationToken)

List all modules.

Task<ModuleInfo[]> ListModulesAsync(CancellationToken ct = default)

ListRedbInstancesAsync(CancellationToken)

Lists the redb instances of this node: the host's own storage and every named one (operator).

Task<RedbInstanceInfo[]> ListRedbInstancesAsync(CancellationToken ct = default)

ListRoutesAsync(string, CancellationToken)

List all routes in a context.

Task<TsakRouteInfo[]> ListRoutesAsync(string contextName, CancellationToken ct = default)

ListRunningJobsAsync(CancellationToken)

List currently running jobs.

Task<RunningJobsResponse> ListRunningJobsAsync(CancellationToken ct = default)

ListScheduledJobsAsync(CancellationToken)

List scheduled jobs.

Task<ScheduledJobsResponse> ListScheduledJobsAsync(CancellationToken ct = default)

ListUsersAsync(CancellationToken)

List all users.

Task<TsakUserInfo[]> ListUsersAsync(CancellationToken ct = default)

PauseJobAsync(string, CancellationToken)

Pause a specific job.

Task<SchedulerActionResponse> PauseJobAsync(string jobKey, CancellationToken ct = default)

PauseJobAsync(string, string?, CancellationToken)

Pause a job of the scheduler of context.

Task<SchedulerActionResponse> PauseJobAsync(string jobKey, string? context, CancellationToken ct = default)

RebalanceClusterAsync(CancellationToken)

Trigger cluster rebalance.

Task<ClusterRebalanceResponse> RebalanceClusterAsync(CancellationToken ct = default)

RemoveClusterNodeAsync(string, CancellationToken)

Remove a dead/offline cluster node.

Task<ClusterNodeRemovedResponse> RemoveClusterNodeAsync(string nodeId, CancellationToken ct = default)

RemoveContextAsync(string, CancellationToken)

Remove a context.

Task<ContextActionResponse> RemoveContextAsync(string name, CancellationToken ct = default)

RemoveModuleAsync(string, CancellationToken)

Remove a module.

Task<ModuleRemovedResponse> RemoveModuleAsync(string name, CancellationToken ct = default)

ReplayExchangeAsync(string, CancellationToken)

Replay a dead-lettered exchange: re-run its route tail from the captured snapshot.

Task<ExchangeReplayResult> ReplayExchangeAsync(string entryId, CancellationToken ct = default)

ResetRouteStatesAsync(string, CancellationToken)

Reset persisted route states and restart a context.

Task<ContextActionResponse> ResetRouteStatesAsync(string name, CancellationToken ct = default)

RestartContextAsync(string, CancellationToken)

Restart a context.

Task<ContextActionResponse> RestartContextAsync(string name, CancellationToken ct = default)

ResumeJobAsync(string, CancellationToken)

Resume a specific job.

Task<SchedulerActionResponse> ResumeJobAsync(string jobKey, CancellationToken ct = default)

ResumeJobAsync(string, string?, CancellationToken)

Resume a job of the scheduler of context.

Task<SchedulerActionResponse> ResumeJobAsync(string jobKey, string? context, CancellationToken ct = default)

RevokeApiKeyAsync(string, CancellationToken)

Revoke an API key by ID.

Task<ApiKeyRevokedResponse> RevokeApiKeyAsync(string id, CancellationToken ct = default)

RollbackModuleAsync(string, CancellationToken)

Roll a module back to its previous on-disk version.

Task<ModuleDeployResponse> RollbackModuleAsync(string name, CancellationToken ct = default)

StandbySchedulerAsync(CancellationToken)

Put scheduler in standby mode.

Task<SchedulerActionResponse> StandbySchedulerAsync(CancellationToken ct = default)

StandbySchedulerAsync(string?, CancellationToken)

Put the scheduler of context in standby; all when null.

Task<SchedulerActionResponse> StandbySchedulerAsync(string? context, CancellationToken ct = default)

StartContextAsync(string, CancellationToken)

Start a context.

Task<ContextActionResponse> StartContextAsync(string name, CancellationToken ct = default)

StartRouteAsync(string, string, CancellationToken)

Start a route.

Task<RouteActionResponse> StartRouteAsync(string contextName, string routeId, CancellationToken ct = default)

StartSchedulerAsync(CancellationToken)

Start the scheduler.

Task<SchedulerActionResponse> StartSchedulerAsync(CancellationToken ct = default)

StartSchedulerAsync(string?, CancellationToken)

Start (or resume from standby) the scheduler of context; all when null.

Task<SchedulerActionResponse> StartSchedulerAsync(string? context, CancellationToken ct = default)

StopContextAsync(string, CancellationToken)

Stop a context.

Task<ContextActionResponse> StopContextAsync(string name, CancellationToken ct = default)

StopRouteAsync(string, string, int?, CancellationToken)

Stop a route with optional timeout.

Task<RouteActionResponse> StopRouteAsync(string contextName, string routeId, int? timeoutSeconds = null, CancellationToken ct = default)

TestAlertAsync(CancellationToken)

Send a synthetic alert through every enabled channel; returns the per-channel outcome.

Task<AlertTestResult> TestAlertAsync(CancellationToken ct = default)

UncordonNodeAsync(string, CancellationToken)

Uncordon a node — it starts taking on work again.

Task<ClusterCordonResponse> UncordonNodeAsync(string nodeId, CancellationToken ct = default)

UpdateUserAsync(string, TsakUpdateUserRequest, CancellationToken)

Update an existing user.

Task<TsakUserInfo> UpdateUserAsync(string login, TsakUpdateUserRequest request, CancellationToken ct = default)

UploadModuleAsync(byte[], string?, CancellationToken)

Upload a .tpkg package for deployment. signatureBase64 is the

Task<ModuleDeployResponse> UploadModuleAsync(byte[] packageBytes, string? signatureBase64 = null, CancellationToken ct = default)

ValidateModuleAsync(byte[], string?, CancellationToken)

Dry-run validate a .tpkg without installing it.

Task<ModuleDeployResponse> ValidateModuleAsync(byte[] packageBytes, string? signatureBase64 = null, CancellationToken ct = default)