ListRoomsRequest payload?
# ask-ai
b
ListRoomsRequest payload?
t
Thanks for reaching out, Sandeep. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The
ListRoomsRequest
payload is a handy way to list active rooms on the server. It has just one field to keep things simple: •
names
(repeated string): If you set this, the response will include only rooms with names that match any of the values you provide. If you don’t provide any names, it’ll return all active rooms. Here’s a quick example of the protobuf definition:
Copy code
message ListRoomsRequest {
  // when set, will only return rooms with name match
  repeated string names = 1;
}
So, if you want to list rooms named "room1" and "room2", you’d do this:
Copy code
ListRoomsRequest {
  names: ["room1", "room2"]
}
Usually, you’d use this request with the
RoomService.ListRooms
RPC call to easily filter rooms on the server. Hope this helps! Sources: livekit/livekit_analytics.pb.go | lib/livekit/proto/livekit_room_pb.rb | livekit-protocol/livekit/protocol/room.pyi | livekit-protocol/src/livekit.rs