Skip to main content

usage_handler

Function usage_handler 

Source
pub async fn usage_handler<A: DatabaseAdapter>(
    __arg0: State<AppState<A>>,
    __arg1: Query<UsageQueryParams>,
) -> Result<Json<UsageResponse>, (StatusCode, Json<Value>)>
Expand description

Query mutation usage statistics for a tenant and period.

Returns 400 when period is not a valid YYYY-MM string. Returns 200 with empty mutations for unknown tenant/period combinations.

ยงErrors

Returns (400, {"error": "invalid period format"}) when the period query parameter is not in YYYY-MM format.