Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Confluence Pages Using API (ADF Format)

川目 沙英 January 23, 2025 edited

API を使用して、Jira Service Management を自動化するためのページを Confluence で作成したいと考えています。

使用している API エンドポイントは Confluence Cloud API です

https://<your-site-namae>/wiki/rest/api/content

ADF(Atlassian Document Format)形式でデータを書き込むには、"representation": "atlas_doc_format"を設定します。

以下のカスタムデータを設定したところ、Confluenceページは無事に作成されたのですが、ページの内容が空白で値が反映されませんでした。

{
    "space": {
        "key": "<space-key>"
    },
    "status": "current",
    "title": "test",
    "type": "page",
    "body": {
        "representation": "atlas_doc_format",
        "value": {
            "version": 1,
            "type": "doc",
            "content": [
                {
                    "type": "paragraph",
                    "content": [
                        {
                            "type": "text",
                            "text": "Hello "
                        },
                        {
                            "type": "text",
                            "text": "world",
                            "marks": [
                                {
                                    "type": "strong"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    }
}

この目的のためにカスタムデータを適切にフォーマットする方法についてアドバイスをいただけますか?

スクリーンショット_24-1-2025_173742_scsk-demo02.atlassian.net.jpeg

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events