title: Confluence WIki Page Not Updating Through API
body: <p>I trying to use the Rest API to update our wiki page but nothing seems to be happening even though I am receiving 200 codes.</p>
  
  <p>I've tried to accomplish this through both postman as well as Python, and I am receiving the same server response in both cases, but to no avail.
  Here is my Python code -</p>
  
  <pre><code>curl = 'curl -u user:pass -X POST -H \'Content-Type: application/json\' ' \
             '-d \'{0}\' https://wiki.myCompany.com:8444/confluence/rest/api/content/'\
              .format(json.dumps(new))
      output = subprocess.check_output(['bash', '-c', curl])
      print(output`)
  </code></pre>
  
  <p>I've tried using both POST and PUT</p>
  
  <p>Here is the response -</p>
  
  <pre><code>PUT https://wiki.myCompany.com:8444/confluence/rest/api/content/
   200 OK       26.47 kB       655 ms
  View Request View Response
  HEADERS
  Content-Encoding: gzip
  Content-Length: 6578
  Content-Security-Policy: frame-ancestors 'self'
  Content-Type: text/html;charset=UTF-8
  Date: Wed, 15 Feb 2017 20:24:46 GMT
  Server: Apache-Coyote/1.1
  Set-Cookie: JSESSIONID=DBCAA4C03DC489A720B8A59D755BD22A; Path=/; Secure; HttpOnly
  Vary: User-Agent
  X-Accel-Buffering: no
  X-Asen: SEN-3386858
  X-Ausername: username
  X-Confluence-Request-Time: 1487190286413
  X-Content-Type-Options: nosniff
  X-Frame-Options: SAMEORIGIN
  X-Seraph-Loginreason: OK
  X-Xss-Protection: 1; mode=block
  
  BODYview raw
  
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Dashboard - myCompany Wiki&lt;/title&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=EDGE,chrome=IE7"&gt;
        &lt;meta charset="UTF-8"&gt;
          &lt;meta id="confluence-context-path" name="confluence-context-path" content=""&gt;
            &lt;meta id="confluence-base-url" name="confluence-base-url" content="https://wiki.myCompany.com:8444"&gt;
              &lt;meta id="atlassian-token" name="atlassian-token" content="abcd227f923fa6d5cce068a25de3bb4a3a3ceca4"&gt;
                &lt;script type="text/javascript"&gt;
          var contextPath = '';
  &lt;/script&gt;
  
  ..... A lot more html .... but nothing relating to Body or Body.Storage...
  </code></pre>
  
  <p>My JSON is formed correctly and contains the page ID - Here is the start of it....</p>
  
  <pre><code>{"id":"28870287","type":"page","status":"current","title":"Automated QA Results - Android","body":{"storage":{"value":"&lt;p&gt;These are the results of every git merge...}}
  </code></pre>
  
  <p>Does anyone have any idea why nothing is happening?</p>
  
  <p>I have tried this through the requests library before - I get the same 200 response code. I was just seeing if you guys notice something wrong with calls themselves rather than the implementation</p>
  
  <pre><code>   # output = requests.post('https://{0}/confluence/rest/api/content'.format(jirasite),
  #                     data=(json.dumps(new)),
  #                     auth=('user', 'pass'),
  #                     headers=({'Content-Type': 'application/json'}))
  </code></pre>
  
  <p>**** New Update ****</p>
  
  <p>I am trying it from literally the stock curl value which is Given on the Confluence API page</p>
  
  <pre><code>'{"id":"28870287","type":"page","title":"new page","space":{"key":"TST"},"body":{"storage":{"value":"&lt;p&gt;This is the updated text for the new page&lt;/p&gt;","representation":"storage"}},"version":{"number":2}}'
  </code></pre>
  
  <p>Still to no avail... I am at a complete loss....</p>
  
  <p>****** Update Again ******</p>
  
  <p>I am just going to post the code that I am currently working with</p>
  
  <pre><code>    r = requests.get('{0}/rest/api/content/28870287?expand=body.storage,version'.format(conflu_site),
                   auth=(test_user, test_pass)).text
  
      print(r) # This works as expected
  
  new = '{\"id\":\"28870287\",\"type\":\"page",\"title":\"Automated QA Results - Android\",\"space\":{\"key\":\"TST\"},' \
        '\"body\":{\"storage\":{\"value\":\"&lt;p&gt;This is the updated text for the new page&lt;/p&gt;\",' \
        '\"representation\":\"storage\"}},\"version\":{\"number\":2}}'
  
  update_response = requests.put('{0}/confluence/rest/api/content/28870287/'.format(conflu_site),
                                  data=new,
                                  auth=(test_user, test_pass),
                                  headers=({'Content-Type': 'application/json'}))
  
  print("Update Confluence Response: " + str(update_response))
  </code></pre>