How do you insert a confluence macro into a page created by the Confluence Rest Api?

烂漫一生 提交于 2019-12-04 00:14:06

As luck would have it, after I posted this question I stumbled on the answer. So for the benefit of others, here is what I found.

This page provided the missing pieces: Confluence Attachment Macro Help

My JSON looked like this:

{
"type":"page",
"ancestors":
    [
        {
            "type":"page",
            "id":12355342
        }
    ],
"title":"Page Title 1",
"space":
    {
        "key":"DAT"
    },
"body":
    {
        "storage":
            {
                "value":"<ac:structured-macro ac:name=\"attachments\">
                <ac:parameter ac:name=\"old\">false<\/ac:parameter> <ac:parameter ac:name=\"patterns\">*<\/ac:parameter> 
                <ac:parameter ac:name=\"sortBy\">name<\/ac:parameter> <ac:parameter ac:name=\"sortOrder\">ascending<\/ac:parameter> 
                <ac:parameter ac:name=\"labels\"><\/ac:parameter> <ac:parameter ac:name=\"upload\">false<\/ac:parameter> <\/ac:structured-macro>",
                "representation":"storage"
            }
    }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!