Digital Samba Embedded
  • Introduction
  • SDK
    • DigitalSambaEmbedded class
    • Methods
      • addCustomTile()
      • removeCustomTile()
      • addFrameEventListener()
      • addImageToWhiteboard()
      • addTileAction()
      • addUICallback()
      • allowBroadcast()
      • allowScreenshare()
      • changeBrandingOptions()
      • changeLayoutMode()
      • changeRole()
      • changeToolbarPosition()
      • closeLibraryFile()
      • closeWhiteboard()
      • createWhiteboard()
      • configureCaptions()
      • configureVirtualBackground()
      • disableAudio()
      • disableVideo()
      • disableVirtualBackground()
      • disallowBroadcast()
      • disallowScreenshare()
      • enableAudio()
      • enableVideo()
      • enableVirtualBackground()
      • endSession()
      • featureEnabled()
      • hideCaptions()
      • hideToolbar()
      • leaveSession()
      • listUsers()
      • load()
      • lowerHand()
      • muteFrame()
      • maximizeLocalTile()
      • maximizeUser()
      • minimizeLocalTile()
      • minimizeContent()
      • minimizeUser()
      • off()
      • on()
      • once()
      • openLibraryFile()
      • openWhiteboard()
      • pinUser()
      • raiseHand()
      • removeFrameEventListener()
      • removeTileAction()
      • removeUICallback()
      • removeUser()
      • requestMute()
      • requestToggleAudio()
      • requestUnmute()
      • showCaptions()
      • showToolbar()
      • startRecording()
      • startScreenshare()
      • stopRecording()
      • stopScreenshare()
      • toggleAudio()
      • toggleCaptions()
      • toggleMuteFrame()
      • toggleToolbar()
      • toggleVideo()
      • toggleWhiteboard()
      • toggleLibraryFile()
      • unmuteFrame()
      • unpinUser()
    • Events
      • activeSpeakerChanged
      • appError
      • appLanguageChanged
      • audioDisabled
      • audioEnabled
      • captionsDisabled
      • captionsEnabled
      • captionsFontSizeChanged
      • captionsSpokenLanguageChanged
      • chatMessageReceived
      • featureSetUpdated
      • frameLoaded
      • handRaised
      • handLowered
      • layoutModeChanged
      • mediaDeviceChanged
      • permissionsChanged
      • recordingFailed
      • recordingStarted
      • recordingStopped
      • roleChanged
      • roomStateUpdated
      • screenshareStarted
      • screenshareStopped
      • sessionEnded
      • speakerStoppedTalking
      • userJoined
      • userLeft
      • usersUpdated
      • videoDisabled
      • videoEnabled
      • virtualBackgroundChanged
      • virtualBackgroundDisabled
    • Properties
      • features
      • localUser
      • permissionManager
      • roomState
  • REST API
    • Rate limiting
    • Pagination
    • Default room settings
      • List
      • Edit
    • Rooms
      • Create
      • Edit
      • List
      • Delete
        • All resources
        • Concrete resource
      • Files
      • Chat
        • List
        • Export
      • Questions & Answers
        • List
        • Export
      • Transcription
        • List
        • Export
        • Start
        • Stop
    • Sessions
      • List
      • End
      • Delete resources
        • All resources
        • Concrete resource
      • Transcripts
      • Summary (AI)
    • Participants
      • List
    • Roles and permissions
      • Permissions
      • Create
      • Edit
      • List
      • Delete
    • Live usage
      • Rooms
      • Participants
    • Statistics
      • Current period
      • Team
      • Room
    • Tokens
      • Properties
      • Create
    • Recordings
      • List
      • Download
      • Start
      • Stop
      • Delete
      • Archive
      • Unarchive
    • Polls
      • Create
      • Edit
      • List
      • Delete
      • Export
      • Results
    • Content Library
      • Create
      • Edit
      • List
      • Delete
      • Folders
        • Create
        • Edit
        • List
        • Delete
      • Files
        • Upload
        • Webapps
        • Whiteboards
        • Edit
        • List
        • Delete
    • Telephony
      • Participant Join
      • Participant Leave
    • Webhooks
      • Payload structure
      • Create
      • Edit
      • List
      • Delete
    • Scribe / Postman docs
  • Dashboard docs
  • LTI docs
