SmartTUBE OSS/BSS API

Download as PDF

Baseline

The integration of SmartTUBE SDP with an operator’s OSS/BSS system is achieved through the following API, which enables seamless management and synchronization of data pertaining to subscriber accounts, device bindings, services, pricing plans, and other relevant entities between the OSS/BSS and SDP. Each integration project is unique and tailored to the specific business processes of the operator, showcasing the flexibility provided by a comprehensive set of methods on the SmartTUBE side and optional methods on the OSS/BSS side.

On the SmartTUBE side, the implemented methods facilitate interaction when initiated by the OSS/BSS, ensuring that changes made on the OSS/BSS side are effectively communicated to the SmartTUBE SDP. Conversely, methods on the OSS/BSS side enable seamless interaction when initiated by the SmartTUBE SDP, streamlining processes such as subscriber content purchases and service subscriptions within pricing plans.

For instance, to illustrate a typical workflow:

  • The SmartTUBE App sends a request to the SmartTUBE SDP, avoiding direct communication with the OSS/BSS.
  • The SmartTUBE SDP then invokes the OSS/BSS-side method.
  • The response from the OSS/BSS-side method is relayed back to the SmartTUBE SDP, which subsequently forwards relevant information to the SmartTUBE App.

Method Invocation

API methods are called using HTTP(S) GET requests. The type of the protocol (HTTP or HTTPS) depends on the server settings.

Invocation of SmartTUBE-side Methods

The syntax of an API method call is as follows:

http[s]://<smarttube_sdp_endpoint_host>:<port>/<oss_api_prefix>/<method name>?<parameter 1>=<value 1>&<parameter 2>=<value 2>…

The <oss_api_prefix> is defined by the oss.standard.url.value parameter of the SmartTUBE SDP configuration file system.conf. The typical value is integrationapi.

Exception: The report method for creating reports has its own syntax. See the section Getting reports.

Invocation of OSS-side Methods

The syntax of an API method call using GET is as follows:

http[s]://<oss_endpoint_host>:<port>/<prefix>/<method name>?<parameter 1>=<value 1>&<parameter 2>=<value 2>…

For instance, to call method1 with the arguments param1=value1 and param2=value2 using an HTTP GET request, the syntax would appear as follows:

http://111.111.0.1:8080/smarttube_sdp_integration/method1?param1=value1&param2=value2

Authorization

In order to ensure the security of the SmartTUBE SDP and OSS/BSS interaction, you can enable the authentication mechanism.

Authorization Types

The SmartTUBE-side methods supports the following authorization mechanisms:

  • HTTP Basic Authentication
    This mechanism involves passing a login/password with each request in the HTTP Authorization header according to the HTTP Basic Authentication protocol.
  • JWT (JSON Web Token)
    The authorization of requests by this mechanism is performed as follows:

    • OSS/BSS requests the authorize method for the first time: authorize?login=<login>&password=<password>
    • SmartTUBE SDP returns the JWT token in the HTTP header.
    • OSS/BSS must send this token in the HTTP header “Authorization: Bearer <token>” with all subsequent requests to the SmartTUBE SDP. Request example:

curl –insecure -v “https://localhost:8443/sdpapi/integrationapi/listNpvrRecordInterval?accountNumber=sm” -H ‘logHeaders: true’ -H ‘Host: sdp5-dev-sdp01:8081’ -H ‘Origin: http://sdp5-dev-sdp01:8081’ -H ‘Content-Type: application/json’  -H ‘jwt:…’

The token remains valid only for a certain time (24 hours by default). Upon expiration, the token must be requested again. You can also invalidate current sessions using the invalidateAllSessions method.

The authorization is supported only for the methods with the prefix /sdpapi/ in its path. For example: https://localhost:8443/sdpapi/integrationapi/listProfile?accountNumber=sm If the /sdpapibd/ prefix is used, the authorization is not required.

You can configure both authorization methods in the SmartTUBE SDP configuration file system.conf in the integrationApi.auth section.

For the OSS/BSS-side methods, the HTTP Basic Authentication is only supported. The integration settings are managed with the SmartTUBE SDP configuration file system.conf in the oss.standard.[…] and standard-oss-[…] sections.

SmartTUBE-side Methods

The methods below are implemented and executed on the SmartTUBE side upon request from the OSS/BSS side:

Method

Purpose

Device Authorization

authorize

Authorization on the SmartTUBE server using JWT

invalidateAllSessions

Invalidate all connection sessions from the OSS / BSS side

Managing Service Accounts

createAccount

Adding a service account and a connection

createAccountByTemplate

Creating a service account from a template

updateAccount

Editing a service account

accountInfo

Getting information about a service account

deleteAccount

Deleting a service account

ServiceAccountService#hashServiceAccountPasswords

Hashing passwords on all service accounts

ServiceAccountService#hashAllPasswords

Hashing passwords on all service accounts and terminals

Managing Linked Devices

addTerminal

Adding a device

updateTerminal

Editing a connection to a device

deleteTerminal

Deleting a connection to a device

deleteTerminalHistory

Deleting the history of device UID transitions

setUidByLogin

Setting UID and serial number by login

ServiceAccountService#hashTerminalPasswords

Hashing passwords on all terminals

Managing Services

changeProductOffer

Changing the pricing plan

subscribeService

Adding or refusing from a service

accountServiceList

Getting a list of services

resetAccount

Removing purchased content and services

Messaging

sendAccountMessage

Sending a text message to all devices bounded to the specific service accounts

sendDevicesMessage

Sending a text message to the list of devices

sendAccountsMessageById

Sending a message by external ID to all devices bounded to the specific service accounts

sendDevicesMessageById

Sending a message by external ID to the list of devices

sendFilterMessageById

Sending a pre-created message to devices bound to the filtered service accounts/devices

sendControlByAccounts

Sending a control messages by account numbers

sendControlByUids

Sending a control messages by UIDs

Managing Profiles

setupContentBookmark

Content bookmarks managing

updateProfile

Editing a profile

listProfile

Getting a list of profile parameters

Managing nPVR

createNpvr

Create an order to record upcoming TV show

cancelNpvr

Remove an order to record upcoming TV show(s)

listNpvrSeries

List all orders to record upcoming TV series on the service account

createNpvrSeries

Create an order to record upcoming TV series

cancelNpvrSeries

Remove an order to record upcoming TV series

listNpvrSchedule

List all schedules to record upcoming TV broadcasts

createNpvrSchedule

Create a schedule to record upcoming TV broadcast

updateNpvrSchedule

Update a schedule to record upcoming TV broadcast

cancelNpvrSchedule

Remove schedules to record upcoming TV broadcasts

listNpvrRecordInterval

List all recorded intervals

Getting Reports

report

Getting reports on service accounts

EPG Managing

updateEpg

Update EPG for the specified programs

reloadEpgCache

Reload EPG cache for all or specified programs

sendEpgDeviceNotifications

Send notification to all devices to reload EPG for the specified programs

Device Authorization

authorize

Device authorization on the SmartTUBE SDP using JWT. The method returns a JWT token for subsequent requests to the SmartTUBE SDP. See the “Authorization types” section for details.

Method name

authorize

Call parameters

Parameter

Type

Required?

Description

login

String

yes

Login for getting the JWT token from the SmartTUBE SDP

password

String

yes

Password for getting the JWT token from the SmartTUBE SDP

Return value

In case of success, code=”0″ is returned along with the JWT token in the header.

invalidateAllSessions 

The method invalidates all connection sessions from the OSS / BSS side for the specified login. See the Authorization types section for details.

This method should be requested with the /sdpapibd/ prefix in its path.

Method name

invalidateAllSessions

Call parameters

Parameter

Type

Required?

Description

login

String

yes

Login, whose sessions are to be invalidated

Return value

code=”0″ is returned in case of success.

Managing Service Accounts

createAccount 

The method creates a service account and binds a device to this account if needed.

Method name

createAccount

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

productOffer

String

yes

An external ID of the pricing plan. You can create the pricing plan in SmartTUBE web interface; its external ID is set in the web interface as well.

name

String

yes

Name of the service account

accountState

String

yes

An external identifier of the service account state

login

String

no*

Login used for devices linking to this service account

password

String

no*

Password used for devices linking to this service account

uid

String

no

UID of a device

deviceType

String

no

Device type (see SmartTUBE object model)

location

String

no

Is taken into account only if the uid parameter is passed.

The external identifier of a region for the connection.

The value of this parameter is used at SmartTUBE SDP for filtering TV-channels, which can be streamed on the subscriber’s device

deviceLimit

String

no

An external identifier of the Device limit restriction defining the maximum number of devices of each type that could be associated with the service account

description

String

no

Comment

hdcp

Number

no

  • 1 – enable HDCP protection of content transmitted via HDMI
  • 0 – disable HDCP protection of content transmitted via HDMI

Option is supported only by a limited list of set-top boxes. Please contact the SmartLabs support team for details.

billingId

String

no

The identifier at the OSS/BSS side

sessionLimit

String

no

ExternalID of the Concurrent session limit (can be found in the SmartTUBE Admin Console — Dictionaries — Concurrent session limit)

stateSwitch

String

no

ExternalID of the Account state switch (can be found in the SmartTUBE Admin Console — Dictionaries — Account state switches)

* Notes:

  • If login and password are not specified either for the service account or for any of devices already associated with it, it will be impossible to link new devices to this service account.
  • A new connection is added to the account only if uid or deviceLogin + devicePassword are passed.
