Skip to main content
Skip table of contents

Getting all topics

Request

To get all the available topics, send a GET request to:

http://<host>:<port>/mib/v1/topics

Headers

  • Content-Type: application/json

Optional parameters

  • limit – the number of records to return
  • page – the page number to return (cannot be used without limit)
    For example:
    • ?limit=10 returns the first 10 records.
    • ?limit=10&page=2 returns the second 10 records.
  • offset – the number of records to skip
  • filter – filters the output. A filter consists of one or more key/value pairs.
    For example,
    • ?filter={"active":true}
    • ?filter={"active":true, "managedBy":"SNS"}
  • sort – sorts the output. The sort expression consists of one or more key/value pairs, where the key is the name of the field to sort on, and the value is the order: 1 for ascending, -1 for descending.
    For example:
    • ?sort="topicName,1"
    • ?sort="managedBy,1,topicName,-1"
  • fields – the fields to include in the output.
    For example:
    • ?fields="topicName,description"

Response

A successful request returns an HTTP 200 status.

An unsuccessful request returns an HTTP 404 status.

A successful request generates a response that looks like this:

CODE
{
    "totalRecords": 2,
    "topics": [
        {
            "topicName": "GlobalTopicForAllDevices",
            "description": "GlobalTopicForAllDevices",
            "topicARN": "arn:aws:sns:eu-west-1:938499756352:GlobalTopicForAllDevices",
            "active": true,
            "managedBy": "SNS",
            "devices": [
                {
                    "deviceId": "5ca5e0ced2f2ff000118e9db",
                    "deviceOS": "ANDROID7_TABLET",
                    "subscriptionArn": "arn:aws:sns:eu-west-1:938499756352:GlobalTopicForAllDevices:43b0ea43-7e9f-437a-a3a5-2aeffdef0f22",
                    "subscriptionStatus": true
                },
                {
                    "deviceId": "5ca6dd9fc126020001b5ae74",
                    "deviceOS": "ANDROID7_TABLET",
                    "subscriptionArn": "arn:aws:sns:eu-west-1:938499756352:GlobalTopicForAllDevices:cb5e1f43-a7ef-4a98-9069-1024c5b7ada0",
                    "subscriptionStatus": true
                }
            ]   
        },
        {
            "topicName": "OSNOTIFICATION",
            "description": "IP Message Topic Testing",
            "topicARN": "arn:aws:sns:eu-west-1:938499756352:OSNOTIFICATION",
            "active": true,
            "managedBy": "FCM",
            "modifiedDate": "string",
            "modifiedBy": "string",
            "devices": [
                {
                    "deviceId": "5cd1195804d13100017bb350",
                    "deviceOS": "string",
                    "subscriptionArn": "arn:aws:sns:eu-west-1:938499756352:OSNOTIFICATION:50631279-3e41-4621-bdc7-b9b4f394a229",
                    "subscriptionStatus": true
                },
                {
                    "deviceId": "5ccffe05d0ea340001c48d90",
                    "deviceOS": "string",
                    "subscriptionArn": "arn:aws:sns:eu-west-1:938499756352:OSNOTIFICATION:b00aa62d-c2b7-45c0-9cf4-d06e423ad760",
                    "subscriptionStatus": true
                }
            ]
        }
    ]
}

See also

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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.