Session

Session Management는 WebRTC로 Stream을 재생할 때, 각각의 재생 (Session)마다 고유한 Session 이름을 부여하여 운영 편의성을 높이는 기능입니다. 다음은 Web Publisher에 연결된 Session 목록을 조회·강제 종료 할 수 있는 API입니다:

Session 목록 조회

Request

chevron-rightGET /v1/vhosts/{vhost}/apps/{app}/streams/{stream}/sessionshashtag

Header

Authorization: Basic {credentials}

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

Responses

chevron-right200 Okhashtag

The request has succeeded

Header

Content-Type: application/json

Body

{
    "message": "OK",
    "response": [
        "3925d357-59b3-4b4e-b217-81c9f71e4674"
    ],
    "statusCode": 200
}
chevron-right401 Unauthorizedhashtag

Authentication required

Header

WWW-Authenticate: Basic realm="OvenMediaEngine"

Body

{
    "message": "[HTTP] Authorization header is required to call API (401)",
    "statusCode": 401
}
chevron-right404 Not Foundhashtag

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
}

Session 강제 종료

Request

chevron-rightDELETE /v1/vhosts/{vhost}/apps/{app}/streams/{stream}/sessions/{session}hashtag

Header

Responses

chevron-right200 Okhashtag

The request has succeeded

Header

Body

chevron-right401 Unauthorizedhashtag

Authentication required

Header

Body

chevron-right404 Not Foundhashtag

The given session name could not be found.

Body

Last updated