REST API for Page Blueprints
Asked by Matthias Karl:

Dear Community,

<br />

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

<br />

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.

<br />

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>

<br />

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.

<br />

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  
}

<br />

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.  


Answers:
author: David Bakkers
body: Hello [@Matthias Karl](/t5/user/viewprofilepage/user-id/5269703)

*"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](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template/#api-group-template) 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

comments: author: Matthias Karl
body: Thank you very much for your answer David!


author: Joyce A
body: Are there any new updates to this post for Confluence Data Center V.8+?


Tags: api

page

rest

rest-api

server