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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Get macro output via REST API

I have a confluence page that has a macro that runs an SQL query. The query outputs a table with the results when the page is rendered in a browser.

However, if I fetch: .../confluence/rest/api/content/128437000?expand=body.storage

It just returns the macro body (e.g., the SQL)--the macro is not executed.

How can I execute a macro via the API and get the macro output? Also, is there a way to get the output in json or csv instead of an HTML table?

Thanks in advance!

2 answers

Hello,

same question, i use pocketquery and whant to get the result over rest.

 

i already tried :

/rest/content/{id}/history/{version}/macro/id/{macroId}

get the macroid over :
/rest/api/content/1481615325?expand=body.storage

get version as field number under lastupdated:
rest/api/content/1481615325/history

In my case i get a answer but the result is not in!

While I wouldn't consider this an officially supported feature, you could probably use the "load dynamically" REST endpoint of PocketQuery to execute a Query. This however will also only give you the HTML.

We'd love to hear what your exact use case is! Could you maybe raise a ticket at our PocketQuery ServiceDesk and tell us more about it? (e.g. in what format would you expect the response, what users would need to use this endpoint, i.e. would it be okay if this was restricted to Confluence/PocketQuery admins, etc.)

Cheers,
Sven

Ok thanks, i will rise a ticket

I don't have a solution, but i am also interested if there is any, because i have the same problem.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

480 views 24 9
Join discussion

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