If you have a Jira instance linked to your Confluence instance, it is possible to interact with it using Jira’s REST API.
These examples make the requests on behalf of the current user. Check out the Making Requests as Another User section for other ways of making the request.
Also, see the examples of integrating Confluence from the Jira perspective.
Creating a Jira Project
This example utilizes Event Listeners and hooks up the
SpaceCreateEvent, responding to it by creating a project in Jira.
Check our video guide:
Line 14: Retrieves the primary Jira application link
Line 20: The project parameters
Line 32: Executes the request
Creating a Jira issue
The script below is an example of creating an issue and can be used via the Script Console, Event Listeners, etc.
Line 13: Retrieves the primary Jira application link
Line 17: Specify values for the issue's fields here
Line 29: Executes the request