OpenTV ENTera & OpenTV Platform Documentation
25.52_Q4 25.26_Q2 25.12_Q1 24.50_Q4 24.38_Q3 24.26_Q2 23.50_Q4 23.24_Q2 23.12_Q1 22.50_Q4 22.38_Q3 22.24_Q2
25.52_Q4 25.26_Q2 25.12_Q1 24.50_Q4 24.38_Q3 24.26_Q2 23.50_Q4 23.24_Q2 23.12_Q1 22.50_Q4 22.38_Q3 22.24_Q2

Sending a notification to all devices

Request

To send a notification to all the devices, send a POST request to:

http://<host>:<port>/messaging/v1/topics/GlobalTopicForAllDevices/inbox

Headers

  • Content-Type: application/json

Mandatory fields

  • topic_name (in URL) – this is the default topic, GlobalTopicForAllDevices, to which all devices are subscribed automatically.

  • envelope object containing at least:

    • from – who the notification is from

  • message – the message – base64-encoded opaque data or UTF-8-encoded data with no CR/LFs
    Note that this is client-specific. For ION clients, the message must be in this format (but with CR/LFs removed):

    {
        "data" :
            "{
                "title":"Titles promotions message",
                "message":"Content promotions messages"
            }"
            "notification" :
            "{
                  "title":"Titles promotions message",
                  "message":"Content promotions messages"
            }"
    }
    


    The contents of data and notification must be the same.

Example

A request with this payload sends a message to all devices:

{
    "envelope": {
        "event": "subscription-changed",
        "id": "e7ebbd43-62d3-4962-b71d-0e9f98555d9b",
        "app_id": 1234,
        "from": "account-management-service",
        "expiration": 60000
    },
    "message": "eyAiZnJvbSIgOiAicmVtb3RlcHZyIiwgInRvIiA6ICIxMjM0NTYiLCAidGltZXN0YW1wIiA6ICIxNDgzNzY4OTg3IiwgInByaW9yaXR5IiA6ICIxMCIsICJyZXBseS10byIgOiAiaHR0cHM6Ly9hZGRyZXNzLnRvLnJlcGx5IG9yIG5vZGVAbWFjaGluZTpxdWV1ZSIsICJkYXRhIiA6ICJwcml2YXRlIGRhdGEgdXNlZCBieSB0aGUgZGV2aWNlIHJlbW90ZSBib29raW5nIGFwcGxpY2F0aW9uIn0="
}

The device must already be registered with DMM.

Response

The request returns an HTTP 200 status if the message was sent successfully.

An unsuccessful request returns an HTTP 404 status.

See also

For full details of this API, see the DMM API documentation.