Applications API (ENG)

Applications API (ENG)

INTRODUCTION

This API is used to manage Applications. You can create new Applications, edit existing Applications and upload new images for existing Applications.
Info
Currently only creation/editing of HbbTV Coupon Applications is supported!
Fetching Application configuration supports also SmartTV OTT -application

API PATH

/api/applications

API CALLS

Fetch Application Configuration

Fetches application's configuration.

REQUEST

Method: GET
Parameters:
Name
Value
Requirement
Info
action
getAppConfig
Mandatory

organizationId
Number
Mandatory
Icareus Suite Organization Identifier.
appId
Number
Mandatory
Icareus Suite Application Identifier

Success response:
  1. {
        "status": "ok",
        "data": {
            "apiServerUrl": "http://dvcf59enpgt5y.cloudfront.net",
            "pages": [
                {
                    "id": "aa",
                    "rails": [
                        {
                            "id": 1772105372354,
                            "itemsVisible": 5,
                            "aspectRatio": "1/1",
                            "type": "folder",
                            "folderId": "12345"
                        },
                        {
                            "id": 1772105383873,
                            "dynamicType": "latestChange",
                            "itemsVisible": 2,
                            "aspectRatio": "16/9",
                            "type": "dynamic"
                        }
                    ],
                    "routerLink": "/",
                    "name": "aa",
                    "iconUrl": "",
                    "localizationKey": "aa"
                },
                {
                    "id": "bb",
                    "routerLink": "/bb",
                    "name": "bb",
                    "iconUrl": "",
                    "localizationKey": "bb"
                }
            ],
            "branding": {
                "brandColor3": "",
                "brandColor2": "",
                "brandColor1": "",
                "brandColor6": "",
                "brandColor5": "",
                "brandColor4": ""
            },
            "applicationTypeId": 40
        }
    }

Application configuration is inside 'data' keys value. Value of the configuration changes based on application itself. This example is from early version of SmartTV OTT application.

Add Application

Creates a new Application. This call takes meta-data only. Once an application has been created, images can be uploaded using the addApplicationImages action.

REQUEST

Method: POST
Parameters:
Name
Value
Requirement
Info
action
addApplication
Mandatory

organizationId
Number
Mandatory
Icareus Suite Organization Identifier.
token
String
Mandatory
Secret key of the Organization.
userId
Number
Mandatory
Icareus Suite User Identifier. (Must be a Affiliate Administrator or Ismaccount Administrator)
type
String
Mandatory
Application Type. Currently only accepted value is "HbbTV Coupon"
applicationData
String
Optional
Encoded JSON Object containing the Application meta-data.

Info
NOTE: The JSON Object containing the Application meta-data can either be provided through the 'applicationData' -parameter as an encoded string. Or the JSON Object can be provided in the request body.

HbbTV Coupon Application meta-data JSON Object

Key
Value
Requirement
Info
Default
name
String
Mandatory
Name of the application

mode
Number
Optional
Either: 0 (Horizontal) or 1 (Vertical).
0
backgroundColor
String
Optional
Background Color, HEX i.e. "#AAAAAA"
""
width
Number
Optional
Application width.
350
height
Number
Optional
Application height.
650
hideButtons
Boolean
Optional
Whether or not to display buttons in the Application.
false
infoText1
String
Optional
Text for Info Text 1.
""
infoText2
String
Optional
Text for Info Text 2.
""
infoText3
String
Optional
Text for Info Text 3.
""
actionText
String
Optional
Action Text
""
removeText
String
Optional

""
eraseText
String
Optional

""
moreInfoText
String
Optional

""
successInfo
String
Optional

""
failureInfo
String
Optional

""
closeText
String
Optional

""
addPhoneText
String
Optional

""
urlMessage
String
Optional

""
urlGooglePlay
String
Optional

""
urlAppStore
String
Optional

""
disablePhoneNumberInput
Boolean
Optional

false
sendSMS
Boolean
Optional

false
storeSMS
Boolean
Optional

false
notificationURL
String
Optional

""
senderName
String
Optional

""
senderAddress
String
Optional

""
successAddress
String
Optional

""
successSubject
String
Optional

""
successBody
String
Optional

""
failureAddress
String
Optional

""
failureSubject
String
Optional

""
failureBody
String
Optional

""

Sample JSON Object for creating an HbbTV Coupon Application:
  1. {
        "name": "Coupon API config test",
        "mode": 0,
        "width": 300,
        "height": 600,
        "backgroundColor": "#F3F3F3",
        "hideButtons": false,
        "infoText1": "Info Text 1",
        "infoText2": "Info Text 2",
        "infoText3": "Info Text 3",
        "actionText": "Action Text",
        "removeText": "Remove Text",
        "eraseText": "Erase text",
        "moreInfoText": "More Info",
        "successInfo": "Success info",
        "failureInfo": "Failure info",
        "closeText": "Close Text",
        "addPhoneText": "Add phone text",
        "urlMessage": "URL Message",
        "disablePhoneNumberInput": false,
        "sendSMS": false,
        "storeSMS": false
    }
