Hi,
I am having a look at the confluence macro as I'd like to call response from external API and the json result to be displayed within my custom macro.
At the moment the existing API could be requested through ajax call, or jQuery call in some of our web pages. The goal is to do the same within a confluence page.
What could be the best way to do it? Can any one give me some guidance?
1. Pull the results via a call directly a confluence macro with jQuery code? Is that possible?
2. Or request through the Java class implementing the Macro interface directly the API and then format the result to be displayed?
3. Write a Java class implementing Macro interface that generates js/jQuery code which calls the API?
I'm a bit lost on how to do it the right way.
Did you ever get this working? I need to do the same thing....
Hi,
Could any one help with some sample code on how to trigger javascript / jQuery for pulling data within a custom Macro, please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.