Return value

code=”0″ is returned in case of success.

createAccountByTemplate 

The method creates a service account from a template and binds a device to this account if needed.

Method name

createAccountByTemplate

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

template

String

yes

External ID of the service account template by which the accounts will be generated

name

String

no

Name of the service account. If omitted, equal to the accountNumber.

accountState

String

yes

External ID of the service account state

login

String

no*

Service account login, used for linking devices to this service account

password

String

no*

Service account password, used for linking devices to this service account

uid

String

no

UID of a device

location

String

no

External ID of a region for the device. Is taken into account only if the uid parameter is passed.

The value of this parameter is used at SmartTUBE SDP for filtering TV-channels, which can be streamed on the subscriber’s device

hdcp

Number

no

  • 1 – enable HDCP protection of content transmitted via HDMI
  • 0 – disable HDCP protection of content transmitted via HDMI

Option is supported only by a limited list of set-top boxes. Please contact the SmartLabs support team for details.

billingId

String

no

Account ID at the OSS/BSS side

generateByMask

Boolean

no

Flag to generate IDs (accountNumber, name, login, uid, deviceLogin) by mask. Each ‘*’ will be replaced with 20 random chars (e.g.: ?name=test_* -> test_fdfae171a1c7451fa2e8)

generateCount

Integer

no

The number of service accounts to be generated (typically no more than 10000). The max number is set with the createAccountByTemplate.generateByMask.generateCount.maxValue parameter in the system.conf file.

deviceLogin

String

no

Device login

devicePassword

String

no

Device password

stateSwitch

String

no

ExternalID of the Account state switch (can be found in the SmartTUBE Admin Console — Dictionaries — Account state switches)

* If login and password are not specified either for the service account or for any of devices already associated with it, it will be impossible to link new devices to this service account.

Return values

Successful execution:

{

 “code”: 0,

 “message”: “Ok”,

 “info”: {

   “errorCount”: 0, // Number of errors

   “successCount”: 2 // Number of the service accounts created successfuly

 }

}

Business logic error:

{

 “code”: 50105,

 “message”: “Template not found”,

 “info”: {

   “errorCount”: 1,

   “successCount”: 0,

   “lastErrorCode”: 50105,

   “lastErrorMessage”: “Template not found”

 }

}

Fatal error:

{

 “error”: {

   “code”: 1,

   “message”: “No current transaction for [postgresql]”

 }

}

updateAccount 

The method applies changes to a service account.

Method name

updateAccount

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

name

String

no

Name of the service account

accountState

String

no

An external identifier of the service account state

login

String

no*

The login used for devices linking to this service account

password

String

no*

The password used for devices linking to this service account

stateMessage

String

no

Reason for changing the account state

profilePin

String

no

PIN. If you specify the PIN, it will be applied to all the profiles on the service account

deviceLimit

String

no

An external identifier of the dictionary defining the maximum number of devices of each type that could be associated with the service account

newAccountNumber

String

no

If the parameter is passed the service account number will be changed to the specified one, and for all devices associated with this service account the session will be deleted and the authorization will be needed

resetTerminal

Number

no

The attribute indicating if it is needed to delete MAC-addresses and serial numbers for all connections of this account number:

0 – delete
1 – not delete

description

String

no

Comment

purchaseVodAllow

Number

no

The attribute indicating the VoD purchases allowance:

0 – denied

1 – allowed with PIN

2 – allowed

billingId

String

no

The identifier at the OSS/BSS side

sessionLimit

String

no

ExternalID of the Concurrent session limit (can be found in the SmartTUBE Admin Console — Dictionaries — Concurrent session limit). If specified without a value, the limit is reset for the account.

stateSwitch

String

no

ExternalID of the Account state switch (can be found in the SmartTUBE Admin Console — Dictionaries — Account state switches). If specified without a value, the switch is reset for the account.

isDemo

Number

no

  • 1 – set the account to the demo state
  • 0 – set the account to the non-demo state

* If login and password are not specified either for the service account or for any of devices already associated with it, it will be impossible to link new devices to this service account.

Return value

code=”0″ is returned in case of success.

accountInfo 

The method returns data on a service account.

Method name

accountInfo

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

conditionally*

Get info about a service account by its Service Account Number (SAN)

uid

String

conditionally*

Get information about a service account by UID of a device linked to it

login

String

conditionally*

Get information about a service account by the login of a service account

getEmptyTerminals

Boolean

no

List terminals linked to the account:

  • 1 — list all devices, including empty ones (without UID)
  • 0 — list only devices with UID

* When calling the method, either accountNumber or uid or login must be specified.

Return values

If executed successfully, the method returns the following data:

Field

Description

createdAt

Date of service account creation

accountNumber

Service account number

name

Name of the service account

productOffer

An external ID of the pricing plan. You can create the pricing plan and assign the external ID to it in the SmartTUBE Administration Console

state

An external ID of the service account state:

  • ACTIVE – SmartTUBE app operates normally. The user has access to service in accordance with the pricing plan set for the service account.
  • NOT ACTIVE – a new service account, no active connections. After the SmartTUBE app has loaded, the service account status changes to ACTIVE.
  • BLOCKED – SmartTUBE app is started without access to services. With this service account status the subscriber cannot watch TV or purchase movies.
  • CLOSED – SmartTUBE app will not start.
  • TRIALCLOSED — the trial period for the account has expired; the SmartTUBE app will not start.
  • DELETED – SmartTUBE app will not start.
  • SUSPENDED – a new service account with a predefined connection. After the SmartTUBE app has loaded on the predefined device, the service account status changes to ACTIVE without the need to enter a login / password.

Note: For SmartTUBE the states CLOSED and DELETED are the same. If the service account is in one of these states, services and content are not delivered and subscriptions are not available.

terminalList

List of devices connected to the service account.

Each device is defined by the following parameters:

  • uuid – unique ID of the device
  • deviceType – device type (see SmartTUBE object model)
  • terminalName – name of the connection
  • location — device location in the operator’s network according to the “Regions” dictionary
  • ip — device IP address
  • lastAuthDate — date of last authorization
  • lastAuthVersion — firmware version at the time of the last authorization
  • login – login used for devices linking to the service account
  • serialNumber – device serial number
  • lang – current language of the subscriber’s interface

billingId

Account identifier at the OSS/BSS side

deviceLimit

External ID of the Device limit restriction defining the maximum number of devices of each type that could be associated with the service account

sessionLimit

External ID of the Concurrent session limit applied to the service account

deleteAccount 

The method deletes a service account and all the information about it.

Method name

deleteAccount

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

Return value

code=”0″ is returned in case of success.

ServiceAccountService#hashServiceAccountPasswords

The method hashes passwords on all service accounts.

Method name

ServiceAccountService#hashServiceAccountPasswords

Call parameters

This method does not require any parameters.

Return value

If executed successfully, the method returns “code”: 0.

ServiceAccountService#hashAllPasswords

The method hashes passwords on all service accounts and terminals.

Method name

ServiceAccountService#hashAllPasswords

Call parameters

This method does not require any parameters.

Return value

If executed successfully, the method returns “code”: 0.

Managing Linked Devices

addTerminal 

The method links a device to a service account.

Method name

addTerminal

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

no

Device type (see SmartTUBE object model)

login

String

no

The login used for devices linking to a service account, could be used instead of the login specified for the service account

password

String

no

The password used for devices linking to a service account, could be used instead of the password specified for the service account

terminalName

String

no

Name of the connection

location

String

no

The external identifier of a region for the connection.

The value of this parameter is used at SmartTUBE SDP for filtering TV-channels, which can be streamed on the subscriber’s device

hdcp

Number

no

  • 1 – enable HDCP protection of content transmitted via HDMI
  • 0 – disable HDCP protection of content transmitted via HDMI

Option is supported only by a limited list of set-top boxes. Please contact the SmartLabs support team for details.

Return value

code=”0″ is returned in case of success.

updateTerminal 

The method applies changes to the parameters of device binding.

Method name

updateTerminal

Call parameters

Parameter

Type

Required?

Description

uid

String

yes

Unique ID of the device

newUid

String

no

New unique ID of the device

deviceType

String

no

Device type (see SmartTUBE object model). Processing details:

  • If the parameter is specified, the value is assigned to the connection and the value “Billing or API” for the “Device type data source” parameter in the “Terminals” dictionary is set too.

login

String

no

The login used for devices linking to a service account, could be used instead of the login specified for the service account

password

String

no

The password used for devices linking to a service account, could be used instead of the password specified for the service account

terminalName

String

no

Name of the device connection

location

String

no

The external identifier of a region for the connection.

The value of this parameter is used at SmartTUBE SDP for filtering TV-channels, which can be streamed on the subscriber’s device

hdcp

Number

no

  • 1 – enable HDCP protection of content transmitted via HDMI
  • 0 – disable HDCP protection of content transmitted via HDMI

Option is supported only by a limited list of set-top boxes. Please contact the SmartLabs support team for details.

lastAuthDate

Number

no

Date of last device authorization

delete

Boolean

no

Flag to search for the device by UID or login, reset its UID and edit the activationNumber by the following template: login + ‘CLOSE’ + device ID

isDemo

Number

no

  • 1 – set the device to the demo state
  • 0 – set the device to the non-demo state
Return value

code=”0″ is returned in case of success.

deleteTerminal 

The method unbounds a device from the service account.

Method name

deleteTerminal

Call parameters

