Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Editing macro at the page through ScriptRunner for Confluence

I have a confluence page. 

Is it possible:
1. Find macro on the page which has name `Page properties`
2. Is it possible to update fields of macro `Page Properties` such as `Тип`, `Код`, `Модуль` programmatically through Confluence API?
3. Is it possible to delete field such as `Ссылка` programmatically through Confluence API?

I've attached an image to the message to clarify what I want.
Is it possible to do?

Confluence page for forum.png

1 answer

1 accepted

Hi @zaharovvv_suek_ru,

yes, this is possible! It just requires quite a bit of programming on your side. In fact, our Confluence app Diary actually makes use of this exact mechanism. Except, it doesn't use the Page Properties table, but a table inside it's own macro body. However, if you think it helps you, you can go have a look at how we did it. :)

Basically, you first want to get the Storage Format of your page via the Confluence REST API. You can then parse the XHTML, change the <table> in the Page Properties Macro however you want, and save the manipulated Storage Format again, using another Confluence REST API endpoint.

I've also already answered a very similar question to this over at the Developer Community - might also be worth checking out.

Best regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

Why everyone using Jira must be GDPR-compliant

Did you know that penalties up to 4 % of the yearly company turnover are possible in case of GDPR violations? GDPR regulations are currently mainly relevant for companies in the EU, but countries lik...

75 views 1 2
Read article

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