rooms.list
List rooms in the key's environment.
On this page
Import and client
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
| Option | Type | Default / requirement | Purpose |
|---|---|---|---|
| cursor | string | Optional | Opaque endCursor from the previous page. |
| limit | integer | 50 | From 1 to 100. |
| status | string | Optional | created, active, ending, ended or failed. |
| search | string | Optional | Case-insensitive substring of the room name or ID, at most 120 characters after trimming. |
| joinable | boolean | Optional | true 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
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.