Parameter

Type

Required?

Description

uid

String

no

Unique ID of the device

Return value

code=”0″ is returned in case of success.

deleteTerminalHistory 

The method deletes the history of device UID transitions.

Method name

deleteTerminalHistory

Call parameters

Parameter

Type

Required?

Description

uid

String

no

Unique ID of the device, transitions to which need to be deleted

uidOld

String

no

Unique ID of the device, transitions from which need to be deleted

isDemo

number

no

  • 1 – delete only transitions to/from demo devices
  • 0 – delete only transitions to/from non-demo devices
  • none – delete all transitions
Return value

code=”0″ is returned in case of success.

setUidByLogin 

The method sets a unique identifier (UID) and a serial number for a linked device with the specified login.

Method name

setUidByLogin

Call parameters

Parameter

Type

Required?

Description

login

String

yes

Login the connection will be searched by

uid

String

yes

UID which will be set for the connection

serialNumber

String

no

Serial number which will be set for the connection

Return value

code=”0″ is returned in case of success.

ServiceAccountService#hashTerminalPasswords

The method hashes passwords on all terminals.

Method name

ServiceAccountService#hashTerminalPasswords

Call parameters

This method does not require any parameters.

Return value

If executed successfully, the method returns “code”: 0.

Managing Services

changeProductOffer

The method changes the pricing plan of the account.

Method name

changeProductOffer

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

productOffer

String

yes

An external ID of the pricing plan. You can create the pricing plan in SmartTUBE web interface; its external ID is set in the web interface as well.

Return value

code=”0″ is returned in case of success.

subscribeService 

The method adds or removes a service bundle for the service account.

Method name

subscribeService

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

serviceEId

String

yes

An external ID of the service

state

String

yes

Action:

  • 1 – add a service
  • 0 – refuse from a service

startDate

MM/dd/yyyy HH:mm:ss

no

Date of the service delivery start

stopDate

MM/dd/yyyy HH:mm:ss

no

Date of the service delivery end

isProcessExclusive

Number

no

An attribute indicating that mutually exclusive services must be taken into account:

  • 1 – taken into account,
  • 0 – not taken into account

isProcessBundle

Number

no

An attribute indicating that dependent services must be taken into account:

  • 1 – taken into account,
  • 0 – not taken into account
Return value

code=”0″ is returned in case of success.

accountServiceList 

The method returns the list of service bundles the service account is subscribed to.

Method name

accountServiceList

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

Return value

If executed successfully, the method returns the following data for each of the services:

Field

Description

canBeSubscribed

Attribute showing whether the service is available for subscription

deviceType

Device type (see SmartTUBE object model)

startDate

Date of service delivery start

endDate

Date of service delivery end

externalid

External identifier of the service

isActive

Attribute indicating whether the service is active (true/false)

name

Name of the service

type

Service discriminator, for example CHANNELPACKAGE

isInvisibleAlways

Sign of an always invisible service

isInvisibleWhenNotActive

Sign that the service is only invisible when not active (hidden when unsubscribed)

If the request contains a nonexistent account number, the following response is returned:

oss = {

 methods.authorize.send = true # whether to send the ‘authorize_uid’ request to the OSS during client authorization (by default,

false)

 methods.authorize.extraInfo.send = true # whether to send additional data (by default,true)

 methods.authorize.extraInfo.paramList = “defaultGatewayMAC” # list of additional parameters (their names without the ‘ex_’ prefix,

separated by commas) to be sent with the ‘authorize_uid’ request

}

resetAccount 

This method removes purchased/subscribed services and/or content from the service account.

Method name

resetAccount

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

resetService

Number

no

Possible values:

  • 1 (default) – remove all services from the service account. As a result, only services included in the pricing plan will be available to the user of this service account.
  • 0 — do not remove services from this service account

resetPurchase

Number

no

Possible values:

  • 1 – remove all content from the service account. Content will become unavailable to this service account.
  • 0 (default) – do not delete content
Return value

code=”0″ is returned in case of success.

Messaging

sendAccountMessage 

The method sends a text message to all devices bounded to specific service accounts. There is the ability to insert the subscriber’s MAC, UID or SAN as variables into the text. Such messages are displayed as a regular pop-up window in the app’s UI and can be useful to identify subscribers displaying closed content in public places.

Method name

sendAccountMessage

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The list of service account numbers (SANs), separated by comma.

message

String

yes

The message text. Supports the following variables:

  • {!DEVICEID!} — unique device identifier (MAC or UID);
  • {!SAN!} — service account number.

Call example:
…/integrationapi/sendAccountMessage?accountNumber=bony_007,bony_333&message=this%20is%20message%20for%20%7B!SAN!%7D

type

String

no

Options for displaying a message on the end-user device:

  • msgDisplay — a message is typically displayed as a regular modal dialog box in the middle of the screen;
  • call — a message is displayed as a notification popping up at the top of the screen for a few seconds.
Return value

code=”0″ is returned in case of success.

sendDevicesMessage 

The method sends a text message to the list of end-user devices. There is the ability to insert the subscriber’s MAC, UID or SAN into the text. Such messages are displayed as a regular pop-up window in the app’s UI and can be useful to identify subscribers displaying closed content in public places.

Method name

sendDevicesMessage

Call parameters

Parameter

Type

Required?

Description

uid

String

yes

The list of end-user device UIDs, separated by comma.

message

String

yes

The message text. Supports the following variables:

  • {!DEVICEID!} — unique device identifier (MAC or UID);
  • {!SAN!} — service account number.

Call example:
…/integrationapi/sendDevicesMessage?uid=00:11:72:33:49:52,sempai-3865&message=this%20is%20message%20for%20%7B!DEVICEID!%7D

Return value

code=”0″ is returned in case of success.

sendAccountsMessageById 

The method sends a message created in SmartTUBE Admin Console > Messages > Messages to devices bounded to specific service accounts. Such messages can be displayed as a regular pop-up window in the app’s UI or as a PUSH notification.

Method name

sendAccountsMessageById

Call parameters

Parameter

Type

Required?

Description

accountNumbers

String

yes

The list of service account numbers (SANs), separated by comma.

messageId

String

yes

The external ID of the message pre-created in SmartTUBE Admin Console > Messages > Messages

Return value

code=”0″ is returned in case of success.

sendDevicesMessageById 

The method sends a message created in SmartTUBE Admin Console > Messages > Messages to specific end-user devices. Such messages can be displayed as a regular pop-up window in the app’s UI or as a PUSH notification.

Method name

sendDevicesMessageById

Call parameters

Parameter

Type

Required?

Description

uid

String

yes

The list of end-user device UIDs, separated by comma.

messageId

String

yes

The external ID of the message pre-created in SmartTUBE Admin Console > Messages > Messages

Return value

code=”0″ is returned in case of success.

sendFilterMessageById 

The method sends a pre-created message to end-user devices bound to the filtered service accounts/devices. The message and account/device filter must be pre-created in SmartTUBE Admin Console > Messages > Messages and Messages > Receivers’ filters, respectively. Such messages can be displayed as a regular pop-up window in the app’s UI or as a PUSH notification.

Method name

sendFilterMessageById

Call parameters

Parameter

Type

Required?

Description

filterId

String

yes

External ID of the service account/device filter pre-created in SmartTUBE Admin Console > Messages > Receivers’ filters

messageId

String

yes

The external ID of the message pre-created in SmartTUBE Admin Console > Messages > Messages

Return value

code=”0″ is returned in case of success.

sendControlByAccounts 

The method sends a control message to the account numbers list.

Method name

sendControlByAccounts

Call parameters

Parameter

Type

Required?

Description

accountNumbers

String

yes

The list of service account numbers, separated by “,”

type

String

yes

The type of message:

  • factoryReset — reset STB to factory defaults;
  • Reboot — reboot STB;
  • reloadServices — reload services’ settings.
Return value

code=”0″ is returned in case of success.

sendControlByUids 

The method sends a control message to the UIDs list.

Method name

sendControlByUids

Call parameters

Parameter

Type

Required?

Description

uids

String

yes

The list of UIDs, separated by “,”

type

String

yes

The type of message:

  • factoryReset — reset STB to factory defaults;
  • Reboot — reboot STB;
  • reloadServices — reload services’ settings.
Return value

code=”0″ is returned in case of success.

Managing Profiles

setupContentBookmark 

The method adds or removes bookmarks to the specific media positions of the content items. Such bookmarks are called “system bookmarks”. “User-defined bookmarks” are set by subscribers in the SmartTUBE app. A single content item can have multiple bookmarks.

Method name

setupContentBookmark

Call parameters

Parameter

Type

Required?

Description

action

String

yes

Action type:

  • set — adds a bookmark;
  • delete — removes a bookmark.

accountNumber

String

no

List of the service account numbers separated by comma

profileId

Integer

no

List of the profile IDs separated by comma

all

Boolean

no

Flag to apply the action to all user profiles in the system

contentId

Integer

yes

ID of the content item

type

String

yes

Type of the content item:

  • PROGRAM — TV channels;
  • VIDEOMOVIE — VoD content.

value

Integer or Unix time

yes

For type=VIDEOMOVIE — shift from the file beginning, in seconds.

For type=PROGRAM — time of the channel mediaposition saving (under Pause Live, TSTV, nPVR services), unixtime.

