# List

To list the existing recordings -> execute a **GET** request against the **/recordings** endpoint.&#x20;

Note that archived recordings are not listed in this endpoint.\
If you want to explicitly see archived recordings use the **GET /recordings/archived** endpoint instead.

{% hint style="info" %}
Use the **room\_id** or **session\_id** arguments if you want to filter recordings based on a concrete room or a concrete session.

\
<https://api.digitalsamba.com/api/v1/recordings?**room\\_id**=7f8c8eac-6643-47db-8d93-e7633e6e53ec>

<https://api.digitalsamba.com/api/v1/recordings?**session\\_id**=16e44502-dae5-41f9-b095-e41bf6ac2d1d>
{% endhint %}

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

{% hint style="info" %}
If you want to retrieve the details of one concrete recording, then execute a **GET** request against the **/recordings/:id** endpoint
{% endhint %}

Duration of the recording is listed in seconds. Also there are details provided about the participant who initiated the recording and the room/session where the recording happened.

#### Request (listing all recordings)

{% tabs %}
{% tab title="cURL" %}

```bash
curl --request GET \
  --url https://api.digitalsamba.com/api/v1/recordings \
  --user YOUR_TEAM_ID:YOUR_DEVELOPER_KEY
```

{% 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());

HttpRequest request = HttpRequest.newBuilder()
  .GET()
  .uri(new URI("https://api.digitalsamba.com/api/v1/recordings"))
  .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": 148,
    "data": [
        {
            "id": "6e4a5676-c2e8-4c14-90a2-4c6cd71640be",
            "name": "Recording 13.01.2023 10:42",
            "duration": 7100,
            "status": "READY",
            "room_id": "7f8c8eac-6643-47db-8d93-e7633e6e53ec",
            "friendly_url": "PublicRoom",
            "privacy": "public",
            "session_id": "16e44502-dae5-41f9-b095-e41bf6ac2d1d",
            "participant_id": "cc8111a2-349d-4ec4-88e1-f92080a6544e",
            "participant_name": "John Smith",
            "created_at": "2023-01-13T10:42:35Z"
        },
        ...............99 more recordings...............
    ]
}
```

{% hint style="info" %}
The **total\_count** is the total amount of recordings you have globally. It is **NOT** the amount of recordings in the current page returned in the **data** array. In the above example you have 148 recordings in total, but in the data array there will be maximum 100 recordings (the default limit argument value).
{% endhint %}

#### Request (get information about a concrete recording)

{% tabs %}
{% tab title="cURL" %}

```bash
curl --request GET \
  --url https://api.digitalsamba.com/api/v1/recordings/6e4a5676-c2e8-4c14-90a2-4c6cd71640b \
  --user YOUR_TEAM_ID:YOUR_DEVELOPER_KEY
```

{% 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 recording id here - this value is just an example
String recordingId = "6e4a5676-c2e8-4c14-90a2-4c6cd71640b";

HttpRequest request = HttpRequest.newBuilder()
  .GET()
  .uri(new URI("https://api.digitalsamba.com/api/v1/recordings/" + roomId))
  .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
{
    "id": "6e4a5676-c2e8-4c14-90a2-4c6cd71640be",
    "name": "Recording 13.01.2023 10:42",
    "duration": 7100,
    "status": "READY",
    "room_id": "7f8c8eac-6643-47db-8d93-e7633e6e53ec",
    "friendly_url": "PublicRoom",
    "privacy": "public",
    "session_id": "16e44502-dae5-41f9-b095-e41bf6ac2d1d",
    "participant_id": "cc8111a2-349d-4ec4-88e1-f92080a6544e",
    "participant_name": "John Smith",
    "created_at": "2023-01-13T10:42:35Z"
}
```
