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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,557,872
Community Members
 
Community Events
184
Community Groups

Can the HTML source of a page be returned via REST API (v2)?

Hello! 

I am writing a script to improve the release notes generation for my team. I'm using the v2 API to generate the page, and I'd like to return the HTML to be posted to our external knowledge base.

I'm having a hard time getting the GET return body to be in html format instead of json. This article from 2018 has the solution for the v1 API, but that solution isn't compatible with v2. 

 

  • Is there a way to return a published page's HTML content?
    • If not, can I still use the v1 API? 

1 answer

1 accepted

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 30, 2023

Hi @Kirsten Cox 

Will the following endpoint help you?

https://YOURDOMAIN.atlassian.net/wiki/api/v2/pages/{PAGEID}?body-format=storage

The above endpoint, if not mistaken, will get the result of the accepted answer of your link.

Concerning the old endpoint, it still valid and you can use it. But I have no idea for how long.

Hi there, that did help, I was able to get an HTML return. I have an additional question, if you don't mind.

I have a Jira table generated with a JQL query, do you know if I can get the contents of the table returned instead of just the macro structure? 

For example, I'm current returning this:

<hr /><ac:structured-macro ac:name=\"jira\" ac:schema-version=\"1\" data-layout=\"full-width\" ac:local-id=\"\" ac:macro-id=\"9932a9f0-89d7-4d89-be7b-6cd50c9a3c6a\"><ac:parameter ac:name=\"server\">System JIRA</ac:parameter><ac:parameter ac:name=\"columns\">key,summary,type,hospital system,product,service line</ac:parameter><ac:parameter ac:name=\"maximumIssues\">1000</ac:parameter><ac:parameter ac:name=\"jqlQuery\">fixVersion = 'CMX-Automate 2.0.26' AND issuetype IN (10010,10004,10127,10130) </ac:parameter><ac:parameter ac:name=\"serverId\"></ac:parameter></ac:structured-macro>

I'd like to return the contents within the table.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 03, 2023

@Kirsten Cox unfortunately I don't know. You can create a new post on the community for your last question. Someone else can perhaps have the answer to your 2nd question.

Like Kirsten Cox likes this

Suggest an answer

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

Atlassian Community Events