GET
/
stream
/
{parentId}
/
sessions
import { Livepeer } from "livepeer";

const livepeer = new Livepeer({
  apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await livepeer.session.getRecorded("<id>", true);

  // Handle the result
  console.log(result);
}

run();
[
  {
    "id": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
    "kind": "stream",
    "userId": "66E2161C-7670-4D05-B71D-DA2D6979556F",
    "name": "test_session",
    "lastSeen": 1587667174725,
    "sourceSegments": 1,
    "transcodedSegments": 2,
    "sourceSegmentsDuration": 1,
    "transcodedSegmentsDuration": 2,
    "sourceBytes": 1,
    "transcodedBytes": 2,
    "ingestRate": 1,
    "outgoingRate": 2,
    "isHealthy": null,
    "issues": null,
    "createdAt": 1587667174725,
    "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
    "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
    "record": false,
    "recordingStatus": "waiting",
    "recordingUrl": "<string>",
    "mp4Url": "<string>",
    "playbackId": "eaw4nk06ts2d0mzb",
    "profiles": [
      {
        "name": "240p0",
        "fps": 0,
        "bitrate": 250000,
        "width": 426,
        "height": 240
      },
      {
        "name": "360p0",
        "fps": 0,
        "bitrate": 800000,
        "width": 640,
        "height": 360
      },
      {
        "name": "480p0",
        "fps": 0,
        "bitrate": 1600000,
        "width": 854,
        "height": 480
      },
      {
        "name": "720p0",
        "fps": 0,
        "bitrate": 3000000,
        "width": 1280,
        "height": 720
      }
    ],
    "recordingSpec": {
      "profiles": [
        {
          "width": 1280,
          "name": "720p",
          "height": 720,
          "bitrate": 3000000,
          "quality": 23,
          "fps": 30,
          "fpsDen": 1,
          "gop": 2,
          "profile": "H264Baseline",
          "encoder": "H.264"
        }
      ]
    }
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

parentId
string
required

ID of the parent stream

Query Parameters

record

Flag indicating if the response should only include recorded sessions

Example:

true

Response

200
application/json
Success

The response is of type object[].