Hi,
We have tried to create own plugin in JIRA using JIRA SDK whereas we able to create Plugin but there is the main purpose to create fetch the external web services from that plugin which we have not able to understand how do that?
If anyone has any solution to create the plugin for fetch external rest web services.
You can use Jersey client. You should add this dependency:
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.8-atlassian-15</version>
<scope>provided</scope>
</dependency>
You need to define where you want to call the Rest Service and create this module. Maybe, you call it from a post function or validator. But anyway it is better to make your rest call service as a service in Jira (Named annotation)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey alexey, beacuase of I am new in JIRA plugin not able to understand what you want to says. only I able to understand that I need to define that REST server where i want to call but what is create this module? I must be create the new module for this. I was only follows simple basic steps for Hello World Dev Program. which given by Atlassian team online document but still not able to find out the cosume webserivces from plugins.
Can you also explain what is the Post function or validator. also, you have says make rest call service as services in jira. (still not able to understand for me) I have already one dedicated jira server with me i want to cosume getproject api from this plugin. so why i create rest call services a services in jira?
Any another way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should try Jira plugin tutorials first and you should understand, what modules you can create in Jira. There is no such module as call an external service. Did you develop any program before (not a Jira plugin)? How would you call an external service from there? You would do the same way in a Jira plugin.
Module are entrances for your code in Jira. You asked, what a validator is. You can find more info here:
https://confluence.atlassian.com/adminjiracloud/advanced-workflow-configuration-776636620.html
Out of the box you can use built in validators, conditions and post functions. But, for example, you want to call an external rest from a post funciton. that is why you need to write your own post function and call a rest service from there. There is the module for the post function. Modules are entry points to Jira not out of Jira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank Alexey, I understood much better now.
But, if want to consume external web services {not a JIRA API web services} consider as another tool which they have there own rest API web services. So, what can be used here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the library, which I gave you. This library is for querying Rest Services. It does not matter, if the services are in Jira or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.