且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将Confluence宏插入由Confluence Rest Api创建的页面中?

更新时间:2022-05-16 09:57:53

很幸运,在我发布此问题后,我迷失了答案.因此,为了他人的利益,这就是我所发现的.

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.

此页面提供了缺少的内容: Confluence附件宏帮助

This page provided the missing pieces: Confluence Attachment Macro Help

我的JSON看起来像这样:

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"
            }
    }
}