Fleet Freedom
Main Site
Overview
WebSocket
JavaScript
Behaviours
Provisioning
Pictures
Reports
Events
Return to site

Partial subscription successes

New Feature
Wednesday, June 1, 2016
By Alex Lein

Partial success

Previously, when sending a subscribe or unsubscribe message, the subscriptions would not be added if access was denied to any of the subscription types. Starting today, the subscription commands will allow partial success subscriptions to be added and removed, and the response messages will contain the list of sucessful and failed subscription types.

New properties in the subscribeResponse message

There are three new arrays in the response message after you subscribe; merged, denied, and invalid. Please note that the errorCode returned by this method is always "success" if one or more subscriptions are added.  So if you request a subscription for 10 SubscriptionTypes, but are denied permission for 9 of them, you will still receive a "successful" response.

merged
This is an array of SubscriptionTypes which were either added, or had been previously already to your subscriptions list.
denied
This array contains the SubscriptionTypes to which you do not have permission.
invalid
This array contains any other value sent by the user which is not a valid SubscriptionType value.

New properties in the unsubscribeResponse message

There are three new arrays in the response message after you subscribe; removed and invalid. Please note that the errorCode returned by this method is always "success" if one or more subscriptions are valid. So if you request a subscription for 10 types, but 9 of them are not valid SubscriptionTypes, you will still receive a "successful" response.

removed
This is an array of SubscriptionTypes which were either removed, or had been previously removed from your subscriptions list. Note that there is no permission checking for removing a subscription, even subscriptions to which you would be denied access are sucessfully removed.
invalid
This array contains any other value sent by the user which is not a valid SubscriptionType value.

  • Back to Websocket Articles
  • Full Websocket Reference
Trak iT® Wireless and Fleet Freedom® are Trademarks of Trak iT® Wireless Inc.
All content contained within this site is the property of Trak iT® Wireless unless otherwise stated.