Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Deleted user June 14, 2021

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 Champion
December 23, 2021

Hi @[deleted]

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
AUG Leaders

Atlassian Community Events