title: Query datatable from rest api without pre-defining the table in html
body: <p>I would like to query a JSON via post request from a rest API:</p>
  
  <pre><code>http://localhost/post1  
  param1='1'
  </code></pre>
  
  <p>that returns the following:</p>
  
  <pre><code>{
    "json_table": [
      {
        "date": 123,
        "test": "hello2"
      },
      {
        "date": 19,
        "test": "hello"
  
      },
  }
  </code></pre>
  
  <p>and it should then be automatcially populated into a jquery datatable, a little bit how it is <a href="https://datatables.net/manual/ajax" rel="nofollow noreferrer">described here</a>:</p>
  
  <pre><code>$('#myTable').DataTable( {
      ajax: '/api/myData'
  } );
  </code></pre>
  
  <p>What I don't understand is:</p>
  
  <ul>
  <li>How can I tell it to make a post request with a parameter</li>
  <li>How can I create the table without having to predefine it in HTML, so that it's completely agnostic what is returned from the JSON and just displays the table accordingly, whatever is within the 'json_table' record (which is generated from a pandas data frame df.to_json(orient='records')?</li>
  <li>How can I make it refresh (query again) every 15 seconds and update the table?</li>
  </ul>
  
  <p>Any suggestions are appreciated.</p>