REST API for Page Blueprints

Matthias Karl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2023

Dear Community,


I need to create pages from a page blueprint using the Confluence Server REST API.


I wanted to fulfill this requirement in two steps:
1.) Get a list of all page blueprints, so that I can find the id of the page blueprint which I want to use.
2.) Use the appropriate POST call to create a page from this page blueprint.


So, similar to what is shown here for creating spaces with space blueprints:
https://confluence.atlassian.com/confkb/how-to-create-spaces-with-blueprints-through-the-confluence-rest-api-980460886.html


However, it seems like the calls for page blueprints are not documented and do not exist. I searched many pages, including the following but none of them mention what I need:
https://developer.atlassian.com/server/confluence/confluence-server-rest-api/
https://docs.atlassian.com/ConfluenceServer/rest/8.4.0/
 
To get a list of page blueprints, I tried:
GET https://my-confluence-url.com/rest/api/blueprint
GET https://my-confluence-url.com/rest/api/blueprint/list
GET https://my-confluence-url.com/rest/create-dialog/1.0/page-blueprint/list
GET https://my-confluence-url.com/rest/create-dialog/latest/page-blueprint/list
GET https://my-confluence-url.com/rest/create-dialog/latest/page-blueprint/
GET https://my-confluence-url.com/rest/create-dialog/page-blueprint/list
 
where my-confluence-url is substituted with the actual url.


All of those tries return an error message of this kind:
{
"message": "null for uri: https://my-confluence-url.com/rest/api/bluprint",
"status-code": 404
}


The REST API itself seems to be working, because the following call returns a list of spaces:
GET https://my-confluence-url.com/rest/api/space
 
I tried two versions of Authorization headers:
1.) "Basic username:password" - where username and password are substituted with my actual credentials and then encoded to Base64
2.) "Bearer PAT" - where PAT is substituted with the PAT I created for my user in my Confluence profile.
 
I always include "Accept: application/json" in the header.
 
My Confluence Server version is 7.19.9.
 
Is it really not possible to create a page from a page blueprint using the REST API?
 
Thank you so much if you have any hints.

1 answer

1 accepted

0 votes
Answer accepted
David Bakkers
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.
July 17, 2023

Hello @Matthias Karl 

"Is it really not possible to create a page from a page blueprint using the REST API?"

Yes, it's really not possible. The documentation for Confluence Server v7.19 is correct; those endpoints you've been sending GET requests to really don't exist.

For Confluence CLOUD, the v1 REST API Template endpoints do provide basic management of templates and their content, but there still is no way to create a new page based on a template. You still have to get the ID of a template, copy all the content from it, then put all that content into a new page.

C'est la vie

Matthias Karl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 18, 2023

Thank you very much for your answer David!

Joyce A
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 27, 2024

Are there any new updates to this post for Confluence Data Center V.8+?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events