subscriptions

Data subscriptions are managed as a set of records, where each record describes a specific element to be delivered on a periodic basis. If desired, you can apply multiple subscriptions to a single URI, though this is of limited value. The subscriptions URI operates like a data store. Initially, the store is empty. The existence of a record in the data store corresponds with a subscription registered with the system. You can query, add, change, and remove records at will. The records have names that are arbitrary to the system, supplied via the request URI.

URI path

subscriptions

Supported request methods

GET

Queries the system for the list of subscription records. The record returned is a list of URIs corresponding to the “children” of subscriptions in the web services data tree.

Supported content types:

HTML

The result URIs are turned into URLs relative to the device, and returned in an HTML list.

XML

The result URIs are each wrapped in element tags, and returned within a subscriptions block. For example:

<subscriptions>
          <element>subscriptions/short_name_1</element>
          <element>subscriptions/short_name_2</element>
          :
          <element>subscriptions/short_name_N</element>
</subscriptions>

JSON

The result URI strings are collected in an array assigned to a subscriptions field. For example:

{ “subscriptions” : [  “subscriptions/short_name_1”,
                       “subscriptions/short_name_2”, ...
                       “subscriptions/short_name_N” ] }

 

© 2019 Digi International Inc. All rights reserved.
subscriptions updated on 17 Oct 2017 02:48 PM