Skip to content

Realtime endpoints

10 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.

POST /realtime/token

Authentication: a project API key or a bearer token (API keys).

Response 200 (application/json)
{
  token: string;
  expiresIn: number;
}

Errors: 401, 403, 429, with the error body.

POST /realtime/console-token

Request body (application/json)
{
  projectId: string;
  envId: string;
}
Response 200 (application/json)
{
  token: string;
  expiresIn: number;
}

POST /realtime/install

Request body (application/json)
{
  projectId: string;
  envId?: string;
  tables?: string[];
  allowProduction?: boolean;
}
Response 200 (application/json)
{
  ok: boolean;
  installed: boolean;
  schema: string;
  tables: string[];
}

POST /realtime/uninstall

Request body (application/json)
{
  projectId: string;
  envId?: string;
  tables: string[];
  allowProduction?: boolean;
}
Response 200 (application/json)
{
  ok: boolean;
  uninstalled: boolean;
  schema: string;
  tables: string[];
}

POST /realtime/enable-all

Request body (application/json)
{
  projectId: string;
  envId?: string;
  allowProduction?: boolean;
}
Response 200 (application/json)
{
  ok: boolean;
  tablesEnabled: number;
}

GET /realtime/status/project/{projectId}

ParameterInTypeRequired
projectIdpathstringYes
envIdquerystringNo
Response 200 (application/json)
{
  ok: boolean;
  envId: string;
  schema: string;
  tables: any;
}

GET /realtime/stats/project/{projectId}

ParameterInTypeRequired
projectIdpathstringYes
Response 200 (application/json)
{
  ok: boolean;
  connections: number;
  subscriptions: number;
  tables: string[];
  eventsDelivered24h: number;
  connectionsToday: number;
  disconnectsToday: number;
}

GET /realtime/connections/project/{projectId}

ParameterInTypeRequired
projectIdpathstringYes
Response 200 (application/json)
{
  ok: boolean;
  connections: {
    id: string;
    schema: string;
    transport: "sse" | "ws";
    subscriptions: string[];
    userId: null | string;
    connectedAt: string;
    subscribedAt: string;
  }[];
}

GET /realtime/subscriptions/project/{projectId}

ParameterInTypeRequired
projectIdpathstringYes
Response 200 (application/json)
{
  ok: boolean;
  subscriptions: {
    table: string;
    clients: number;
    channels: string[];
    status: "active";
  }[];
}

GET /realtime/events/project/{projectId}

ParameterInTypeRequired
projectIdpathstringYes
sourcequerystringNo
levelquerystringNo
tablequerystringNo
typequerystringNo
qquerystringNo
Response 200 (application/json)
{
  ok: boolean;
  events: {
    id: string;
    projectId: string;
    source: string;
    name: string;
    level: string;
    valueNumeric: null | number;
    meta: any;
    createdAt: string (date-time);
  }[];
  total: number;
  limit: number;
  offset: number;
}