Thursday, April 3, 2014

Push Data API

Cloud9 Charts provides two modes of working with data: ‘Pull’, which enables our extractors to work with existing data from datastores, and, ‘Push’ which can be used to send real-time data using our API.

In this post, we’ll take a hands-on look at our Push API:
           
      1.  Send some data:

    Open a terminal and paste the following:
         
    curl  -i -X POST -d '{"entity": "Push Simple", "data":[{"Some Data":20,"Some Other Data":40}]}' https://api.cloud9charts.com/live/6xaFYvBLSA8ie
          
     Modify the data section as you see fit. This submits data into Cloud9 Charts using curl, but could just as well be implemented directly into code.

       2.     See the live results here:



This chart will be updated automatically as you send more data to it.

Another example, which uses the Push API for real-time tracking of a messaging campaign can be found here: https://www.cloud9charts.com/demoPushAPI