It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Create new page from template via external link

Hi,

we are trying to create a new page via external link. This link is created in our own application.

I managed to create an empty page with title via this link:

https://compnay.atlassian.net/wiki/pages/createpage.action?
spaceKey=WEB
&title=myTitleWithDate
&linkCreation=true
&fromPageId=1354170460

This is fine for some quick documentation, but for other use cases we´d like to use a template. For now we are using an inbuild template 'Meeting notes' and so I designed a link from our application like this:

https://company.atlassian.net/wiki/pages/createpage-entervariables.action?
templateId=595cdeb6-bba8-4a3d-81fd-31902b6bb504
&spaceKey=WEB
&title=myTitleWithDate
&newSpaceKey=WEB
&fromPageId=1354170460

But this is not working, I get a featureless error message from confluence.

I think, this "template id" I am using, is the blueprint id of the 'Meeting Notes' template, and honestly, I don´t think this is the ID I should be using.

So:

1. Where can I find the real "template id" of an inbuilt template (blueprint)?

2. Would it be better to design our own templates for this use case?

 

Some specs:

Confluence hosted on atlassian.net (not on-premise)

 

Tank you.

best Regards

1 answer

1 accepted

0 votes
Answer accepted

Hello Hans-Florian and welcome to the Community!

This is an interesting idea, creating a page via a URL outside of Confluence. We did find a similar Community article we would like you to review as the users there are attempting the same thing: Can I trigger a template from a link?

Additionally, you may complete this same action via a REST API call. The REST API will allow for a lot more customization around your created content and allow you to be a lot more flexible with what you’re creating. You’ll also not be constrained to the 2083 character limit of URLs. Please review this endpoint for further information: POST /wiki/rest/api/content.

I hope this proves helpful and you’re able to get your templated content created.

Regards,
Stephen Sifers

Hi, thank you for your answer and sorry for the long delay.

We improved our software recently so we can send and receive data via REST. So this might be a possibility for us. I checked the page you were referring to.

How can I create a new page from a blueprint via REST?

Best Regards

Like Stephen Sifers likes this

Hello Hans-Florian,

Glad to hear there are improvements on your end to support REST API calls. With the REST API, you may create pages within Confluence using the following endpoint: POST /rest/api/content. The functionality to create a page using the REST API is not currently supported. There is a feature request to have this functionality added to the product which may be found at CRA-818.

A workaround to this would be to implement a similar method as the following:

  1. Locate an example page with the template applied.
  2. Scrub that page via a REST API call using the following endpoint: GET /rest/api/content(This will allow you to get the storage format).
  3. From this, pass the storage format to your create call using this endpoint: POST /rest/api/content

I hope this information proves helpful and you’re able to start creating pages via the REST API.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

276 views 9 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you