Passing wiki markup via API from a file without adding explicit line breaks

Dennis A_ April 6, 2022

Hello,

I have been able to update a Confluence page via the API using the wiki storage type ("representation":"wiki") however everything goes in as a single line unless I explicitly add "\n" at the end of each line.  Is there a way to push this data without having to do that?

Thanks.

1 answer

0 votes
DJ April 6, 2022

Hi Dennis,

Are you using some other character as a newline terminator when constructing your content?

Wiki markup is line-sensitive so I'm not sure how you could get away without line terminators - but am curious what you are trying if you can share a snip of the wiki markup you are hoping to save.

Dennis A_ April 7, 2022

The issue seemed to be with the ConfluencePS module I was using. I switched to a different one updated to use PAT (https://github.com/jamiekowalczik/ConfluencePS) and the problem was resolved. I had to add my PAT to the powershell module; I'll probably update the code to get that from an encrypted  file.

Like DJ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events