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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • 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

How can I add metadata when creating a new page via REST API?

I'm using the Confluence REST API to create new pages. That works great but I now need to add some metadata to a new page and I'm having difficulty with how to do that. Based on the schema for content creation resource, I'm sending this payload in my POST call

{'type':'page',
'title': 'My Title',
'space': 'My Space',
'metadata': { 'userid': 'myid'},
'body': ...
}

Everything works except that when I go to read the page (expanding metadata), I don't see my metadata. All I get is something like this:

"metadata": {
"_expandable": {
"labels": "",
"frontend": "",
"currentuser": "",
"editorHtml": ""
},
"properties": {
"_links": {
"self": "https://<server>/rest/api/content/86945505/property"
}
}

 

I'm not sure what I'm missing. Should I be able to set my own metadata on the page? 

I do see the information about Content Properties but that requires an extra call after the page is created that I was hoping to avoid.

Thanks for any insight

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
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...

408 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