Call Examples
  • Set a bookmark to all profiles of the specified service accounts:
    https://sdp_host:8443/sdpapibd/integrationapi/setupContentBookmark?action=set&accountNumber=sn_account,account2,account3&contentId=12345&type=VIDEOMOVIE&value=222
  • Set a bookmark to all the specified profiles:
    https://sdp_host:8443/sdpapibd/integrationapi/setupContentBookmark?action=set&profileId=555,777&contentId=12345&type=VIDEOMOVIE&value=222
  • Set a bookmark to all profiles in the system:https://sdp_host:8443/sdpapibd/integrationapi/setupContentBookmark?action=set&all=true&contentId=12345&type=VIDEOMOVIE&value=222
  • Remove a specific bookmark for the specified accounts and profiles:https://sdp_host:8443/sdpapibd/integrationapi/setupContentBookmark?action=delete&accountNumber=sn_account,account2,account3&profileId=555,777&contentId=12345&type=VIDEOMOVIE&value=222
  • Remove a specific bookmark for the specified movie for all profiles:https://sdp_host:8443/sdpapibd/integrationapi/setupContentBookmark?action=delete&all=true&contentId=12345&type=VIDEOMOVIE&value=222
Return value

code=”0″ is returned in case of success.

updateProfile 

The method applies changes to the profile parameters.

Method name

updateProfile

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

profileName

String

yes

Profile name

newProfileName

String

no

New profile name

maxAccessLevel

Number

no

The maximum access level. The content with age restriction above maximum level will be hidden

currentAccessLevel

Number

no

The current access level. Upon attempt to launch the content with the age restriction above this level PIN-code will be required

saveCurrentAccessLevel

Number

no

The attribute indicating the necessity to increase currentAccessLevel automatically to age restriction of content after its launch and entering PIN-code:

1 – increase

0 – not increase

pin

String

no

PIN-code

pinEnabled

Number

no

The attribute indicating the PIN-code request necessity when entering profile:
1 – request
0 – not request

Note: If the request of PIN-code is disabled for master-profile, changing of parameters of profiles at the subscriber’s device will be available under any profile

vodPurchaseRights

Number

no

The attribute indicating the VoD purchases allowance:

0 – denied

1 – allowed with PIN

2 – allowed

servicesPurchaseRights

Number

no

The attribute indicating the services subscription allowance:

0 – denied

1 – allowed with PIN

2 – allowed

isMaster

Number

no

The attribute indicating the master-profile:

1 – master-profile

0 – not master-profile

isCurrent

Number

no

The attribute indicating the active profile for this account at the moment:

1 – current profile is active

0 – other profile is active

Return value

code=”0″ is returned in case of success.

listProfile 

The method returns a list of parameters for all service account profiles, that can be modified by the updateProfile method.

Method name

listProfile

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

Return value

If executed successfully, the method returns the following data for each of the profiles:

Field

Description

name

Profile name

maxAccessLevel

The maximum access level. The content with age restriction above maximum level will be hidden

currentAccessLevel

The current access level. Upon attempt to launch the content with the age restriction above this level PIN-code will be required

pin

PIN code of the profile

vodPurchaseRights

The attribute indicating the VoD purchases allowance:

0 – denied

1 – allowed with PIN

2 – allowed

servicesPurchaseRights

The attribute indicating the services subscription allowance:

0 – denied

1 – allowed with PIN

2 – allowed

isMaster

The attribute indicating the master-profile:

1 – master-profile

0 – not master-profile

isCurrent

The attribute indicating the active profile for this account at the moment:

1 – current profile is active

0 – other profile is active

Managing nPVR

createNpvr 

The method creates an order to record upcoming TV show

Method name

createNpvr

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

epgId

String

yes

TV program identifier

Return value

If executed successfully, the method returns “code”: 0.

cancelNpvr 

The method removes the order to record upcoming TV show(s)

Method name

cancelNpvr

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

epgId

String

no

TV program identifier.

If not specified, all orders to record upcoming TV shows on the account will be removed.

recordIntervalId

integer

no

ID of recorded interval

Call Examples

http://localhost:8088/sdpapibd/integrationapi/cancelNpvr?accountNumber=sn_account&recordIntervalId=1215447 — cancels the recording of a specific recording interval

http://localhost:8088/sdpapibd/integrationapi/cancelNpvr?accountNumber=sn_account&epgId=1215447 — cancels the recording of a specific TV program

http://localhost:8088/sdpapibd/integrationapi/cancelNpvr?accountNumber=sn_account — cancels the recording of all TV programs and intervals for the specified service account

Return value

If executed successfully, the method returns “code”: 0.

listNpvrSeries 

The method returns a list of orders to record upcoming TV series on the service account

Method name

listNpvrSeries

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

Return value

If executed successfully, the method returns the following data:

Field

Description

seriesId

TV series identifier

channelId

TV channel identifier. May not be present in the method response. If so, the specified TV show will be recorded on any channel, where it will be broadcasted.

createNpvrSeries 

The method creates an order to record upcoming TV series

Method name

createNpvrSeries

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

seriesId

String

yes

TV series identifier

channelId

Integer

no

TV channel identifier.

If not set, the specified TV series will be recorded on any channel, where it will be broadcasted.

Return value

If executed successfully, the method returns “code”: 0.

cancelNpvrSeries 

The method removes the order to record upcoming TV series

Method name

cancelNpvrSeries

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

seriesId

String

yes

TV series identifier

Return value

If executed successfully, the method returns “code”: 0.

listNpvrSchedule 

The method returns a list of schedules to record upcoming TV broadcasts

Method name

listNpvrSchedule

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

Return value

If executed successfully, the method returns the following data:

Field

Description

Id

Schedule identifier

channelId

TV channel identifier

beginTime

Recording start time, in UTC format.

endTime

Recording end time, in UTC format.

days

Days of the week to record the TV broadcast, in the binary form. For example: 1100011 — a set of bits to activate recording on Mondays, Tuesdays, Saturdays and Sundays.

createNpvrSchedule 

The method creates a schedule to record upcoming TV broadcast

Method name

createNpvrSchedule

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

channelId

Integer

yes

TV series identifier

beginTime

UTC

yes

Recording start time

endTime

UTC

yes

Recording end time

days

UTC

yes

Days of the week to record the TV broadcast, in the binary form. For example: 1100011 — a set of bits to activate recording on Mondays, Tuesdays, Saturdays and Sundays.

isActive

UTC

yes

Schedule status flag:

  • true — enable the schedule;
  • false — disable the schedule.
Return value

If executed successfully, the method returns “id” of the schedule.

updateNpvrSchedule 

The method edits a schedule to record upcoming TV broadcast

Method name

updateNpvrSchedule

Call parameters

Parameter

Type

Required?

Description

Id

Integer

yes

Schedule identifier

accountNumber

String

yes

Service account number

channelId

Integer

yes

TV series identifier

beginTime

UTC

no

Recording start time

endTime

UTC

no

Recording end time

days

UTC

no

Days of the week to record the TV broadcast, in the binary form. For example: 1100011 — a set of bits to activate recording on Mondays, Tuesdays, Saturdays and Sundays.

isActive

UTC

no

Schedule status flag:

  • true — enable the schedule;
  • false — disable the schedule.
Return value

If executed successfully, the method returns “code”: 0.

updateNpvrSchedule 

The method edits a schedule to record upcoming TV broadcast

Method name

updateNpvrSchedule

Call parameters

Parameter

Type

Required?

Description

Id

Integer

yes

Schedule identifier

accountNumber

String

yes

Service account number

channelId

Integer

yes

TV series identifier

beginTime

UTC

no

Recording start time

endTime

UTC

no

Recording end time

days

UTC

no

Days of the week to record the TV broadcast, in the binary form. For example: 1100011 — a set of bits to activate recording on Mondays, Tuesdays, Saturdays and Sundays.

isActive

UTC

no

Schedule status flag:

  • true — enable the schedule;
  • false — disable the schedule.
Return value

If executed successfully, the method returns “code”: 0.

cancelNpvrSchedule 

The method removes schedules to record upcoming TV broadcasts

Method name

cancelNpvrSchedule

Call parameters

Parameter

Type

Required?

Description

Id

Integer

yes

Schedule identifier

accountNumber

String

yes

Service account number

Return value

If executed successfully, the method returns “code”: 0.

listNpvrRecordInterval 

The method returns a list of recorded intervals

Method name

listNpvrRecordInterval

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

Return value

If executed successfully, the method returns the following data:

Field

Description

recordId

ID of the recorded interval

uid

unique ID of the subscriber device

usageTime

Date when the recording task was set

serviceId

ID of the bundle

status

Recording status:

  • 0 — the programme recording is suspended until the quota is released
  • 1 — the programme is scheduled to record
  • 2 — the programme is recorded successfully
  • 3 — the recording is canceled by the subscriber
  • 4 — the recording is canceled due to storage time exceeded
  • 5 — the recording is canceled by the system (due to a technical problem)

validToDate

Expiration date of the storage time of the recorded interval

incMin

The number of minutes that is added to the end of the TV program specified in the EPG when the TV program is scheduled to nPVR recording.

decMin

The number of minutes that is subtracted from the start of the TV program specified in the EPG when the TV program is scheduled to nPVR recording.

channelId

ID of the channel on which the interval is recorded

sdate

Start datestamp of the recording interval

fdate

End datestamp of the recording interval

EPG Managing

updateEpg 

The method updates EPG data for the specified programs

Method name

updateEpg

Call parameters

Parameter

Type

Required?

Description

channelExtId

String

yes

