List
To list the asked questions in a concrete room you need to execute a GET request against the /rooms/:id/questions endpoint.
Since potentially there could be thousands of questions, pagination is supported with limit, order and after arguments. Read about pagination 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_KEYimport 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...............
]
} Last updated