Fetch All Track Recordings - API
This API lets you fetch details of your track recording by passing roomId, sessionId and participantId as query parameters.
HTTP method and endpoint
GET
|
https://api.videosdk.live/v2/recordings/participant/trackHeaders Parameters
REQUIRED
values : YOUR_TOKEN_WITHOUT_ANY_PREFIX
This will be a JWT token generate using VideoSDK ApiKey and Secret.
Note that the token will not include any prefix such as "Basic " or "Bearer ". Just pass a token as value.
You can generate a new token by refering this Guide: Generate Auth token
Query Parameters
REQUIRED
The ID of the Room.
OPTIONAL
The ID of the Session.
OPTIONAL
The ID of the Participant.
OPTIONAL
defaultValue  :    1
Page number for the track recording
OPTIONAL
defaultValue  :    20
Number of track recordings you want per page.
GET
|
https://api.videosdk.live/v2/recordings/participant/track
NodeJS
import fetch from 'node-fetch';
const options = {
	method: "GET",
	headers: {
		"Authorization": "$YOUR_TOKEN",
		"Content-Type": "application/json",
	},
};
const url= `https://api.videosdk.live/v2/recordings/participant/track?roomId=xyz&sessionId=xyz&participantId=xyz&page=1&perPage=20`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
{
  "pageInfo": {
    "currentPage": 1,
    "perPage": 20,
    "lastPage": 1,
    "total": 1
  },
  "data": [
    {
      "sessionId": "61d6e823783d6b03a026ac05",
      "participantId": "abcd",
      "kind": "video",
      "fileFormat": "webm",
      "start": "2024-07-18T07:10:30.247Z",
      "end": "2024-07-18T07:10:55.236Z",
      "mode": "track",
      "region": "region",
      "files": [
        {
          "meta": {
            "resolution": {
              "width": 640,
              "height": 360
            },
            "format": "webm",
            "duration": 598
          },
          "_id": "6697685c6eaaaac67ea18130",
          "userId": "6697685c6eaaaac67ea18130",
          "filePath": "individual-recordings/61d6e823783d6b03a026ac05/abcd/video/track_recording_abcd_video_1721198084716.webm",
          "fileUrl": "https://cdn.videosdk.live/individual-recordings/61d6e823783d6b03a026ac05/abcd/video/track_recording_abcd_video_1721198084716.webm",
          "type": "video",
          "size": 21724519,
          "ratio": {
            "360": 36328.627090301
          },
          "__v": 0
        }
      ],
      "roomId": "abcd-efgh-riwb",
      "webhook": {
        "totalCount": 0,
        "successCount": 0,
        "data": []
      },
      "id": "66976600a8faa5fa9694945c"
    }
  ]
}
Got a Question? Ask us on discord