Implementation:Risingwavelabs Risingwave Dashboard Streaming API
| Knowledge Sources | |
|---|---|
| Domains | Observability, Web_API, TypeScript |
| Last Updated | 2026-02-09 07:00 GMT |
Overview
Concrete tool for querying streaming job status and fragment topology provided by the RisingWave dashboard TypeScript API layer.
Description
The Dashboard Streaming API is a TypeScript module that provides typed functions for fetching streaming-related data from the RisingWave meta node HTTP API. It includes functions for retrieving fragment graphs, streaming jobs, materialized views, sources, sinks, and their dependency relationships.
The API uses protobuf-generated TypeScript types for type safety and communicates with the meta node's REST endpoints.
Usage
These functions are used by the RisingWave built-in dashboard (Next.js application) to display fragment visualizations, relation catalogs, and dependency graphs.
Code Reference
Source Location
- Repository: risingwave
- File: dashboard/lib/api/streaming.ts
- Lines: L1-287
Signature
export async function getFragmentsByJobId(jobId: number): Promise<TableFragments>
export async function getRelationIdInfos(): Promise<RelationIdInfos>
export async function getStreamingJobs(): Promise<StreamingJob[]>
export async function getRelations(): Promise<Relation[]>
export async function getMaterializedViews(): Promise<ExtendedTable[]>
export async function getTables(): Promise<ExtendedTable[]>
export async function getSinks(): Promise<Sink[]>
export async function getSources(): Promise<Source[]>
export async function getObjectDependencies(): Promise<Map<number, number[]>>
Import
import {
getFragmentsByJobId,
getStreamingJobs,
getRelations,
getMaterializedViews,
} from "../lib/api/streaming"
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| jobId | number | Yes (for getFragmentsByJobId) | The streaming job ID to fetch fragments for |
Outputs
| Name | Type | Description |
|---|---|---|
| TableFragments | protobuf type | Fragment graph topology for a streaming job |
| StreamingJob[] | array | List of streaming jobs with status, parallelism, type |
| Relation[] | array | Combined list of MVs, tables, indexes, sinks, sources, subscriptions |
| Map<number, number[]> | map | Object dependency graph (object ID → dependent IDs) |
Usage Examples
Fetch Streaming Jobs
import { getStreamingJobs } from "../lib/api/streaming"
// Fetch all streaming jobs
const jobs = await getStreamingJobs()
jobs.forEach(job => {
console.log(`Job ${job.id}: ${job.name} (${job.jobStatus})`)
console.log(` Type: ${job.type}, Parallelism: ${job.parallelism}`)
})
Fetch Fragment Graph
import { getFragmentsByJobId } from "../lib/api/streaming"
// Fetch fragment topology for job ID 1
const fragments = await getFragmentsByJobId(1)
// fragments contains the streaming plan nodes organized in fragment boxes