Skip to content

Metrics endpoints

4 endpoints at https://api.vaif.studio, generated from the API's OpenAPI document. The REST API page covers authentication, and All endpoints lists every group.

GET /metrics/project/{projectId}

ParameterInTypeRequired
projectIdpathstringYes
rangequerystringNo
envquerystringNo
Response 200 (application/json)
{
  rollups: {
    id: string;
    orgId: null | string;
    projectId: null | string;
    envId: null | string;
    source: string;
    name: string;
    hourStart: string (date-time);
    count: number;
    errorCount: number;
    p50Ms: null | number;
    p95Ms: null | number;
    p99Ms: null | number;
    createdAt: string (date-time);
  }[];
}

GET /metrics/project/{projectId}/overview

ParameterInTypeRequired
projectIdpathstringYes
Response 200 (application/json)
{
  requestsLast24h: number;
  errorsLast24h: number;
  p95LatencyMs: number;
  hourlyBreakdown: {
    hour: string;
    count: number;
  }[];
} | {
  requestsLast24h: number;
  errorsLast24h: number;
  p95LatencyMs: number;
  hourlyBreakdown: any[];
}

GET /metrics/org/{orgId}

ParameterInTypeRequired
orgIdpathstringYes
rangequerystringNo
envquerystringNo
Response 200 (application/json)
{
  rollups: {
    id: string;
    orgId: null | string;
    projectId: null | string;
    envId: null | string;
    source: string;
    name: string;
    hourStart: string (date-time);
    count: number;
    errorCount: number;
    p50Ms: null | number;
    p95Ms: null | number;
    p99Ms: null | number;
    createdAt: string (date-time);
  }[];
}

GET /metrics/project/{projectId}/report

Observability report: data API traffic and function runs of one environment over 24 h, 7 or 30 days

ParameterInTypeRequired
envIdquerystringNo
periodquerystringNo
projectIdpathstring (uuid)Yes
Response 200 (application/json)
{
  envId: string;
  period: "24h" | "7d" | "30d";
  bucket: "hour" | "day";
  from: string;
  to: string;
  api: {
    totals: {
      requests: number;
      errors: number;
      errorRate: number | null;
      p50Ms: number | null;
      p95Ms: number | null;
      p99Ms: number | null;
    };
    buckets: {
      requests: number;
      errors: number;
      errorRate: number | null;
      p50Ms: number | null;
      p95Ms: number | null;
      p99Ms: number | null;
      time: string;
    }[];
    routes: {
      requests: number;
      errors: number;
      p50Ms: number | null;
      p95Ms: number | null;
      p99Ms: number | null;
      method: string;
      route: string;
    }[];
  };
  functions: {
    totals: {
      invocations: number;
      errors: number;
      timeouts: number;
      skipped: number;
      errorRate: number | null;
      p95Ms: number | null;
    };
    buckets: {
      time: string;
      invocations: number;
      errors: number;
      timeouts: number;
    }[];
  };
}

Errors: 400, 401, 403, 404, with the error body.