Retreiving json data from remote server
Retreiving json data from remote server
adobewebs
Posts: 2Questions: 0Answers: 0
Hi,
I am trying to use DataTables to create a web page that can insert the following data below:
The call is made via https://sendgrid.com/api/stats.get.json?api_user=youremail@domain.com&api_key=secureSecret&days=30
Below is the a small portion of the data returned. How would you code this? Also is there a way to make sure the raw data is being returned as in some dump command before you actually code the table structure?
[{"category": "sample.com", "delivered": 1, "unsubscribes": 0, "invalid_email": 0, "bounces": 0, "repeat_unsubscribes": 0, "unique_clicks": 0, "blocked": 0, "spam_drop": 0, "repeat_bounces": 0, "repeat_spamreports": 0, "date": "2012-05-06", "requests": 1, "spamreports": 0, "clicks": 0, "opens": 0, "unique_opens": 0},{"category": "sample.com", "delivered": 4, "unsubscribes": 0, "invalid_email": 0, "bounces": 0, "repeat_unsubscribes": 0, "unique_clicks": 0, "blocked": 0, "spam_drop": 0, "repeat_bounces": 0, "repeat_spamreports": 0, "date": "2012-05-07", "requests": 4, "spamreports": 0, "clicks": 0, "opens": 0, "unique_opens": 0},{"category": "sample.com", "delivered": 1, "unsubscribes": 0, "invalid_email": 0, "bounces": 0, "repeat_unsubscribes": 0, "unique_clicks": 1, "blocked": 0, "spam_drop": 0, "repeat_bounces": 0, "repeat_spamreports": 0, "date": "2012-05-08", "requests": 1, "spamreports": 0, "clicks": 1, "opens": 47, "unique_opens": 0},
Thanks,
Jim
I am trying to use DataTables to create a web page that can insert the following data below:
The call is made via https://sendgrid.com/api/stats.get.json?api_user=youremail@domain.com&api_key=secureSecret&days=30
Below is the a small portion of the data returned. How would you code this? Also is there a way to make sure the raw data is being returned as in some dump command before you actually code the table structure?
[{"category": "sample.com", "delivered": 1, "unsubscribes": 0, "invalid_email": 0, "bounces": 0, "repeat_unsubscribes": 0, "unique_clicks": 0, "blocked": 0, "spam_drop": 0, "repeat_bounces": 0, "repeat_spamreports": 0, "date": "2012-05-06", "requests": 1, "spamreports": 0, "clicks": 0, "opens": 0, "unique_opens": 0},{"category": "sample.com", "delivered": 4, "unsubscribes": 0, "invalid_email": 0, "bounces": 0, "repeat_unsubscribes": 0, "unique_clicks": 0, "blocked": 0, "spam_drop": 0, "repeat_bounces": 0, "repeat_spamreports": 0, "date": "2012-05-07", "requests": 4, "spamreports": 0, "clicks": 0, "opens": 0, "unique_opens": 0},{"category": "sample.com", "delivered": 1, "unsubscribes": 0, "invalid_email": 0, "bounces": 0, "repeat_unsubscribes": 0, "unique_clicks": 1, "blocked": 0, "spam_drop": 0, "repeat_bounces": 0, "repeat_spamreports": 0, "date": "2012-05-08", "requests": 1, "spamreports": 0, "clicks": 1, "opens": 47, "unique_opens": 0},
Thanks,
Jim
This discussion has been closed.
Replies
Allan
I guess the question I am asking is can your software do this rather than me building my own solution using javascript or jquery? If yours can please show me a link of an example you have already built.
Thanks,
Jim
P.S. I have the whole thing built using PHP but it is not AJAX so I was just trying to see how your software could do the same thing.
Allan