Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,296,376
Community Members
 
Community Events
165
Community Groups

BadRequestException: Error occurred when updating content property content-appearance-draft

Edited

I am using REST API of the confluence cloud for creating a new page. Sometimes (not always) I have an error in response

{
"statusCode": 400,
"data": {
"authorized": false,
"valid": true,
"errors": [],
"successful": false
},
"message": "com.atlassian.confluence.api.service.exceptions.BadRequestException: Error occurred when updating content property content-appearance-draft. Cannot create new content property, see https://docs.atlassian.com/confluence/REST/latest/#content/{id}/property-create for usage. Property : JsonContentProperty{id='null', key='content-appearance-draft', content=ExpandedReference{idProperties={id=ContentId{id=1432322065}, version=EmptyReference{referentClass=class com.atlassian.confluence.api.model.content.Version}, status=current}, of=some(Content{id='ContentId{id=1432322065}', type=page, title='postman page 04', status=current, space=ExpandedReference{idProperties={key=~117839248}, of=some(Space{key='~117839248', name='null'})}, history=EmptyReference{referentClass=class com.atlassian.confluence.api.model.content.History}, version=EmptyReference{referentClass=class com.atlassian.confluence.api.model.content.Version}, ancestors=[Content{id='ContentId{id=1426130768}', type=null, title='null', status=current, space=EmptyReference{referentClass=class com.atlassian.confluence.api.model.content.Space}, history=EmptyReference{referentClass=class com.atlassian.confluence.api.model.content.History}, version=EmptyReference{referentClass=class com.atlassian.confluence.api.model.content.Version}, ancestors=null (CollapsedList), container=EmptyReference{referentClass=interface com.atlassian.confluence.api.model.content.Container}, childTypes={}}], container=EmptyReference{referentClass=interface com.atlassian.confluence.api.model.content.Container}, childTypes={}})}, version=null} , isSuccessful: false, isAuthorized: false, isValid: false, hasErrors: true, Errors: \"jsonproperty.duplicate.key\""
}

I am using Postman, the request body is like this:


{ "type":"page",
"title":"postman page 04",
"ancestors":[{"id":123456789}],
"space":{"key":"~117839248"},
"metadata": { "properties": {
"editor" : {
"key": "editor",
"value" : "v2" },
"content-appearance-draft":{
"key": "content-appearance-draft",
"value" : "full-width" },
"content-appearance-published":{
"key": "content-appearance-published",
"value" : "full-width" }
}

},

 "body":{
"storage":{
"value":"<h2>Title</h2><br/># subtitle (2021-06-10)\n <br/>- <a href=\"http://localhost:8080\">http://localhost:8080</a> text1 <br/> ",
"representation":"storage" }}}

Could you help me to understand what is wrong?

1 answer

0 votes
Fabian Lim Community Leader Dec 23, 2021

Hi @vladimir_levitskiy

Looks like there is an open bug for this specific error. Take a look at this post: https://jira.atlassian.com/browse/CONFCLOUD-72142

Regards

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Confluence

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

1,020 views 17 28
Read article

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