Branch Statistics

https://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/stats

This endpoint presents a number of statistics on a given database's branch.

Expected parameters

NameDescriptionInRequiredSchema
db_branch_name

The DBBranchName matches the pattern {db_name}:{branch_name}.

path✅string

Branch Stats

GET
https://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/stats

Get branch usage metrics.

Responses

type GetBranchStats = {
    timestamp: string;
    interval: string;
    resolution: string;
    numberOfRecords?: MetricsDatapoint[];
    writesOverTime?: MetricsDatapoint[];
    readsOverTime?: MetricsDatapoint[];
    readLatency?: MetricsLatency;
    writeLatency?: MetricsLatency;
    warning?: string;
};
 
type MetricsDatapoint = {
    timestamp: string;
    value: number;
};
 
type MetricsLatency = {
    p50?: MetricsDatapoint[];
    p90?: MetricsDatapoint[];
};