External ID of a channel

programExtId

String

yes (or programId)

External ID of a program or programs (comma separated)

programId

Integer

yes (or programExtId)

ID of a program or programs (comma separated)

start

String

no

Program start date, in UTC format. Example: “dd.MM.yyyy HH:mm:ss”

finish

String

no

Program finish date, in UTC format. Example: “dd.MM.yyyy HH:mm:ss”

publicNpvr

Integer

no

Flag to mark the program as for the Catch-up Library (Public nPVR):

  • 0 – do not mark
  • 1 – mark

reloadCache

Boolean

no

Flag to reload the EPG cache for the specified programs. If omitted, it is assumed as true.

notifyDevices

Boolean

no

Flag to notify all devices to reload EPG for the specified programs. If omitted, it is assumed as false.

Return value

If executed successfully, the method returns “code”: 0.

reloadEpgCache 

The method reloads EPG cache for all or specified programs

Method name

reloadEpgCache

Call parameters

Parameter

Type

Required?

Description

channelExtId

String

yes

External ID of a channel

programExtId

String

yes (or programId)

External ID of a program or programs (comma separated)

programId

Integer

yes (or programExtId)

ID of a program or programs (comma separated)

all

Boolean

no

Flag to reload the EPG cache for all programs. If omitted, it is assumed as false.

Return value

If executed successfully, the method returns “code”: 0.

sendEpgDeviceNotifications 

The method sends notification to all devices to reload EPG for the current day for the specified programs.

Method name

sendEpgDeviceNotifications

Call parameters

Parameter

Type

Required?

Description

channelExtId

String

yes

External ID of a channel

programExtId

String

yes (or programId)

External ID of a program or programs (comma separated)

programId

Integer

yes (or programExtId)

ID of a program or programs (comma separated)

Return value

If executed successfully, the method returns “code”: 0.

Getting reports

To get different information on service accounts (states, connections, purchases, etc.), content consumption, and content assets you may use the report method. The syntax of this method is as follows:

http[s]://<sdp_server_address>:<port>/<oss_api_prefix>/report?run_report_id=<value>&<parameter 2>=<value 2> …

Common parameters

Parameter

Type

Required?

Description

run_report_id

String

yes

The identifier of the report. It determines the contents of the report

accountNumber

String

no

The service account number

List of reports

Value of run_report_id

Report description

OSS_ACCOUNT_TARIF

States and pricing plan

OSS_TERMINAL

End-user Devices

OSS_PURCHASE

Purchasing content

OSS_SUBSCRIPTION

Subscriptions and dates

NPVR_LIST

nPVR items list

REP_ASSET_READY

Summary Reports on Content Assets

REP_CONTENT_AVAILABLE_DETAILED

Detailed Reports on Content Assets

REP_MC_VIEWS_COUNT

SVoD Content Consumption

DEVICE_ONLINE_INFO

Last Viewed Channels

REP_OTT_AUDITORIUM

Channel viewing statistics

CARE_CHANNEL_VIEW

Channel coverage

REP_ACCOUNT_CREATE_DELETE_HISTORY

Created/deleted accounts

REP_ACCOUNT_NOT_AUTHORIZED

Service accounts not authorized till now

REP_SERVICE_ACCOUNTS_WITHOUT_NEW_CONNECTIONS

Service accounts without new device connections

REP_ACCOUNT_WO_TERMINALS

Service account w/o bonded devices

REP_CHANGE_PO

Number of pricing plan changes

REP_TERMINAL_TYPE_GROUP_COUNT

Device combinations on service accounts

REP_ACCOUNT_BY_STATE

Percentage of accounts by state

REP_ACCOUNT_BY_PO

Percentage of users by pricing plan

REP_STBTYPE_COUNT

Statistics by device types

REP_VER_STBTYPE_COUNT

Statistics by app versions

REP_SERVICE_USAGE

Service consumption

REP_SERVICE_USAGE_DETAILED

Service consumption in detail

REP_PURCHASED_VOD

Purchased TVOD movies

REP_PURCHASED_VOD_DETAILED

Purchased TVOD movies in detail

REP_SVOD_DETAILED

SVOD content consumption

REP_TOP_10_PROGRAM_VIEW

Top 10 most viewed programs

State and pricing plan

Value of the run_report_id – OSS_ACCOUNT_TARIF

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

state

ExternalID of the service account state (see Service account states)

product

ExternalID of the pricing plan.

devicelimitation

ExternalID of the Device limit restriction defining the maximum number of devices of each type that could be associated with the service account

sessionlimitation

ExternalID of the Concurrent session limit applied to the service account

End-user Devices

Value of the run_report_id – OSS_TERMINAL

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

uid

Unique ID of the device

lastauthdate

Date of the last authorization in the “DD/MM/YYYY hh:mm:ss” format

devicetype

Device type (see SmartTUBE object model)

lastauthversion

SmartTUBE app version at the time of the last authorization

location

Name of the connection region

ip

IP address of an end-user device

defaultGatewayMAC

MAC address of the end-user device default gateway

Purchasing content

Value of the run_report_id – OSS_PURCHASE

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

no

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

no

End date of the report data range

lang

String

no

Language used in the report. If not set, English will be used.

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

usagedate

Date of the purchase in the “DD/MM/YYYY hh:mm:ss” format

stopdate

Expiration date of the purchase validity in the “DD/MM/YYYY hh:mm:ss” format. NULL, if there are no restrictions

contentid

ID of the purchased content

contentName

Content unit name

contentExtId

External ID of the purchased content (“ContentGroup uriId” field in the imported XML)

price

Price for the purchased content

duration

Duration of the movie rental in seconds

quality

Purchased content quality

orderId

Order ID

Subscriptions and dates

Value of the run_report_id – OSS_SUBSCRIPTION

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

no

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

no

End date of the report data range

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

usagedate

Date of the service subscription in the “DD/MM/YYYY hh:mm:ss” format

stopdate

Expiration date of the service validity in the “DD/MM/YYYY hh:mm:ss” format. NULL, if there are no restrictions

service

An external ID of the service

price

Price for adding the service

nPVR items list

Value of the run_report_id – NPVR_LIST

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

yes

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

yes

End date of the report data range

Return value

If executed successfully, the method returns the following data:

Field

Description

account_number

The service account number.

serviceId

An external identifier of the nPVR service.

channelId

An external identifier of the channel.

start_date

The start time of the program recording.

stop_date

The stop time of the program recording.

status

The status of the program recording:

  • QUERY_ACCEPT — the command to record was given;
  • WRITTEN — the program recording completed successfully;
  • CANCELED — the recording was cancelled;
  • TIMEOUT — the record is not available due to the storage time limit was reached.

dvr_program_url

URL to play the recorded asset.

Summary reports on content assets

Value of the run_report_id — REP_ASSET_READY

Summary reports display data on all content assets stored on the system. For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

formater

string

no

Report output format. Admissible values:

  • csv — export to CSV file.

If this parameter is not specified, the report will be returned to the console window in text format.

provider

string

no

Filter by content provider.

assetIsReady

boolean

no

Filter by downloaded and transcoded assets.

contentAvailable

boolean

no

Filter by available on SmartTUBE Admin UI assets. You can also use the following additional filter parameters:

  • isPublished — content unit is available for viewing by subscribers;
  • logoExists — content unit has a poster;
  • startDate — date and time when the content unit becomes available for rental;
  • endDate — date and time when the content unit stops being available for rental.
Return value

If executed successfully, the method returns the following data:

Field

Description

contentType

Content type: movie or episode.

count

The number of movies or episodes.

Detailed reports on content assets

Value of the run_report_id — REP_CONTENT_AVAILABLE_DETAILED

These reports display detailed data on each content asset stored on the system. For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

formater

string

no

Report output format. Admissible values:

  • csv — export to CSV file.

If this parameter is not specified, the report will be returned to the console window in text format.

provider

string

no

Filter by content provider.

creationDate_start

date

no

Filter by start date when content metadata (and its asset metadata) was imported to the SmartTUBE catalog for the first time. Specified in the following format: dd/mm/yyyy+hh:mm:ss

contentAvailable

boolean

no

Filter by available on SmartTUBE Admin UI assets. You can also use the following additional filter parameters:

  • isPublished — content unit is available for viewing by subscribers;
  • logoExists — content unit has a poster;
  • startDate — date and time when the content unit becomes available for rental;
  • endDate — date and time when the content unit stops being available for rental.

contentType

string

no

Filter by content type. Admissible values:

  • movie,
  • episode.
Return value

If executed successfully, the method returns the following data:

Field

Description

contentType

Content type: movie or episode.

name

Name of the content unit.

assetName

Name of the asset.

seasonNumber

Number of the season.

episodeNumber

Number of the episode.

episodeName

Name of the episode.

contentAvailable

Asset availability on SmartTUBE Admin UI.

isPublished

Content availability for watching by subscribers.

assetIsReady

Indicates whether the asset is downloaded and transcoded.

logoExists

Asset poster availability.

dateIntervalAvailable

Availability of a rental period for the asset.

logo

Path to the asset poster.

startDate

Date and time when the content unit becomes available for rental.

endDate

Date and time when the content unit stops being available for rental.

creationDate

Date and time when content metadata (and its asset metadata) was imported to the SmartTUBE catalog for the first time.

SVoD content consumption

Value of the run_report_id — REP_MC_VIEWS_COUNT

This report displays detailed data on SVoD content units viewed by subscribers for the specified period. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of the content units’ name to be displayed in the report (EN by default).

