API reference · Admin
GET/api/v1/admin/telemetry-settings

Get telemetry settings

Returns tenant admin telemetry status derived from the ALGA_USAGE_STATS environment variable. The handler resolves the tenant with createTenantKnex, requires an authenticated current user, and checks the tenant-scoped users.role value for admin or owner. The route does not read or write tenant telemetry settings from the database. Because this session-authenticated route is not currently in apiKeySkipPaths, API middleware also requires an x-api-key header to be present before the handler can run.

Response body

Success response 200 · schema TelemetrySettingsGetResponse

usageStatsEnabledbooleanRequired
Whether usage statistics are enabled by the ALGA_USAGE_STATS environment variable.
environmentVariablestringRequired
Environment variable controlling telemetry collection.
Enum: ALGA_USAGE_STATS
currentValuestringRequired
Raw ALGA_USAGE_STATS environment value, or not set when absent.
controlledBystringRequired
Telemetry is controlled by process environment, not runtime API writes.
Enum: environment
messagestringRequired
Human-readable explanation of the current telemetry setting.

Response codes

200
Current telemetry setting returned successfully.
401
No authenticated current user, no tenant context, or x-api-key missing at middleware.
403
Authenticated user is not an admin or owner in the tenant.
500
Unexpected failure while loading telemetry settings.