Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,427
Community Members
 
Community Events
165
Community Groups

How to use macro data in a script?

Has anyone found a way to use the data that is edited in the (scaffolding) macros with a script? I want the REST Endpoint to access this data to transfer it to Jira and create Issues based on that information. 

1 answer

Hi Lennard,

Hope you are having a great day.

You can use the following Get endpoint to access Scaffolding values:

{CONFLUENCE-BASE-URL}/rest/scaffolding/1.0/api/form/meta/{pageid}

You can find more about the Scaffolding Rest APIs through the following link:

As for creating Jira issues, you can use the following endpoint:

POST /rest/api/2/issue

You can read more on Jira Rest APIs through the following link:

I hope it helps.

Best,

Sayed

Hi Sayed,

hope you're also having a great day.

Thank you for your fast reply. As I am not that familiar with Endpoints could you might help me a little bit more? How would that line to get the data look like, if the confluence url was "http://confluenceurl" , page id "12345" and the name of the macro "textmacro"?

 

Because if I type

"def request = applicationLinkRequestFactory.createRequest(POST, "/rest/api/2/project")"

it works but if I type

"def request = applicationLinkRequestFactory.createRequest(POST, "<confluenceurl>/rest/scaffolding/1.0/api/form/meta/123456")

it says "The variable "GET" is undeclared.

Best regards

Lennard

Suggest an answer

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

Marketplace Partner Spotlight: AppLiger

This month the spotlight is on AppLiger. We caught up with Pavel Pavlovsky, CEO and Product Manager, to learn how the company started and what fuels the team's creativity.    Atlassian:...

397 views 0 7
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