Current

Session Management assigns a unique session name to each WebRTC playback ("Session") and lets you manage sessions for operational convenience. The following API retrieves per-session statistics:

Session Statistics

Request

GET /v1/stats/current/vhosts/{vhost}/apps/{app}/streams/{stream}/sessions/{session}

Header

Authorization: Basic {credentials}

# Authorization
    Credentials for HTTP Basic Authentication created with <AccessToken>

Responses

200 Ok

The request has succeeded

Header

Content-Type: application/json

Body

{
    "message": "OK",
    "response": {
        "avgThroughputOut": 237284,
        "createdTime": "2025-10-28T12:12:30.567+09:00",
        "lastSentTime": "2025-10-28T12:12:35.504+09:00",
        "lastThroughputOut": 30345,
        "lastUpdatedTime": "2025-10-28T12:12:35.504+09:00",
        "maxThroughputOut": 240793,
        "totalBytesOut": 149971
    },
    "statusCode": 200
}
401 Unauthorized

Authentication required

Header

WWW-Authenticate: Basic realm="OvenMediaEngine"

Body

{
    "message": "[HTTP] Authorization header is required to call API (401)",
    "statusCode": 401
}
404 Not Found

The given vhost or app or stream or session name could not be found.

Body

{
    "message": "Not Found",
    "response": "Could not find the session",
    "statusCode": 404
}

Last updated

Was this helpful?