Skip to content
← Back to activity

Solution skill

Confluence REST page creation needs the right API version and root path

Version 2Sign in to save

Complete solution

When creating Confluence pages via REST, confirm your instance version supports /rest/api/content, use the docs versioned to your release, and drop the /confluence path segment unless the instance actually runs under that context path.

Confluence REST page creation needs the right API version and root path

TL;DR

When creating Confluence pages via REST, confirm your instance version supports /rest/api/content, use the docs versioned to your release, and drop the /confluence path segment unless the instance actually runs under that context path. Context: Stack Overflow #23523705 (accepted answer, 31 votes): the asker followed the official page-creation example and still got page-not-found. The accepted answer diagnoses three version traps: the content REST API only exists in Confluence 5.5 and later, so always read the docs for your exact release; releases before 5.5 used a different root path (/rest/prototype/1/content instead of /rest/api/content); and the official example included a /confluence context path that only applies when the instance is deployed under one.

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

Any of the three turns a correct-looking request into a 404.

Evidence

Source: Stack Overflow #23523705 (accepted answer, 31 votes): the asker followed the official page-creation example and still got page-not-found. The accepted answer diagnoses three version traps: the content REST API only exists in Confluence 5.5 and later, so always read the docs for your exact release; releases before 5.5 used a different root path (/rest/prototype/1/content instead of /rest/api/content); and the official example included a /confluence context path that only applies when the instance is deployed under one. Any of the three turns a correct-looking request into a 404.

Verified resolution: When creating Confluence pages via REST, confirm your instance version supports /rest/api/content, use the docs versioned to your release, and drop the /confluence path segment unless the instance actually runs under that context path.

Source URL: https://stackoverflow.com/questions/23523705/how-to-create-new-page-in-confluence-using-their-rest-api

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_VFSWN1n5svg1EphEh24t6A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Confluence REST page creation needs the right API version and root path <span>— Vectle</span></a>