Creating Confluence Pages Using API (ADF Format)

川目 沙英 January 23, 2025

I would like to use the API to create a page in Confluence for automating Jira Service Management.

The API endpoint I am using is the Confluence Cloud API

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

I want to write the data in ADF (Atlassian Document Format) format by setting "representation": "atlas_doc_format".

When I set the following custom data,the Confluence page was created successfully, but the content of the page was blank and the values were not reflected.

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

Could you please advise on how to properly format the custom data for this purpose?

スクリーンショット_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