Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Link macro REST API

murderface00
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 22, 2024

Hi there! I am trying to create page with link to another Confluence page using rest API. In storage format link macros is

 

<ac:link><ri:page ri:content-title="{ref}" /><ac:plain-text-link-body><![CDATA[{name}]]></ac:plain-text-link-body></ac:link>

where

{ref} - Title another confluence page

{name} - Showed link name

But this doesn't work for me. When i am trying to create page with API using this code i getting error.

 

I have found another example which works for me

 

<ac:link><ri:page ri:content-title="{ref}" /></ac:link>

where

 

{ref} - Title another confluence page

but i can't set link name.

How i can create link to another Confluence page with link name setting?

 

P. s.

Common link creating is not suitable for me

<a href="{ref}">{name}</a>

2 answers

0 votes
Armin Meyer _Seibert - Coderay_
Atlassian Partner
July 23, 2024

Hi,

if an additional App is an option for you. We have developed "AutoPage" that covers the whole topic of automated page creation. You canset the link name but the main value is the possibility to create pages from templates with jira issue content. So you get pages with content you already produced in Jira without manual effort (and manual errors).

You can find it in the marketplace and try it for free:

https://marketplace.atlassian.com/apps/1218503/autopage-display-jira-data-in-confluence-with-automation?hosting=datacenter&tab=overview

 

Cheers

Armin

0 votes
murderface00
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 22, 2024

I have found solution

<ac:link><ri:page ri:content-title=\"{ref}\"/><ac:link-body><span>{name}</span></ac:link-body></ac:link>

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events