How to use macro data in a script?

Lennard W April 8, 2021

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

1 vote
Sayed Bares [ServiceRocket]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 8, 2021

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

Lennard W April 8, 2021

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
AUG Leaders

Atlassian Community Events