Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

CURL solution to update confluence page

I haven't gotten to use the Confluence cloud API at all and figured someone may have a working example of a CURL command that updates a confluence page? 


Specifically, I want to add an Issue Filter Macro and apply a JQL. 



1 answer

1 accepted

0 votes
Answer accepted

Hello Alec,

Happy to help with that! First, you'll need to generate an API token if you haven't already.

You can find an example of the call you need from our documentation below:

According to this, your cURL command would be:

 curl -u <EMAIL>:<API_TOKEN> -H 'Content-Type: application/json' -d '<REQUEST_BODY_HERE>' -X PUT https://<NAME><PAGE-ID> 
Your request body (REQUEST_BODY_HERE above) can be sourced from a file. Here's an example of a request body for this:
 "type": "page",
 "title": "PAGE_TITLE",
 "version": {
 "space": {
   "key": "SPACE_KEY"
 "body": {
   "storage": {
     "value": "<p><ac:structured-macro ac:name=\"jira\" ac:schema-version=\"1\" ac:macro-id=\"2522710c-30ab-4f0d-ad7b-f3beb63728a4\"><ac:parameter ac:name=\"server\">System JIRA</ac:parameter><ac:parameter ac:name=\"columns\">key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution</ac:parameter><ac:parameter ac:name=\"maximumIssues\">20</ac:parameter><ac:parameter ac:name=\"jqlQuery\">project=TRP </ac:parameter><ac:parameter ac:name=\"serverId\">f2a1787f-9df0-35e5-adf4-7167694a8392</ac:parameter></ac:structured-macro></p>",
     "representation": "storage"

Above, the "macro ID" and "server ID" are generated per instance. If you're not sure what your macro ID and server ID are, then you can insert a Jira Issues Macro in a page in Confluence manually, and then view the Storage Format (... > View Storage Format) in order to obtain that information for the future.

Additionally, you could call https://<NAME><PAGE-ID>? and obtain the information in the same way.

Let me know if you have any trouble with that.



Thank you! I'll try that today!

Like Shannon Spaniol likes this


You're welcome! Please let us know if it works for you or if you have any other questions or issues.



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

323 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you