Powered by GitBook
On this page
  1. REST API
  2. Rooms
  3. Questions & Answers

List

PreviousQuestions & AnswersNextExport

Last updated 1 year ago

To list the asked questions in a concrete room you need to execute a GET request against the /rooms/:id/questions endpoint.

Use the session_id argument if you want to list the asked questions in a concrete session. https://api.digitalsamba.com/api/v1/rooms/c39d7c40-7ff7-4faa-b06f-698a639a9523/questions?session_id=16e44502-dae5-41f9-b095-e41bf6ac2d1d

Since potentially there could be thousands of questions, pagination is supported with limit, order and after arguments. Read about to learn the details of it. By default maximum 100 questions will be returned in the response.

Request

curl --request GET \
  --url https://api.digitalsamba.com/api/v1/rooms/c39d7c40-7ff7-4faa-b06f-698a639a9523/questions \
  --user YOUR_TEAM_ID:YOUR_DEVELOPER_KEY
import com.fasterxml.jackson.databind.ObjectMapper;

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.util.Base64;
import java.util.Map;

String TEAM_ID = "YOUR_TEAM_ID";
String DEVELOPER_KEY = "YOUR_DEVELOPER_KEY";
String authorizationHeader = "Bearer " + Base64.getEncoder().encodeToString((TEAM_ID + ":" + DEVELOPER_KEY).getBytes());
//Put your room id or friendly_url (name) here - this value is just an example
String roomId = "c39d7c40-7ff7-4faa-b06f-698a639a9523";

HttpRequest request = HttpRequest.newBuilder()
  .GET()
  .uri(new URI("https://api.digitalsamba.com/api/v1/rooms/" + roomId + "/questions"))
  .header("Authorization", authorizationHeader)
  .build();

HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, BodyHandlers.ofString());

System.out.println("Status code: " + response.statusCode());
System.out.println("Body: " + response.body());

Response (200 OK)

{
    "total_count": 6124,
    "data": [
        {
            "id": "65ae00b9-7631-4fa0-b7b2-33f7ebac7427",
            "question": "When does the meeting start?",
            "participant_id": "f8fa88a7-0b13-42dc-bc8e-bbe9894d1493",
            "participant_name": "John Smith",
            "answers": [
                {
                    "id": "6fd4c950-c417-4feb-b347-7cb198fa4dd2",
                    "answer": "In 15 min",
                    "participant_id": "575916f3-9b05-4995-8085-59b79c4e9dd5",
                    "participant_name": "Administrator",
                    "created_at": "2024-03-21T15:57:35Z"
                },
                //This is a live answer (through microphone), since no answer field
                {
                    "id": "4b55e73b-9dfa-48e6-9d25-4831b7ebe5cb",
                    "participant_id": "575916f3-9b05-4995-8085-59b79c4e9dd5",
                    "participant_name": "Administrator",
                    "created_at": "2024-03-21T15:57:40Z"
                },
        },
        {
            "id": "65ae00b9-7631-4fa0-b7b2-33f7ebac7427",
            "question": "When does the meeting start?",
            "participant_id": "f8fa88a7-0b13-42dc-bc8e-bbe9894d1493",
            "participant_name": "John Smith",
            "answers": []
        }
        ...............98 more questions...............
    ]
} 

The total_count is the total amount of asked questions in the room. It is NOT the amount of questions in the current page returned in the data array. In the above example you have 6124 questions in total, but in the data array there will be maximum 100 questions (the default limit argument value).

pagination