Hi there
Im learning creating Macros for Confluence Cloud, starting with the Hello World example under the Forge section.
Im now wanting to add parameters to the macro. I already have working REST API code that updates Confluence pages, and I now want to call my macro (with parameters) from within the REST API.
So for example, I have the Hello World macro on a page, which says 'Hello World'. I now want to update to the macro to display 'Hello Lee', ideally using the markdown syntax eg {LeeMacro:param1=Hello Lee{LeeMacro}
Is this possible?
Hi @Lee Parvin ,
All options the macro gives you using the gui, can be used using the API. If you create a page with macros using the gui, then use the rest api to view/download the page, you will see how the options are included in the macro at the page.
Hi Bert
Using the Pets Macro example, I have created the macro and added it to a Confluence Page, and it works well. However, if I try to get the macro details using the REST API using (https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content---macro-body/#api-group-content---macro-body), I keep receiving the error Status 404 No Macro found on content ID.....
The Macro ID I use was set in the Manifest.yml ie app id, and the Page ID is taken from the page that runs the macro.
Looking at the REST Response I get from calling ?expand=body.atlas_doc_format, it apprears that the Macro ID is different.
Thanks
Lee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.