How to bulk enable Numbered Headings in Confluence Cloud Using REST API
This article outlines the process for enabling Numbered Headings on Confluence Cloud pages through the REST API. For example, organizations transitioning from Confluence DC to Cloud may need to activate Numbered Headings across thousands of pages, which is impractical to do manually. This article presents a scriptable approach to achieve this using the Confluence Cloud REST API.
Cause
In Confluence Cloud, the Numbered Headings feature is controlled by a page-level content property (nl_avisi_nh). It is not enabled by default and must be configured individually for each page.
Solution
To enable Numbered Headings via the API, use the following:
Confluence Cloud’s REST API v2 supports updating content properties per page. You can utilize this to enable Numbered Headings programmatically.
REST Endpoint:
POST /wiki/api/v2/pages/{pageId}/propertiesPayload:
{
"key": "nl_avisi_nh",
"value": {
"isEnabled": true
}
}This process can be automated for multiple pages using a scripting language (for example, Python, Bash).