Success response:
  1. {
        "status""ok",
        "name""Coupon API config test",
        "applicationId"913126,
        "applicationConfig": {
            "apiServerUrl""https://suiterc.icareus.com/",
            "disablePhoneNumberInput"false,
            "senderAddress""",
            "hideButtons"false,
            "backgroundColor""#F3F3F3",
            "urlMessage""URL Message",
            "sendSMS"false,
            "applicationId"913126,
            "organizationId"13509,
            "closeText""Close Text",
            "imageUrlPrefix""https://suiterc.icareus.com/image/image_gallery?img_id=",
            "failureInfo""Failure info",
            "mode"0,
            "height"600,
            "urlAppStore""",
            "removeText""Remove Text",
            "storeSMS"false,
            "notificationURL""",
            "path""/application/hbbtv_coupon",
            "successAddress""",
            "eraseText""Erase text",
            "infoText1""Info Text 1",
            "infoText2""Info Text 2",
            "failureBody""",
            "width"300,
            "actionText""Action Text",
            "successBody""",
            "infoText3""Info Text 3",
            "failureAddress""",
            "addPhoneText""Add phone text",
            "groupId"13510,
            "successSubject""",
            "failureSubject""",
            "senderName""",
            "successInfo""Success info",
            "moreInfoText""More Info",
            "server""https://suiterc.icareus.com/",
            "companyId"10154,
            "group""/web/tvanywhere-demo",
            "urlGooglePlay"""
        }
    }
Error response is a JSON Object with "status": "error"

Update Application

Updates an existing Application. This call takes meta-data only.

REQUEST

Method: POST
Parameters:
Name
Value
Requirement
Info
action
updateApplication
Mandatory

organizationId
Number
Mandatory
Icareus Suite Organization Identifier
token
String
Mandatory
Secret key of the Organization
userId
Number
Mandatory
Icareus Suite User Identifier. (Must be a Affiliate Administrator or Ismaccount Administrator)
type
String
Mandatory
Application Type. Currently only accepted value is "HbbTV Coupon"
applicationId
Number
Mandatory
Icareus Suite Application Identifier
applicationData
String
Optional
Encoded JSON Object containing the Application meta-data.
NOTE: The JSON Object containing the Application meta-data can either be provided through the 'applicationData' -parameter as an encoded string. Or the JSON Object can be provided in the request body.

HbbTV Coupon Application

The JSON Object containing the Application meta-data can contain only the values you wish to update. Values from the existing configuration will be used for fields not provided. Otherwise the JSON Object should be similar to 'HbbTV Coupon Application meta-data JSON Object' defined in the Add Application section. However all of the fields are optional when updating an existing Coupon Application.
Idea
In order to remove images from the HbbTV Coupon Application, provide "backgroundImageId" and/or "infoBackgroundImageId" with value(s) 0 to remove the respective image.


Add/Update Application Images

Upload images to an application. Works for both adding and updating images.

REQUEST

Method: POST
Parameters:
Name
Value
Requirement
Info
action
addApplicationImages
Mandatory

organizationId
Number
Mandatory
Icareus Suite Organization Identifier
token
String
Mandatory
Secret key of the Organization
userId
Number
Mandatory
Icareus Suite User Identifier. (Must be a Affiliate Administrator or Ismaccount Administrator)
type
String
Mandatory
Application Type. Currently only accepted value is "HbbTV Coupon"
applicationId
Number
Mandatory
Icareus Suite Application Identifier

HbbTV Coupon Application image parameters

In addition to the parameters listed above, to upload images to an HbbTV Coupon Application, at least one of the following parameters is expected:

Name
Value
Requirement
Info
backgroundImage
File
Optional
Background Image.
infoBackgroundImage
File
Optional
Info Background Image.

Sample success response:

  1. {
        "status""ok",
        "applicationId"913119,
        "applicationConfig": {
            "apiServerUrl""https://suiterc.icareus.com/",
            "groupId"13510,
            "infoBackgroundImageId"913134,
            "backgroundImageId"913133,
            "path""/application/hbbtv_coupon",
            "applicationId"913119,
            "server""https://suiterc.icareus.com/",
            "companyId"10154,
            "organizationId"13509,
            "group""/web/tvanywhere-demo",
            "imageUrlPrefix""https://suiterc.icareus.com/image/image_gallery?img_id="
        }
    }
Error response is a JSON Object with "status": "error"

Remove Application

Remove a specified Application.

REQUEST

Method: POST
Parameters:
Name
Value
Requirement
Info
action
removeApplication
Mandatory

organizationId
Number
Mandatory
Icareus Suite Organization Identifier
token
String
Mandatory
Secret key of the Organization
userId
Number
Mandatory
Icareus Suite User Identifier. (Must be a Affiliate Administrator or Ismaccount Administrator)
type
String
Mandatory
Application Type. Currently only accepted value is "HbbTV Coupon"
applicationId
Number
Mandatory
Icareus Suite Application Identifier

Sample success response:

  1. {
        "message""Application was removed.",
        "status""ok"
    }

Error response is a JSON Object with "status": "error"