API Reference
Rooms Management
Fetch Rooms (Paginated)

Room Management – Fetch Rooms with Pagination

Retrieve all room settings with server-side pagination, sorting, and search capabilities.

Authentication

Authorization: Bearer <YOUR_AUTH_TOKEN>

Endpoint

GEThttps://api.samvyo.com/api/roomSetting/paginated

Required Headers

Content-Type: application/json
Authorization: Bearer <YOUR_AUTH_TOKEN>

Query Parameters

ParameterTypeRequiredDefaultDescription
pagenumberNo1Page number for pagination (starts from 1)
limitnumberNo25Number of rooms per page
sortBystringNo"name"Field to sort by
sortOrderstringNo"ASC"Sort order ("ASC" or "DESC")
searchstringNo""Search term to filter rooms by name
userFilterstringNo""Filter rooms by user ID

Example Requests

JavaScript (fetch)

const res = await fetch('https://api.samvyo.com/api/roomSetting/paginated?page=1&limit=25&sortBy=name&sortOrder=ASC&search=meeting', {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${authToken}`
  }
});
const data = await res.json();

cURL

curl -X GET \
  'https://api.samvyo.com/api/roomSetting/paginated?page=1&limit=25&sortBy=name&sortOrder=ASC&search=meeting' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <YOUR_AUTH_TOKEN>'

Success Response

{
  "type": "get all roomSetting with pagination",
  "success": true,
  "roomSettings": [
    {
      "room": "1234567890",
      "isStatic": true,
      "noOfModerators": 5,
      "noOfParticipants": 20,
      "noOfViewers": 0,
      "authenticationRequired": true,
      "name": "team-meeting-room",
      "roomType": "event",
      "roomPassword": "",
      "participantType": null,
      "videoStatus": "true",
      "audioStatus": "true",
      "roomStatus": "free",
      "roomOwnerId": "<USER_ID_1>,<USER_ID_2>,<USER_ID_3>",
      "createdAt": "2025-08-11T05:22:41.842Z",
      "updatedAt": "2025-08-11T05:22:41.842Z",
      "acceptIpCameras": false,
      "totalCallTime": "0",
      "enableChatOption": true,
      "enableScreenSharing": true,
      "enableLiveStreaming": false,
      "enableRecording": true,
      "enableTranscription": false,
      "recordModerator": true,
      "recordParticipant": false,
      "participantPrivacy": false,
      "recordingStrategy": "mergedAV",
      "participantVideoPrivacy": false,
      "roomAgenda": null,
      "scheduledDateTime": null,
      "enablePresenters": true,
      "noOfUpgradeRequests": 3,
      "enableRTMPStreaming": false,
      "liveStreamUrl": null,
      "liveStreamKey": null,
      "recordingFormat": "hls",
      "recordingResolutions": ["480p", "1080p", "2160p"],
      "roomPermalink": true
    },
    {
      "room": "0987654321",
      "isStatic": false,
      "noOfModerators": 3,
      "noOfParticipants": 15,
      "noOfViewers": 5,
      "authenticationRequired": false,
      "name": "client-presentation",
      "roomType": "meeting",
      "roomPassword": "secure123",
      "participantType": "moderator",
      "videoStatus": "true",
      "audioStatus": "true",
      "roomStatus": "occupied",
      "roomOwnerId": "<USER_ID_4>",
      "createdAt": "2025-08-10T15:30:22.156Z",
      "updatedAt": "2025-08-11T08:45:33.789Z",
      "acceptIpCameras": true,
      "totalCallTime": "120",
      "enableChatOption": true,
      "enableScreenSharing": true,
      "enableLiveStreaming": true,
      "enableRecording": false,
      "enableTranscription": true,
      "recordModerator": false,
      "recordParticipant": false,
      "participantPrivacy": true,
      "recordingStrategy": "separate",
      "participantVideoPrivacy": true,
      "roomAgenda": "Client presentation and Q&A session",
      "scheduledDateTime": "2025-08-12T14:00:00.000Z",
      "enablePresenters": false,
      "noOfUpgradeRequests": 0,
      "enableRTMPStreaming": true,
      "liveStreamUrl": "rtmp://stream.example.com/live",
      "liveStreamKey": "stream_key_123",
      "recordingFormat": "mp4",
      "recordingResolutions": ["720p", "1080p"],
      "roomPermalink": false
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 150,
    "totalPages": 6
  }
}

Response Fields

Room Settings Array

Each room object contains comprehensive room configuration including:

  • Basic Info: room, name, roomType, roomStatus
  • Capacity: noOfModerators, noOfParticipants, noOfViewers
  • Security: authenticationRequired, roomPassword, participantPrivacy
  • Features: enableChatOption, enableScreenSharing, enableRecording
  • Media: videoStatus, audioStatus, acceptIpCameras
  • Recording: recordingStrategy, recordingFormat, recordingResolutions
  • Live Streaming: enableLiveStreaming, enableRTMPStreaming, liveStreamUrl
  • Ownership: roomOwnerId, createdAt, updatedAt

Pagination Object

FieldTypeDescription
pagenumberCurrent page number
limitnumberNumber of rooms per page
totalnumberTotal number of rooms matching the criteria
totalPagesnumberTotal number of pages available

Error Responses

Invalid Parameters

{
  "type": "get all roomSetting with pagination",
  "success": false,
  "error": "Invalid pagination parameters"
}

Database Error

{
  "type": "get all roomSetting with pagination",
  "success": false,
  "error": "Database connection error"
}

Use Cases

Basic Pagination

const res = await fetch('https://api.samvyo.com/api/roomSetting/paginated?page=1&limit=25');

Search Rooms by Name

const res = await fetch('https://api.samvyo.com/api/roomSetting/paginated?page=1&limit=25&search=meeting');

Sort by Creation Date

const res = await fetch('https://api.samvyo.com/api/roomSetting/paginated?page=1&limit=25&sortBy=createdAt&sortOrder=DESC');

Filter by User

const res = await fetch('https://api.samvyo.com/api/roomSetting/paginated?page=1&limit=25&userFilter=USER_ID_123');

Combined Search and Sort

const res = await fetch('https://api.samvyo.com/api/roomSetting/paginated?page=2&limit=50&sortBy=name&sortOrder=ASC&search=presentation');

Performance Notes

  • Search is optimized for room names and performs case-insensitive matching
  • Sorting supports multiple fields including name, createdAt, updatedAt
  • Pagination limits help manage large datasets efficiently
  • User filtering allows administrators to view rooms owned by specific users
  • Query performance is optimized with proper database indexing

Access Control

  • Authentication required for all requests
  • User context is automatically included from the authentication token
  • Role-based filtering may apply based on user permissions
  • Site-specific rooms are filtered by the user's organization