date_start

date

no

Filter by the start date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

no

Filter by the end date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

provider

string

no

Filter by externalId of the content provider.

package

integer

no

Filter by VoD package ID.

packageType

string

no

Filter by content monetization type. Admissible values:

  • svod
  • tvod
Return value

If executed successfully, the method returns the following data:

Field

Description

cId

ID of the content unit.

contentType

Content type: movie or episode.

cName

Name of the content unit.

seasonNumber

Number of the season.

episodeNumber

Number of the episode.

episodeName

Name of the episode.

uniqueSaViewsCount

Number of subscribers who watched the content unit.

viewsCount

Total number of views, including repeat views.

Last viewed channels

Value of the run_report_id — DEVICE_ONLINE_INFO

The report displays data about the TV channels most recently viewed on end-user devices. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of the channels’ name to be displayed in the report (EN by default).

Return value

If executed successfully, the method returns the following data:

Field

Description

uuid

Unique ID (UID) of the end-user device

san

Service account number

lastViewChannelId

ID of the last viewed channel

lastViewChannelName

Name of the last viewed channel

updateDate

Date and time of the last channel view record (i.e., the date and time of the last “keep alive” SmartCARE-message about the channel view)

ip

IP address of an end-user device

defaultGatewayMAC

MAC address of the end-user device default gateway

Channel viewing statistics

Value of the run_report_id — REP_OTT_AUDITORIUM

The report displays detailed info on the TV channels viewing (Live and not Live). For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

yes

Language of the channels’ name to be displayed in the report

period

integer

yes

Aggregation period. Divides the report into rows that reflect data about the specified period (5 min, 1 hour, 1 day, 1 month).

date_start

date

yes

Filter by the start date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Channel

channel_name

Channel name.

Note: the channel name is requested by its ID in the corresponding SmartTUBE dictionary.

Date

period_start

Start time of the data aggregation period.

period_end

End time of the data aggregation period (start time + user-defined aggregation frequency).

Number of viewers

fact_auditorium

The sum of live_auditorium (Number of viewers (live)) and catchup_auditorium (Number of viewers (DVR)) fields

Duration

total_min

The sum of live_min (Duration (live)) and catchup_min (Duration (DVR)) fields

Number of viewers (live)

live_auditorium

Number of channel views by all subscribers in Live mode.

If one device for the period played the channel stream 3 times for at least 60 seconds, the number of views will be 3, not 1.

Duration (live)

live_min (in seconds)

Duration of the channel playback in the Live mode by all subscribers (sec).

Number of viewers (not live)

catchup_auditorium

Number of subscriber devices played the channel in the DVR mode.

If one device for the period played the channel stream 3 times for at least 60 seconds, the number of views will be 3, not 1.

Duration (not live)

catchup_min

Duration of the channel playback in the DVR mode by all subscribers (sec).

@/live_rating_full_period/@

live_rating

Channel rating by subscriber devices that played it in the Live mode (% of devices that played the channel of the total device number across all channels for the current aggregation period).

@/catchup_rating_full_period/@

catchup_rating

Channel rating by subscriber devices that played it in the DVR mode (% of devices that played the channel of the total device number across all channels for the current aggregation period).

@/live_viewing_full_period/@

live_viewing

Channel rating by viewing duration in the Live mode (% of the channel viewing duration of the total viewing duration of all channels for the current aggregation period).

@/catchup_viewing_full_period/@

catchup_viewing

Channel rating by viewing duration in the DVR mode (% of the channel viewing duration of the total viewing duration of all channels for the current aggregation period).

theory_auditorium

Theoretical (potential) audience — the number of subscribers for whom the channel is available for viewing (the service is active).

devicetype_name

Name of the end-user device type

State and pricing plan

Value of the run_report_id – OSS_ACCOUNT_TARIF

Return value

If executed successfully, the method returns the following data:

End-user Devices

Value of the run_report_id – OSS_TERMINAL

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

uid

Unique ID of the device

lastauthdate

Date of the last authorization in the “DD/MM/YYYY hh:mm:ss” format

devicetype

Device type (see SmartTUBE object model)

lastauthversion

SmartTUBE app version at the time of the last authorization

location

Name of the connection region

ip

IP address of an end-user device

defaultGatewayMAC

MAC address of the end-user device default gateway

Purchasing content

Value of the run_report_id – OSS_PURCHASE

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

no

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

no

End date of the report data range

lang

String

no

Language used in the report. If not set, English will be used.

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

usagedate

Date of the purchase in the “DD/MM/YYYY hh:mm:ss” format

stopdate

Expiration date of the purchase validity in the “DD/MM/YYYY hh:mm:ss” format. NULL, if there are no restrictions

contentid

ID of the purchased content

contentName

Content unit name

contentExtId

External ID of the purchased content (“ContentGroup uriId” field in the imported XML)

price

Price for the purchased content

duration

Duration of the movie rental in seconds

quality

Purchased content quality

orderId

Order ID

Subscriptions and dates

Value of the run_report_id – OSS_SUBSCRIPTION

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

no

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

no

End date of the report data range

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

usagedate

Date of the service subscription in the “DD/MM/YYYY hh:mm:ss” format

stopdate

Expiration date of the service validity in the “DD/MM/YYYY hh:mm:ss” format. NULL, if there are no restrictions

service

An external ID of the service

price

Price for adding the service

nPVR items list

Value of the run_report_id – NPVR_LIST

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

yes

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

yes

End date of the report data range

Return value

If executed successfully, the method returns the following data:

Field

Description

account_number

The service account number.

serviceId

An external identifier of the nPVR service.

channelId

An external identifier of the channel.

start_date

The start time of the program recording.

stop_date

The stop time of the program recording.

status

The status of the program recording:

  • QUERY_ACCEPT — the command to record was given;
  • WRITTEN — the program recording completed successfully;
  • CANCELED — the recording was cancelled;
  • TIMEOUT — the record is not available due to the storage time limit was reached.

dvr_program_url

URL to play the recorded asset.

Summary reports on content assets

Value of the run_report_id — REP_ASSET_READY

Summary reports display data on all content assets stored on the system. For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

formater

string

no

Report output format. Admissible values:

  • csv — export to CSV file.

If this parameter is not specified, the report will be returned to the console window in text format.

provider

string

no

Filter by content provider.

assetIsReady

boolean

no

Filter by downloaded and transcoded assets.

contentAvailable

boolean

no

Filter by available on SmartTUBE Admin UI assets. You can also use the following additional filter parameters:

  • isPublished — content unit is available for viewing by subscribers;
  • logoExists — content unit has a poster;
  • startDate — date and time when the content unit becomes available for rental;
  • endDate — date and time when the content unit stops being available for rental.
Return value

If executed successfully, the method returns the following data:

Field

Description

contentType

Content type: movie or episode.

count

The number of movies or episodes.

Detailed reports on content assets

Value of the run_report_id — REP_CONTENT_AVAILABLE_DETAILED

These reports display detailed data on each content asset stored on the system. For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

formater

string

no

Report output format. Admissible values:

  • csv — export to CSV file.

If this parameter is not specified, the report will be returned to the console window in text format.

provider

string

no

Filter by content provider.

creationDate_start

date

no

Filter by start date when content metadata (and its asset metadata) was imported to the SmartTUBE catalog for the first time. Specified in the following format: dd/mm/yyyy+hh:mm:ss

contentAvailable

boolean

no

Filter by available on SmartTUBE Admin UI assets. You can also use the following additional filter parameters:

  • isPublished — content unit is available for viewing by subscribers;
  • logoExists — content unit has a poster;
  • startDate — date and time when the content unit becomes available for rental;
  • endDate — date and time when the content unit stops being available for rental.

contentType

string

no

Filter by content type. Admissible values:

  • movie,
  • episode.
Return value

If executed successfully, the method returns the following data:

Field

Description

contentType

Content type: movie or episode.

name

Name of the content unit.

assetName

Name of the asset.

seasonNumber

Number of the season.

episodeNumber

Number of the episode.

episodeName

Name of the episode.

contentAvailable

Asset availability on SmartTUBE Admin UI.

isPublished

Content availability for watching by subscribers.

assetIsReady

Indicates whether the asset is downloaded and transcoded.

logoExists

Asset poster availability.

dateIntervalAvailable

Availability of a rental period for the asset.

logo

Path to the asset poster.

startDate

Date and time when the content unit becomes available for rental.

endDate

Date and time when the content unit stops being available for rental.

creationDate

Date and time when content metadata (and its asset metadata) was imported to the SmartTUBE catalog for the first time.

SVoD content consumption

Value of the run_report_id — REP_MC_VIEWS_COUNT

This report displays detailed data on SVoD content units viewed by subscribers for the specified period. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of the content units’ name to be displayed in the report (EN by default).

date_start

date

no

Filter by the start date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

no

Filter by the end date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

provider

string

no

Filter by externalId of the content provider.

package

integer

no

Filter by VoD package ID.

packageType

string

no

Filter by content monetization type. Admissible values:

  • svod
  • tvod
Return value

If executed successfully, the method returns the following data:

Field

Description

cId

ID of the content unit.

contentType

Content type: movie or episode.

cName

Name of the content unit.

seasonNumber

Number of the season.

episodeNumber

Number of the episode.

episodeName

Name of the episode.

uniqueSaViewsCount

Number of subscribers who watched the content unit.

viewsCount

