Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

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

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

79 views 1 6
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