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

后端 未结 1 1344
孤独总比滥情好
孤独总比滥情好 2021-02-18 17:43

I\'ve successfully used the Confluence Rest API to create a page and attach it to a Space. MY json looks much like that from the example:

{
\"type\":\"page\",\"t         


        
1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-18 18:43

    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":"
                    false<\/ac:parameter> *<\/ac:parameter> 
                    name<\/ac:parameter> ascending<\/ac:parameter> 
                    <\/ac:parameter> false<\/ac:parameter> <\/ac:structured-macro>",
                    "representation":"storage"
                }
        }
    }
    

    0 讨论(0)
提交回复
热议问题