Total number of views, including repeat views.

Last viewed channels

Value of the run_report_id — DEVICE_ONLINE_INFO

The report displays data about the TV channels most recently viewed on end-user devices. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of the channels’ name to be displayed in the report (EN by default).

Return value

If executed successfully, the method returns the following data:

Field

Description

uuid

Unique ID (UID) of the end-user device

san

Service account number

lastViewChannelId

ID of the last viewed channel

lastViewChannelName

Name of the last viewed channel

updateDate

Date and time of the last channel view record (i.e., the date and time of the last “keep alive” SmartCARE-message about the channel view)

ip

IP address of an end-user device

defaultGatewayMAC

MAC address of the end-user device default gateway

Channel coverage

Value of the run_report_id — CARE_CHANNEL_VIEW

The report displays info on the number of live and DVR viewers of TV channels with the theoretical audience assumption. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

yes

Language of the channels’ name to be displayed in the report

period

integer

yes

Aggregation period, in seconds. Divides the report into rows that reflect data about the specified period. Allowed values: 86400 (1 day), 2592000 (1 month).

date_start

date

yes

Filter by the start date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

channelId

integer

no

Filter by the Channel ID

deviceTypeId

integer

no

Filter by the Device type ID

tariffId

integer

no

Filter by the Pricing plan ID

report_type

string

no

Type of report: dur_range_with (with filtering by the viewing time), parameter is omitted (without filtering by the viewing time).

durRange

period

no

if report_type=dur_range_with, filter by channel viewing time. Set by periods in minutes: 3-5, 3-5, 5-10, 10 (i.e. more than 10 minutes). You can specify multiple periods separated by comma.

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

channel_id

Channel ID

channel_name

Channel name.

Note: the channel name is requested by its ID in the corresponding SmartTUBE dictionary.

Date

period_start

Start time of the data aggregation period.

End date

period_end

End time of the data aggregation period (start time + user-defined aggregation frequency).

Number of viewers (live + DVR)

cnt_all

The total number of unique channel views by all subscriber devices in the Live and Catchup mode.

total_min

The sum of live_min (Duration (live)) and catchup_min (Duration (DVR)) fields

Number of viewers (live)

cnt_live

Number of unique channel views by all subscriber devices in the Live mode.

If one device for the period played the channel stream 3 times for at least 60 seconds, ​the number of views will be 1, not

duration_live_sec

Duration of the channel playback in the Live mode by all subscribers, in seconds.

duration_live

Duration of the channel playback in the Live mode by all subscribers, in the format HH:MM:SS.

Number of viewers (DVR)

cnt_nonlinear

Number of unique channel views​ by all subscriber devices in the DVR mode.

If one device for the period played the channel stream 3 times for at least 60 seconds, ​the number of views will be 1, not 3.​

duration_nonlinear_sec

Duration of the channel playback in the Catch-up mode by all subscribers, in seconds.

duration_nonlinear

Duration of the channel playback in the Catch-up mode by all subscribers, in the format HH:MM:SS.

Theoretical audience

theory_auditorium

Theoretical (potential) audience — the number of subscribers for whom the channel is available for viewing (the service is active).

devicetype_name

Name of the end-user device type

Created/deleted accounts

Value of the run_report_id — REP_ACCOUNT_CREATE_DELETE_HISTORY

The report displays the number of accounts added / deleted during the specified period. Deleted accounts — accounts that have passed to the “Closed” state. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

yes

Language of data to be displayed in the report

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Date

date

Calendar day

Created

created

The number of created service accounts

Deleted

deleted

The number of deleted service accounts (accounts that have passed to the “Closed” state)

Service accounts not authorized till now

Value of the run_report_id — REP_ACCOUNT_NOT_AUTHORIZED

The report displays a list of service accounts without any activity (authorizations) for the specified period until today. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of data to be displayed in the report

days

integer

yes

The number of days until today during which accounts should have no authorizations

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

ID

id

Service account number

Name

name

Service account name

state

Service account state

Service accounts without new connections

Value of the run_report_id — REP_SERVICE_ACCOUNTS_WITHOUT_NEW_CONNECTIONS

The report displays a list of service accounts without any activity (device connections) for the specified period until today. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of data to be displayed in the report

days

integer

yes

The number of days until today during which accounts should have no terminal connections

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

ID

id

Service account number

Name

name

Service account name

State

state

Service account state

Service account w/o linked devices

Value of the run_report_id — REP_ACCOUNT_WO_TERMINALS

The report displays a list of accounts that either do not have any bonded devices, or all devices have no UID.

This run_report_id does not require any additional parameters.

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

ID

id

Service account number

Name

name

Service account name

Number of pricing plan changes

Value of the run_report_id — REP_CHANGE_PO

The report displays the number of pricing plan shifts for the period with details by plan names. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of data to be displayed in the report

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

oldProductOfferId

integer

no

Filter by previous pricing plan ID

newProductOfferId

integer

no

Filter by new pricing plan ID

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

oldProductOfferId

Previous pricing plan ID

Previous pricing plan

oldProductOfferName

Previous pricing plan name

newProductOfferId

New pricing plan ID

New pricing plan

newProductOfferName

New pricing plan name

Quantity

count

The number of pricing plan shifts

Device combinations on service accounts

Value of the run_report_id — REP_TERMINAL_TYPE_GROUP_COUNT

The report displays all the unique combinations of devices connected to the accounts.

This run_report_id does not require any additional parameters.

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Service account state

STATE

Service account state

Device combinations

TYPES

Combination of end-user devices bound to the account, in the format [device_type]-[quantity]; [device_type]-[quantity], …

Service account count

CNT

Number of account with a such device combination

Device count

DEVCOUNT

Number of end-user devices total over accounts with a such device combination

Percentage of accounts by state

Value of the run_report_id — REP_ACCOUNT_BY_STATE

The report displays the number and percentage of accounts by state on the specified day.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Creation date

create_date

Report date

Name

name

Account state

Quantity

count

Number of accounts with this state

Percentage

percentage

The share of accounts with this state in relation to the total number of accounts

Percentage of users by pricing plan

Value of the run_report_id — REP_ACCOUNT_BY_PO

The report displays the number and percentage of accounts by pricing plan for the period.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Product offer

po_name

Name of the price plan

Percentage

percentage

The share of accounts with this pricing plan in relation to the total number of accounts

Count

cnt

Number of accounts with this pricing plan

full

Total number of accounts

Statistics by device types

Value of the run_report_id — REP_STBTYPE_COUNT

The report displays the number of devices of different types.

This run_report_id does not require any additional parameters.

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Device type

stb_type

Device type

Quantity

count

Number of devices

Statistics by app versions

Value of the run_report_id — REP_VER_STBTYPE_COUNT

The report displays the number of devices of different SmartTUBE app versions.

This run_report_id does not require any additional parameters.

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Device type

dev_type

Device type

Version

version

SmartTUBE app version

Count

cnt

Number of devices

Service consumption

Value of the run_report_id — REP_SERVICE_USAGE

The report displays the number of accounts by consumed services (bundles).

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

yes

Language of data to be displayed in the report

serviceSpecId

integer

no

Filter by the service (bundle) ID

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Service

name

Name of the service (bundle)

Quantity

count

Number of accounts that have subscribed on this service (bundle)

Price

sum

The sum of fees charged for subscriptions

Service consumption in detail

Value of the run_report_id — REP_SERVICE_USAGE_DETAILED

The report displays info on the consumption of services, detailed by accounts.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

yes

Language of data to be displayed in the report

serviceSpecId

integer

no

Filter by the service (bundle) ID

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Service account number

accountNumber

Service account number

Service account name

accountName

Service account name

State of service account

accountStateExternalId

Service account state

Pricing plan of Service account

poName

Name of the pricing plan that the service account is subscribed to

poExternalId

External ID of the pricing plan

Service

name

Name of the service (bundle)  that the service account is subscribed to

Start date

start_date

Date of subscription to the service

End date

stop_date

Date of unsubscription from the service. If empty, the service is subscribed to the end date of the report.

Price

price

Price of the service

Purchased TVOD movies

Value of the run_report_id — REP_PURCHASED_VOD

The report displays the number of movie purchase facts in the specified time frame throughout the whole subscriber base.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

yes

Language of data to be displayed in the report

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Content

contentName

The movie or series name

Content type

contentType

Content type: video (movie) or episode

Package

packageName

TVOD bundle name

Provider

providerName

Content provider name

EST

isEst

The sign of the EST purchase (the movie is bought forever), i.e. the movie has no date_end (or stopDate = null).

Success

success

The movie purchase was successfully carried out by OSS / BSS

Quantity

count

The number of movie purchases

Price

sum

The sum of fees charged for the movie

Purchased TVOD movies in detail

Value of the run_report_id — REP_PURCHASED_VOD_DETAILED

The report displays the number of movie purchase facts in the specified time frame with account detail.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

yes

Language of data to be displayed in the report

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Service account number

accountNumber

Service account number

Content

contentName

The movie or series name

Content type

contentType

Content type: video (movie) or episode

Episode title

episodeName

The episode name

Season number

seasonNumber

Season number

Episode number

episodeNumber

Episode number

Package

packageName

VOD bundle name

Provider

providerName

Content provider name

EST

isEst

The sign of the EST purchase (the movie is bought forever), i.e. the movie has no date_end (or stopDate = null).

Success

success

The movie purchase was successfully carried out by OSS / BSS

Date of purchase

usageDate

