====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|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| |**Method**|GET or POST| ^Parameter^Meaning^ |codes|A comma-delimited list of ARDI [[data_points|data points]]| |format|The 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)== 1TKFCSWO ==Response (JSON)== { "id": "LVIDKWZV", "items": [ { "code": "20:-1:23", "value" : "0" } ] }