title: Get report data to display as data table in HTML through REST API
body: <p>I have very little knowledge of REST API and Javascript. However, I now need to work on a REST API of a third party company which is sending emails for my company and to get the report data through the REST API.</p>
  
  <p>The data can get through a GET method with an URL with TOKEN: <a href="https://www.probancemail.com/rest/stats/?&amp;token=" rel="nofollow noreferrer">https://www.probancemail.com/rest/stats/?&amp;token=</a>{platformtoken}</p>
  
  <p>Sample of JSON array as below:</p>
  
  <pre><code>{
  "bounce":2,
  "campaign_external_id":"RT1-",
  "campaign_name":"RT1-Welcome1",
  "click":19,
  "delivered":333,
  "open":69,
  "sending_external_id":"RT-PWDE1-20170617",
  "sendingtime_ts":1497650423000,
  "sent":335,
  "spam":0,
  "template_external_id":"0193",
  "unsub":6
  }
  </code></pre>
  
  <p>What I need as a first step is to retrieve the JSON data from the third-party based on the URL with token, and parse the JSON data through Jquery and display it on the webpage as table(HTML). 
  To achieve that, I have found the Jquery codes below:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
  var url = 'https://www.probancemail.com/rest/stats/?&amp;token={platformtoken}'
  
  $(document).ready(function () {
  $.getJSON(url,
  function (json) {
  var tr=[];
  for (var i = 0; i &lt; json.length; i++) {
      tr.push('&lt;tr&gt;');
      tr.push("&lt;td&gt;" + json[i].campaign_name + "&lt;/td&gt;");
      tr.push("&lt;td&gt;" + json[i].campaign_external_id + "&lt;/td&gt;");
      tr.push("&lt;td&gt;" + json[i].sending_external_id + "&lt;/td&gt;");
      tr.push("&lt;td&gt;" + json[i].sent + "&lt;/td&gt;");
      tr.push("&lt;td&gt;" + json[i].delivered + "&lt;/td&gt;");
      tr.push("&lt;td&gt;" + json[i].open + "&lt;/td&gt;");
      tr.push("&lt;td&gt;" + json[i].click + "&lt;/td&gt;");
      tr.push("&lt;td&gt;" + json[i].spam + "&lt;/td&gt;");
      tr.push("&lt;td&gt;" + json[i].unsub + "&lt;/td&gt;");
      tr.push('&lt;/tr&gt;');
  }
  $('table').append($(tr.join('')));
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;table&gt;&lt;/table&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>However, this code doesn't work, I think it is because of the token, the GetJSON function doesn't get the JSON. However, I'm very new to this, so I don't have any insights.</p>
  
  <p>Will you please take a look and help me figure out the problem? 
  Any advice is welcomed! >> Maybe I shouldn't use Jquery even? </p>
  
  <p>Thanks in advance!</p>