JAVA Atlassian SDK API to query Jira from Confluence

Hello everyone, trying to research on this.
From a confluence plugin we need to query jira.
Something like the JQL macro where you can query the jira instance.

Is there any API to query Jira? Or do we have to use the Jira’s REST-API? And if that’s the case we would have to provide credentials, so I was thinking is there a proper way of doing this?

Thanks in advance

Hi @JohnReese

the solution depends on what you need from Jira in your macro.

For me, the easiest way to get data from Jira REST API in the context of the current user is to use the ApplicationLinkRequestFactory request

On the SR website you can find an example of working at Groovy - Via App Links

Cheers
Adam

I need to show a JQL result basically, like the standard out of the box macro, show a JQL result in a table.

Thanks in advance I’ll check the application links

Is this possible without requiring yet another plugin?

All we need is a behavior like the Insert JQL macro, it requires no authentication, it just uses the current users session.