Creating new Confluence page with a custom properties

Dmytro Kravchenko February 19, 2024

In general, I can create a new page and fill the body with content. It looks like it was expected. But I need to create a page in full-width size. REST API documentation should have provided something about the properties of the newly created page but nothing.

This is my part of the JSON-code snippet for creating a new page.

{

  "spaceId": "${spaceid}",

  "status": "current",

  "title": "${owner}",

  "parentId": "${parentid}",

  "metadata":{

    "properties": {

     ---> Something should be in this place? <-----

  },

  "body": {

    "representation": "wiki",

    "value": "${html}"

  }

}

Maybe somebody was investigate it?

1 answer

0 votes
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2024

Hi - I hope that you are Doing good !!

 Try out with the position - full width, below is a quick refernce

extensions: {
position: 'full-width'

Replace spaceid with the key of the Confluence space where you want to create the page.
Update the title and value fields as needed


The "extensions" section allows you to specify the page layout, including setting it to full-width.
In the reference, "position": "full-width" ensures that the page will be displayed in full-width size


Hope this helps

Thank you very much and have a fantastic day!
Warm regards

Dmytro Kravchenko February 20, 2024

I will try you solution but the second question is where to find documentation about it. Maybe you know? I know only this dev site https://developer.atlassian.com/cloud/confluence/rest/v1/intro/#about but maybe I didn't found another one?

Dmytro Kravchenko February 20, 2024

'extension' should be used instead of 'properties'?

Dmytro Kravchenko February 20, 2024

url endpoint: "https://********.atlassian.net/wiki/api/v2/pages"


{

  "spaceId": "146735104",

  "status": "current",

  "title": "Test title",

  "parentId": "677413763",

  "metadata":{

    "extensions":{

      "position": "full-width"

    }

  },

  "body": {

    "representation": "wiki",

    "value": "some content in wiki format"

  }

}

Page created but not in full-width format

Suggest an answer

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

Atlassian Community Events