Body.storage Processing

Anthony Nguyen
Contributor
June 29, 2024

This question is related to this one:

https://community.atlassian.com/t5/Confluence-questions/Web-Request-GET-Get-Page-into-PUT-Update-Page-is-not-working/qaq-p/2728904

Long story short, I am using a web request to Get Pages from Confluence API with &body-format=storage.

I save the following {{webResponse.body.results.body.storage.value.replace("\"","\\\"")}} as {{content}}.

I then use Update Page from Confluence API with a payload where each attribute is the same and

"body": { "representation": "storage", "value": "{{content}}" }

I get 400 invalid_message and am confused about why. Looking at others' questions, they do not have any issue just using the webresponse value and don't even have to use replace("\"","\\\""). Why can I not just use {{webResponse.body.results.body.storage.value}} as "value"?

1 answer

0 votes
Anthony Nguyen
Contributor
June 29, 2024

It was again a case of unescaped characters, \ in particular. My question is still why I have to escape these instead of just being able to utilize the value.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events