Class StorageController
Storage maintenance of the redb instances this node can reach.
GET /api/storage/instances — the host's own storage and every named instance a context declares
GET /api/storage/stats — index and table statistics of one instance, plus the counter window
POST /api/storage/analyze — refresh the planner statistics, of one table or of the whole database
Reads sit at operator level, not viewer: index and column names describe the application's data model, the
same reasoning that puts diagnostic dumps there. The refresh is an admin action and is audited — on a large
database it runs for minutes and it writes.
The instance is named in the query string, never in the path: instance names come from configuration keys
and a path segment cannot carry every character one might hold.
[Route("/api/storage")]
[RequiresRole(new string[] { "operator" })]
public class StorageController : RedbController
Inheritance
Inherited Members
Methods
Analyze(string?, string?, string?, string?)
Refreshes the planner statistics. Without table the whole database is analyzed, which on a large
[HttpPost("/analyze")]
[RequiresRole(new string[] { "admin" })]
public Task<object?> Analyze(string? instance, string? context, string? table, string? schema)
GetStats(string?, string?)
[HttpGet("/stats")]
public Task<object?> GetStats(string? instance, string? context)
ListInstances()
[HttpGet("/instances")]
public object ListInstances()