OpenTV ENTera & OpenTV Platform Documentation

OTT session teardown

This API should be used to close an active OTT session for a client device. When received, the SRM will mark the session as ended and ready for removal. Thus the number of active sessions for the account is decremented, allowing the possibility for a new session to be subseqeuntly created.

To use this API, send an HTTP DELETE request to one of the following URLs:

  • http://<host>:<port>/srm/sessions/{sessionId} (uses the latest version)

  • http://<host>:<port>/srm/v1/sessions/{sessionId} (uses v1)

HTTP headers

Name

Type

Description

Required

Client-Token

String

Authentication token gained from a positive sign on response.
For details on obtaining a token, see 

Authentication

.

Yes

It is assumed that the client will maintain a valid authentication token to be included in this request.

Request parameters

Name

Type

Description

Required

sessionId

String

A unique identifier for the session; this will be in the form of a UUID (Universally unique identifier).
It must be the value received in the successResponse from the session's setup request.

Yes

Success response

The HTTP response code 200 will be returned with no response payload.

Error response

Name

Type

Description

Required

code

String

The HTTP response code.

Yes

status

String

The categorisation of the failure to process the request.

Yes

errorCode

String

The specific error code.

Yes

errorMessage

String

A human readable error message.

Yes

For a full list of codestatus and errorCode values see the chapter 'SRM API reference / Error Codes and status values' in the Session Resource Manager (SRM) User Guide.

Example error responses:

{
    "errorResponse": {
        "code": "400",
        "status": "ERROR",
        "errorCode": "SRM-0002",
        "errorMessage": "Malformed request or mandatory parameters missing from request"
    }
}

Error handling

The client application is expected to behave as follows in certain error situations occurring for a tear-down request:

Failure to receive response/timeout

  • Client sends tear-down request for session to the session manager.

  • Client does not receive a response from session manager.If the session timeout period has not yet been reached the client is free to re-attempt the tear-down using a new request within half the configured timeout period.If the session timeout period has been exceeded the client should assume the session to be closed.If the session timeout period is not set then the client is free to re-attempt the tear-down using a new request N times within T period; after this period the session can be assumed to be closed.

Error response

  • Client sends teardown request for session to the session manager.

  • Client receives an error response from the session manager.The client should assume the session to be closed.

See also

Session Resource Manager (SRM) User Guide