OpenTV ENTera & OpenTV Platform Documentation
26.26_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
26.26_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

Subscribing and unsubscribing devices to a topic

Request

To subscribe one or more devices to a topic, send a PUT request to:

Bash
http://<host>:<port>/mib/v2/topics/{topicId}/manageDevices

Client applications running on WebOS and Tizen Smart TVs must also subscribe to the topic in AWS IoT Core. See the AWS IoT Core documentation for details.

Headers

  • Content-Type: application/json

Mandatory fields

  • topicId (in URL) – the ID of the topic

Other fields

  • removeAllDevices – if true, all existing devices are removed from the topic.

  • addDevices – a list of devices to be added. This contains a list of device IDs.

  • removeDevices – a list of devices to be removed. This contains a list of device IDs.

If you specify both removeAllDevices and addDevices, all existing devices will be unsubscribed from the topic and the devices specified in the addDevices block will be subscribed to it.

Example

A request with this payload subscribes the two specified devices to the topic specified in the URL and unsubscribes the one specified device from it:

JSON
{
  "addDevices": [
    {
      "deviceId": "59bb5fbbc6f9d5000801ae28"
    },
    {
      "deviceId": "59bb5fbbc6f9d5000801ae29"
    }
  ],
  "removeDevices": [
    {
      "deviceId": "59bb5fbbc6f9d5000801ae30"
    }
  ]
}

The devices must already be registered with DMM.

Response

A successful request returns an HTTP 200 status.

An unsuccessful request returns an HTTP 400 status if the topic cannot be found in DMM.

An unsuccessful request returns an HTTP 404 status is the topic is not provisioned in DMM.

See also

For full details of this API, see the Device Messaging Manager (DMM) API documentation v2.