Getting all the topics that a device is subscribed to
Request
To get a list of the topics that a device is subscribed to, send a GET request to:
http://<host>:<port>/mib/v1/devices/{device_id}
Headers
Content-Type: application/json
Mandatory fields
device_id
– the ID of the device (as returned by ADM)
Example
This request gets details of the specified device, including the topics that it is subscribed to:
http://<host>:<port>/mib/v1/devices/5badca3e4e120d00011353b8
Response
A successful request returns an HTTP 200 status.
An unsuccessful request returns an HTTP 404 status if the device is not recognised.
A successful request generates a response that looks like this:
{
"deviceId": "5ce4f2a2c7d53e000184f21a",
"deviceOS": "iOS",
"userId": "EUT24",
"active": true,
"queueRegistrations": [
{
"enabled": true,
"lastRegistrationDate": "2019-05-22T06:56:34.772Z",
"queueApplicationName": "solutiontesting-12c6c",
"queueApplicationARN": "arn:aws:sns:eu-west-1:938499756352:app/GCM/solutiontesting-12c6c",
"queueRegistrationId": "eaHdaZkLYS0:APA91bH6QvUHLFtcqYaPWcOLnJxF2GiZQmZ58wHar8Wr6cnVl1PDss-vMSsqV5-RwSIGtzkAcE0tM4tjcRDeS-i259_rfZMQa0kISaHfNHpG48QP8PCLS2Q4A5-z0ecc3PvyIIrqP6AD",
"deviceQueueEndpointARN": "arn:aws:sns:eu-west-1:938499756352:endpoint/GCM/solutiontesting-12c6c/f8b2ff88-cf5d-3506-ac35-cd79549519fe"
}
],
"topics": [
"GlobalTopicForAllDevices",
"New-Videos",
"Premium-Customers"
]
}
See also
For full details of this API, see the DMM API documentation.