Passer au contenu principal
GET
/
session
/
{id}
TypeScript
import { Livepeer } from "livepeer";

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

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

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

run();
{
  "name": "test_session",
  "id": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
  "kind": "stream",
  "userId": "66E2161C-7670-4D05-B71D-DA2D6979556F",
  "lastSeen": 1587667174725,
  "sourceSegments": 1,
  "transcodedSegments": 2,
  "sourceSegmentsDuration": 1,
  "transcodedSegmentsDuration": 2,
  "sourceBytes": 1,
  "transcodedBytes": 2,
  "ingestRate": 1,
  "outgoingRate": 2,
  "isHealthy": "<unknown>",
  "issues": "<unknown>",
  "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": "<unknown>",
  "recordingSpec": "<unknown>"
}

Obtenir la session

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

ID of the session

Réponse

Success

name
string
requis
Exemple:

"test_session"

id
string
Exemple:

"de7818e7-610a-4057-8f6f-b785dc1e6f88"

kind
string
obsolète
Exemple:

"stream"

userId
string
obsolète
Exemple:

"66E2161C-7670-4D05-B71D-DA2D6979556F"

lastSeen
number
Exemple:

1587667174725

sourceSegments
number
Exemple:

1

transcodedSegments
number
Exemple:

2

sourceSegmentsDuration
number

Duration of all the source segments, sec

Exemple:

1

transcodedSegmentsDuration
number

Duration of all the transcoded segments, sec

Exemple:

2

sourceBytes
number
Exemple:

1

transcodedBytes
number
Exemple:

2

ingestRate
number

Rate at which sourceBytes increases (bytes/second)

Exemple:

1

outgoingRate
number

Rate at which transcodedBytes increases (bytes/second)

Exemple:

2

isHealthy
any
issues
any
createdAt
number

Timestamp (in milliseconds) at which stream object was created

Exemple:

1587667174725

parentId
string

Points to parent stream object

Exemple:

"de7818e7-610a-4057-8f6f-b785dc1e6f88"

projectId
string

The ID of the project

Exemple:

"aac12556-4d65-4d34-9fb6-d1f0985eb0a9"

record
boolean

Whether the stream should be recorded. Uses default settings. For more customization, create and configure an object store.

Exemple:

false

recordingStatus
enum<string>

The status of the recording process of this stream session.

Options disponibles:
waiting,
ready,
failed,
deleted,
none
recordingUrl
string

URL for accessing the recording of this stream session.

mp4Url
string

The URL for the stream session recording packaged in an MP4.

playbackId
string

The playback ID to use with the Playback Info endpoint to retrieve playback URLs.

Exemple:

"eaw4nk06ts2d0mzb"

profiles
any
recordingSpec
any
Last modified on March 1, 2026