Subscribe (Live Data API Function)

This function sets up a 'subscription' to the Live Data API.

A subscription allows you to poll for updated data with the update function. This will only return the information that has changed since your last call to either subscribe or update.

As part of the subscription, all of the current values for the points requested are sent.

Details

URL/subscribe
MethodGET or POST
ParameterMeaning
codesA comma-delimited list of ARDI data points
formatThe format of the returned value. This can be xml or json

Response

The response is an XML (default) or JSON encoded collection of points, plus an 'id' column that includes the unique code for your subscription.

This code is used in calls to update.

Example

URL: /subscribe?codes=20:-1:23

Response (XML)
<update>
  <id>1TKFCSWO</id>
  <points>
    <point code="20:-1:23" value="0"/>
  </points>
</update>
Response (JSON)
{
   "id": "LVIDKWZV",
   "items": [
      { "code": "20:-1:23",
        "value" : "0" }  
    ] 
 }