Session

Session Management assigns a unique session name to each WebRTC playback ("Session") and lets you manage sessions for operational convenience. The following API lets you list and terminate sessions connected to the Web Publisher:

List of Sessions

Request

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

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": [
        "3925d357-59b3-4b4e-b217-81c9f71e4674"
    ],
    "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 name could not be found.

Body

{
    "message": "[HTTP] Could not find the stream: [default/#default#app/nonexistent-stream] (404)",
    "statusCode": 404
}

Force-terminate Session

Request

DELETE /v1/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",
    "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 session name could not be found.

Body

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

Last updated

Was this helpful?