# List

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

{% hint style="info" %}
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>
{% endhint %}

Since potentially there could be thousands of questions, pagination is supported with **limit**, **order** and **after** arguments. Read about [pagination](/reference/rest-api/pagination.md) to learn the details of it. By default maximum 100 questions will be returned in the response.

#### Request

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```bash
curl --request GET \
  --url https://api.digitalsamba.com/api/v1/rooms/c39d7c40-7ff7-4faa-b06f-698a639a9523/questions \
  --user YOUR_TEAM_ID:YOUR_DEVELOPER_KEY
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}

```java
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());
```

{% endtab %}
{% endtabs %}

#### Response (200 OK)

```json
{
    "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...............
    ]
} 
```

{% hint style="info" %}
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).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalsamba.com/reference/rest-api/rooms/questions-and-answers/list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
