Internet of Things

Watson IoT Platform changes to application status API for applications

Share this post:

Application Status API changes

We are making some changes to application status messages published to the application monitor topic, effective on or after March 2, 2017.  We want to ensure that you are aware of these changes, in case you are depending on the existing behavior and need to make changes to your applications to ensure they continue working as expected.

Please note that these changes only affect application. Device status is not affected.

An application can monitor the status of other applications, by connecting to the Watson IoT Platform as an application and subscribing to the topic:

iot-2/app/appId/mon

Where appId is the id of the application you want to listen for updates.  You can use the wildcard + to listen for all applications.

Current behavior

If you subscribe to the application status API, then you’ll immediately receive Connect and Disconnect messages for currently and recently connected applications.

You’ll also get updates when applications connect and disconnect like these examples:

{ "Action": "Connect", "Time": "2017-01-20T14:27:13.113Z", "ClientAddr": "198.11.999.999", "ClientID": "a:myorgid:myserver", "Port": 8883, "Secure": true, "Protocol": "mqtt4", "User": "a-maqdpu-jkdhgkjha", "Durable": false }

 

{ "Action": "Disconnect", "Time": "2017-01-20T14:27:13.113Z", "ClientAddr": "108.168.999.999", "ClientID": "a:myorgid:myserver", "Port": 8883, "Secure": true, "Protocol": "mqtt4-ws", "User": "a-maqdpu-kjasdkf", "ConnectTime": "2017-01-20T14:27:00.096Z", "ReadBytes": 1331289, "ReadMsg": 1, "WriteBytes": 155084, "WriteMsg": 2 }

New behavior

With the new behavior, as before, when you subscribe you’ll immediately receive Connect messages for currently connected applications. However, Disconnect messages are only sent at the time of disconnection; they’re not available when making a new subscription. If an application that you want to monitor is not connected at the time of the subscription then no messages will be received for that application until it reconnects.

Note that Connect messages expire after 45 days, so you won’t immediately receive Connect messages on a new subscription for applications that have been connected for longer than 45 days.

More Internet of Things stories
May 7, 2019

We’ve Moved! The IBM Cloud Blog Has a New URL

In an effort better integrate the IBM Cloud Blog with the IBM Cloud web experience, we have migrated the blog to a new URL: www.ibm.com/cloud/blog.

Continue reading

April 19, 2019

Reach Out to the IBM Cloud Development Teams on Slack

Get the help you need fast—directly from the IBM Cloud Development Teams and other users on Slack.

Continue reading

April 11, 2019

Permanent Redirect to cloud.ibm.com from console.bluemix.net

Starting on April 27, 2019, we will be turning on permanent redirects from bluemix.net to cloud.ibm.com. All of the same functionality that existed on bluemix.net is still available in cloud.ibm.com.

Continue reading