UI Inspect
API Reference

Performance

API endpoints for tracking Core Web Vitals, performance snapshots, and budgets.

performance.list

List performance snapshots with optional filtering.

TypeQuery
AuthProtected

Input:

{
  projectId?: string;
  limit?: number;
}

performance.latest

Get the latest performance snapshot per URL for a project.

TypeQuery
AuthProtected

Input:

{
  projectId: string;
}

performance.history

Get performance history for a specific URL.

TypeQuery
AuthProtected

Input:

{
  projectId: string;
  url: string;
  limit?: number;
}

performance.record

Record a new performance snapshot with Core Web Vitals.

TypeMutation
AuthProtected

Input:

{
  projectId: string;
  url: string;
  fcp?: number;       // First Contentful Paint (ms)
  lcp?: number;       // Largest Contentful Paint (ms)
  cls?: number;       // Cumulative Layout Shift
  tbt?: number;       // Total Blocking Time (ms)
  si?: number;        // Speed Index (ms)
  tti?: number;       // Time to Interactive (ms)
  ttfb?: number;      // Time to First Byte (ms)
  score: number;      // Overall score (0-100)
  device?: "mobile" | "desktop";
}

Response:

{
  snapshot: PerformanceSnapshot;
  violations: BudgetViolation[];  // Any budget thresholds exceeded
}

performance.stats

Get aggregate performance statistics.

TypeQuery
AuthProtected
InputNone

Response:

{
  totalSnapshots: number;
  averageScore: number;
  urlsTracked: number;
  latestScore: number;
}

performance.delete

Delete a performance snapshot.

TypeMutation
AuthProtected

Input: { id: string }


Performance budgets

performance.listBudgets

List budgets for a project.

TypeQuery
AuthProtected

Input: { projectId: string }


performance.listAllBudgets

List all budgets across all projects.

TypeQuery
AuthProtected

performance.createBudget

Create a performance budget threshold.

TypeMutation
AuthProtected

Input:

{
  projectId: string;
  name: string;
  url?: string;
  metric: "fcp" | "lcp" | "cls" | "tbt" | "si" | "tti" | "ttfb" | "score";
  threshold: number;
  operator?: "lte" | "gte";  // Default: "lte"
}

performance.updateBudget

TypeMutation
AuthProtected

Input:

{
  id: string;
  name?: string;
  threshold?: number;
  enabled?: boolean;
  operator?: "lte" | "gte";
}

performance.deleteBudget

TypeMutation
AuthProtected

Input: { id: string }

On this page