Date of movie purchase

Start date

startDate

Start date of the movie rental period

End date

stopDate

End date of the movie rental period

OSS

ossComment

Сomment from OSS / BSS on the failed movie purchase

Price

price

Movie price

orderId

Order ID

Detailed report by SVOD

Value of the run_report_id — REP_SVOD_DETAILED

The report displays the number of movie purchase facts in the specified time frame with account detail.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

no

Language of data to be displayed in the report

provider

string

no

Filter by externalId of the content provider

package

integer

no

Filter by VoD package ID

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Service account number

accountNumber

Service account number

Content

contentName

The movie or series name

Content type

contentType

Content type: video (movie) or episode

Package

packageName

VOD bundle name

Provider

providerName

Content provider name

EST

isEst

The sign of the EST purchase (the movie is bought forever), i.e. the movie has no date_end (or stopDate = null).

Success

success

The movie purchase was successfully carried out by OSS / BSS

Date of purchase

usageDate

Date of movie purchase

Start date

startDate

Start date of the movie rental period

End date

stopDate

End date of the movie rental period

OSS

ossComment

Сomment from OSS / BSS on the failed movie purchase

Price

price

Movie price

Content ID

contentId

Movie ID

Content external ID

contentExtId

Movie external ID

Season number

seasonNumber

Season number

Episode number

episodeNumber

Episode number

Episode title

episodeName

The episode name

Service external ID

serviceExtId

VOD bundle external ID

Provider external ID

providerExtId

Content provider external ID

Top 10 most viewed interactive items

Value of the run_report_id — REP_TOP_10_PROGRAM_VIEW

The report displays the number of TV program in-archive views for the specified time frame.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

yes

Language of data to be displayed in the report

channelId

integer

no

Filter by channel ID

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Channel

channel_name

Channel name

Programme name

program_name

Program name

Number of viewers

view_cnt

Number of channel views by all subscribers.

If one device for the period played the channel stream 3 times for at least 60 seconds, the number of views will be 3, not 1

OSS/BSS-side Methods

The methods below can be optionally implemented on the OSS/BSS side:

Method

Purpose

activate_uid

Device activation

deactivate_uid

Device deactivation

deactivate_account

Service account removing

authorize_uid

Device authorization

purchase

Purchasing content

subscribe_request

Adding or refusing from a service

prepare_subscribe_request

Subscription preorder

confirm_subscribe_request

Confirmation of subscription preorder

cancel_subscribe_request

Cancel the subscription preorder in case of error

prepare_purchase

Content purchase preorder

confirm_purchase

Confirmation of content purchase preorder

cancel_purchase

Cancel the content purchase preorder in case of error

device_get_info

Password-free linking of devices to an account

In order to avoid delays in SmartTUBE Apps, the answer from OSS/BSS to these methods must be returned in 5 seconds. If the transaction is delayed, it is recommended to return immediately=true as the answer to the method subscribe_request (Adding or declining a service bundle ).

Devices and Accounts

activate_uid

The method informs about device activation, i.e. UID creation for the device at the moment of the device linking to the already existing service account by login and password. The feature is controlled by the parameters multiroom.oss.relink.activate.send, multiroom.oss.relink.likeSdp4Rebind.activate.send, serviceAccount.terminal.adminUI.oss.activateIfUpdateUuid.send, oss.methods.activate.send of the SmartTUBE SDP configuration file system.conf.

Method name

activate_uid

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type (see SmartTUBE object model)

serialNumber

String

no

Serial number

login

String

no

The login for device linking to the service account

terminalName

String

no

Connection name

Return values

code=”0″ is returned in case of success.

deactivate_uid 

The method informs about device unlinking from the service account. The feature is controlled by the parameters multiroom.oss.relink.deactivate.send, multiroom.oss.relink.likeSdp4Rebind.deactivate.send, serviceAccount.terminal.adminUI.oss.deactivateIfUpdateUuid.send, serviceAccount.terminal.adminUI.oss.deactivateIfClearUuid.send, serviceAccount.terminal.adminUI.oss.deactivateIfDeleteTerminal.send, serviceAccount.adminUI.oss.deactivateTerminalsIfDeleteAccount.send, oss.methods.account.deactivate.send of the SmartTUBE SDP configuration file system.conf.

Method name

deactivate_uid

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type (see SmartTUBE object model)

serialNumber

String

no

Serial number

login

String

no

The login device is linked by to the service account

terminalName

String

no

Connection name

Return value

code=”0″is returned in case of success.

deactivate_account 

The method informs about the service account removal. The feature is controlled by the serviceAccount.adminUI.oss.deactivateIfDeleteAccount.send parameter of the SmartTUBE SDP configuration file system.conf.

Method name

deactivate_account

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

Return value

code=”0″is returned in case of success.

authorize_uid 

The method informs about the authorization of the end-user device. The feature is controlled by the oss.methods.authorize.send parameter of the SmartTUBE SDP configuration file system.conf.

Method name

authorize_uid

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type (see SmartTUBE object model)

serialNumber

String

no

Device serial number

terminalName

String

no

Device name (connection name)

location

String

no

Name of the connection region

ip

String

no

IP address of the client device

appVersion

String

no

Version of the client application

isDemo

Boolean

no

Sign of a demo account

defaultGatewayMAC

String

no

Default gateway MAC address

ex_<param1>

ex_<paramN>

no

Additional parameters with the “ex_” prefix, received from client devices by the SmartTUBE SDP server (see the “Managing Additional Parameters” chapter below).

Return value

code=”0″ is returned in case of success.

In case of an error on the OSS side, the response is written to the log, a notification is sent to the email (if configured), and the error is ignored (so that authorization works normally and the SmartTUBE App can load).

Managing Additional Parameters

The list of additional parameters is managed in the SmartTUBE SDP configuration file system.conf:

oss = {

 methods.authorize.send = true # whether to send the ‘authorize_uid’ request to the OSS during client authorization (by default, false)

 methods.authorize.extraInfo.send = true # whether to send additional data (by default, true)

 methods.authorize.extraInfo.paramList = “defaultGatewayMAC” # list of additional parameters (their names without the ‘ex_’ prefix, separated by commas) to be sent with the ‘authorize_uid’ request

}

Services managing

The following methods are used to manage service subscriptions and content purchases. The logic and use of these methods differs for the “1-stage” and “2-stage” billing modes.

purchase 

The method purchases content. The feature is controlled by the oss.methods.purchase.send parameter of the SmartTUBE SDP configuration file system.conf.

Method name

purchase

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type (see SmartTUBE object model)

contentType

String

yes

Type of the content:

  • METACONTENTBUNDLE – season,
  • METAEPISODE – episode,
  • METAMOVIE – movie,
  • METASERIES – series

contentId

Integer

yes

ID of the purchased content

contentExtId

Integer

no

External ID of the purchased content (“ContentGroup uriId” field in the imported XML).

Note: The parameter is passed in escaped form to exclude invalid for HTTP characters.

contentName

String

no

Name of the content in the language that has the highest priority in Admin UI

price

Number

yes

Price for the purchased content

stopDate

MM/dd/yyyy HH:mm:ss

no

Expiration date of purchase validity

orderId

Integer

no

Preorder or order ID

Return value

code=”0″ is returned in case of success.

subscribe_request 

The method sends data on the service that is being added or removed. Based on the reply the decision is made on the SmartTUBE side whether to add a service or not. The feature is controlled by the oss.methods.subscribe.send parameter of the SmartTUBE SDP configuration file system.conf.

Method name

subscribe_request

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type (see SmartTUBE object model)

serviceEId

Number

yes

An external ID of the service

serviceName

String

no

Name of the service in the language that has the highest priority in Admin UI

state

String

yes

Action:

  • 1 – add the service
  • 0 – refuse from the service

price

Number

yes

Price for adding the service

stopDate

MM/dd/yyyy HH:mm:ss

no

Expiration date of the service validity

orderId

Integer

no

Preorder or order ID

uiField_xxx

String

no

Optional field passed from a user-filled form in the Сlient UI for subscribing to a specific service, where xxx — a field name. For example, uiField_email, uiField_promoCode

Return value

If executed successfully, the method returns the following data:

Field

Description

immediately

An attribute indicating the necessity to add or remove a service on the side of the SmartTUBE:

  • true – the service is added or removed at once,
  • false – the service will not be added or removed until the request subscribeService is received (see Adding a service). This value is recommended if, for example, generating a reply to this method call takes more than 5 seconds
Example:

{ “code”:0, “immediately”:true }

prepare_subscribe_request 

The method informs about the pre-ordering of a service subscription. The feature is controlled by the oss.methods.subscribe.send parameter of the SmartTUBE SDP configuration file system.conf.

Method name

prepare_subscribe_request

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type

serviceEId

Integer

yes

An external ID of the service

serviceName

String

no

Name of the service in the language that has the highest priority in Admin UI

state

String

yes

Action:

  • 1 – add the service
  • 0 – refuse from the service

price

Integer

yes

Price for adding the service

orderId

Integer

yes

Preorder ID

stopDate

MM/dd/yyyy

HH:mm:ss

no

Expiration date of the service validity

Return values

If executed successfully, the method returns the following data:

Field

Description

immediately

An attribute indicating the necessity to add or remove a service on the side of the SmartTUBE:

    <li style=”line-height: 1.0;margin
CONTENTS
Sign-in
Sign-in with your SmartLabs Support Portal account credentials to see non-public articles.