RelayrtcDocs
Get started
Documentation
Node SDK

rooms.list

List rooms in the key's environment.

On this page

Import and client

TypeScript
import { RelayServer } from '@relayrtc/node'
 
const relay = new RelayServer({
  apiUrl: process.env.RELAYRTC_API_URL!,
  apiKey: process.env.RELAYRTC_SECRET_KEY!,
})

Requirements

A secret key with rooms:read. The requested resource must belong to that key's project environment.

Parameters

OptionTypeDefault / requirementPurpose
cursorstringOptionalOpaque endCursor from the previous page.
limitinteger50From 1 to 100.
statusstringOptionalcreated, active, ending, ended or failed.
searchstringOptionalCase-insensitive substring of the room name or ID, at most 120 characters after trimming.
joinablebooleanOptionaltrue selects created/active rooms. false leaves status filtering unchanged.

Every method accepts RequestOptions as its final argument.

These filters require a matching SDK release. The SDK serializes joinable to the API's true/false query value. It filters room state, not available seats.

Example

TypeScript
const result = await relay.rooms.list({ limit: 20, status: 'active' })

Returns

Promise<CursorPage<Room>>. Returns nodes: Room[] and pageInfo.

REST equivalent

GET /v1/rooms. Failures throw RelayApiError.