Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Interacting with Jira REST API from Exalate Groovy script

 
1
0
-1

Hello,
we are trying to solve the following requirement:
Any new Epic should be synced from Jira Cloud instance A to Jira Cloud instance b.
In instance B the synced epics are then added to sprints.

The customer wants infos about the sprint to be synced to instance a.
my approach is is to read the issue in instance b via the jira rest api and compose a text that describes the status of the sprint.
I plan to write this string to a custom field and then sync that custom field.

If there is an easier, more out-of-the-box way to solve these please hint me to it.
If its not i am wondering on how to autheticate with the rest api when calling it from the exalate groovy script.
IOauth an option? Do you happen to have a code example for this?
If not is Basic Auth the only option?

kind regards
Jens

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      You can use the httpClient.get or httpClient.post to manipulate the Jira cloud rest api's.
      Check
      https://docs.idalko.com/exalate/display/ED/How+to+make+any+Jira+Cloud+REST+API+call+with+the+Jira+Cloud+HTTP+client


      Note that this page is a bit outdated as the httpClient methods have been extended with other methods, but that documentation task is dangling in thin air



      It does handle the authentication using the same authentication context as Exalate

        CommentAdd your comment...