title: Confluence: How to pass posting date while creating a blogpost?
body: <p>I am trying to migrate Wordpress blog post to Confluence blog space. I am using Confluence api to post the the blog. I also need to set the <strong>posting date</strong> somewhere in past(original posting date on Wordpress). Confluence Web-UI provides an option to customize the posting date, but I didn't see anything in the API documentation which can allow me to pass the posting date. Here is my python script which is able to create the blog post but without customizing the "posting date"</p>
  
  <pre><code>import requests
  import json
  
  
  def main():
      auth = open('/tmp/confluence', 'r').readline().strip()
      username = 'rakesh'
      base_url = "https://&lt;HOSTNAME&gt;/rest/api/content/"
      space_key = "LOC"
  
      html_body = """&lt;h1&gt;This is h1 header&lt;/h1&gt;
                     &lt;p&gt; this is paragraph&lt;/p&gt;
                     &lt;table&gt; &lt;tr&gt; &lt;td&gt; data block1&lt;/td&gt; &lt;td&gt; data block2&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;"""
      data = {'type': 'blogpost',
              'title': 'Blog test4',
              'space': {'key': space_key},
              'body': {'storage': {'value': html_body,
                                   'representation': 'storage'}}}
  
      response = requests.post(base_url,
                               auth=(username, auth),
                               headers={'Content-type': 'application/json'},
                               data=json.dumps(data))
  
      print response.status_code, response.text
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>Here is the request json: </p>
  
  <pre><code>{'type': 'blogpost',
                  'title': 'Blog test4',
                  'space': {'key': space_key},
                  'body': {'storage': {'value': '&lt;h1&gt;This is h1 header&lt;/h1&gt;&lt;p&gt; this is paragraph&lt;/p&gt;',
                                       'representation': 'storage'}
                          }
   }
  </code></pre>