I'm trying to generate my pages programmatically as part of an automated CI release task.
Does anyone have an example of how to define the open-api macro, from the confluence marketplace, using confluence markdown?
It is not clear whether you are using Confluence Cloud or Confluence Server, but the relevant REST API documentation for each platform can be found here:
https://developer.atlassian.com/server/confluence/confluence-server-rest-api/
https://developer.atlassian.com/cloud/confluence/rest/
In either case, there is a REST endpoint that you can call to create a page with content, e.g. https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/
In this API request body, the `body.storage.value` is where you specify the content for the page being created.
If you open an existing Confluence page that contains the Open API macro, and choose "View Storage Format" from the context menu, you should see that the storage format for the macro looks something like this:
<ac:structured-macro ac:name="open-api">
<ac:parameter ac:name="url"> ** your url goes here ** </ac:parameter>
<ac:plain-text-body><![CDATA[ ]]></ac:plain-text-body>
</ac:structured-macro>
In theory, you should be able to pass something like the above as the `body.storage.value` of the REST API call, to create a page with an Open API macro for your URL in it.
Hope this helps. Good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Linton Galloway Have you ever figured out how to specify marco when creating pages programmatically?
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.