Uploading an attachment to Confluence Data Center page via REST API not working per instructions

Derek.L.Sparks July 26, 2022

The goal is to complete the steps in this article (https://confluence.atlassian.com/confkb/using-the-confluence-rest-api-to-upload-an-attachment-to-one-or-more-pages-1014274390.html) to upload an Excel file via REST API to Confluence 7.13.5 Data Center (currently on an evaluation license at the moment) and display it on a particular Confluence Page. I’m running into a challenge with this first part of these instructions to just upload the file to the Confluence page. Using the script from the first part of those instructions in Postman to perform the file upload and replacing the ID/Password, file path, and URL with the corresponding info from my environment I get a ‘200 OK’ response with a message starting with “<head><title> Log In – Confluence</title>” and then 450 more lines of response code but the result is the file is not attaching to the Confluence page per these instructions.



  1. I’ve also checked the Confluence REST API documentation at this link (https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/) to ensure I was using the correct curl command syntax for ‘Upload an Attachment’ which it shows I am.
  2. I have attempted this with both the ID/Password login as show in the links above and also changing the authentication piece to Basic Authorization with an API token encoded per these directions but still getting same result: https://developer.atlassian.com/cloud/jira/service-desk/basic-auth-for-rest-apis/.
  3. I have tried this with both the HTTP request with the localhost address on the server itself and the HTTPS version as well but still same result.
  4. I attempted a GET REST API and get a similar response with 467 lines of response code.
  5. I have had previous success in testing REST APIs from Postman into Jira SM to create a ticket so attempting to see what I may be missing.
  6. For good measure, I’ve gone into the Confluence Administration / General Configuration / Further Configuration and ensured the ‘Remote API (XML-RPC & SOAP)’ box is checked.
  7. I googled and searched on the Atlassian Community forums but not finding what might be causing this.

Thanks for any and all help.

0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events