Jira intermediary app for rest calls
Asked by Florin:

Hello,

I am trying to have an integration between Jira and ServiceHub (this is an app that integrates with ServiceNow - basically another portal with tickets).

The problem is that ServiceHub when sending a web request, sends all the information within the tickets, regardless of what the endpoint is. Because of this, the calls fail, because Jira cannot read all the information.

For example, ServiceHub, using a webhook message endpoint ( POST /rest/api/3/issue/{issueIdOrKey}/comment ) will not send out only the message within the ticket to Jira but all the information inside of it.

Because of this problem, I am looking for an intermediary API app, between those two. This app's role is to catch the calls sent to it and parse the information, with a JSON to extract the information we need, and then with another JSON which will send the information to Jira.

Please let me know if anything like this exists or is possible.

Thank you,


Answers:
author: Robert Bailey
body: Hi [@Florin](/t5/user/viewprofilepage/user-id/5205323) ,

If you are looking for an tool that can sit between apps and help parse data from one tool, and then send data to another, we have an app that can do this, [ScriptRunner Connect.](https://www.scriptrunnerhq.com/atlassian-apps/jira/scriptrunner-connect?__hstc=61790195.6694e1c5b8259356fcccdd9cfcb617fb.1666310400263.1666310400264.1666310400265.1&__hsfp=1527642687&__hssc=61790195.1.1666310400266&utm_term=&utm_campaign=&utm_source=adwords&utm_medium=ppc&hsa_acc=7742523188&hsa_cam=20410443246&hsa_grp=153190285140&hsa_ad=669576107226&hsa_src=g&hsa_tgt=dsa-835805690321&hsa_kw=&hsa_mt=&hsa_net=adwords&hsa_ver=3&gad_source=1&gclid=Cj0KCQiAh8OtBhCQARIsAIkWb68IcZxKL1OTRkMNGO_Q_kdDrW_kjthSaqKrpZFOMGwAuwjuz20Kp4QaAvGdEALw_wcB)   

With ScriptRunner Connect, we have [Managed Connectors](https://docs.adaptavist.com/src/latest/connectors) for both Jira and ServiceNow, which means creating connections to those tools, and maintaining those connections is handled for you in the app.   

ScriptRunner Connect's main advantage is that it allows you to write custom scripts to handle your data in any way you need to. You can [listen to events](https://docs.adaptavist.com/src/latest/workspaces/event-listeners) from tools, capture the data from that tool and manipulate/streamline/convert the data as you see fit, before using our [Managed API](https://docs.adaptavist.com/src/latest/managed-apis) feature (which makes writing code to access REST APIs much easier) to send the data to another tool.   

ScriptRunner Connect is also a multidirectional, many to many tool, so can help you sync data back and forth between Jira and ServiceNow, and any other tool you may have as long as it has a REST API.   

I hope this helps!   

Kind regards,   

Bobby

comments: author: Florin
body: Hi Bobby,

Thank you for the reply. It seems that this is the only viable option for now. We already have Scriptrunner installed so we will give connect a try.

Thank you,

Florin


author: Florin
body: Hi, again Bobby,

I have a question. I installed Scriptrunner Connect to give it a try.

The issue I have is that there is no connection possible with ServiceHub.

I see we can do it with ServiceNow, but ServiceHub which is an integration with SN is not there. We will not have access to SN so I am not sure if this tool can help me.

As per this documentation <https://docs.adaptavist.com/src/latest/connectors> on available connectors, I don't have the connector to ServiceHub.

Please advise.

Thank you.

Florin


author: Robert Bailey
body: Hi [@Florin](/t5/user/viewprofilepage/user-id/5205323) ,

Apologies for the delay with my response, I was on medical leave.   

You are correct, we do not have a Managed Connector for ServiceHub. This means you will need to create a [Generic Connector](https://docs.adaptavist.com/src/latest/workspaces/api-connections/generic-connector)%20service) to connect to this tool. I had a quick look, and I am not 100% sure which tool you are using, if you could link their documentation here I would be able to provide a little more information.   

Kind regards,   

Bobby


author: Florin
body: Hi [@Robert Bailey](/t5/user/viewprofilepage/user-id/3646521)

I think I found some documentation for ServiceHub:

<https://github.com/timicoltd/ServiceHub-Developer>

I am testing the app.

Connectors:  
![1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/306137iCCEA9F145E5DDF34/image-size/large?v=v2&px=999 "1.PNG")

And this is the workspace:

![2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/306138i827C73CE7E2DCB1F/image-size/large?v=v2&px=999 "2.PNG")

I am still getting the hang of it, I don't have much scripting knowledge. And now I am trying to figure out how to send and receive the required information.

Thank you,

Florin


author: Robert Bailey
body: Hi [@Florin](/t5/user/viewprofilepage/user-id/5205323) ,

Thank you for the update! I would be really interested to know how you get on with this, and let me know if I can be of any assistance!   

Kind regards,   

Bobby


author: Marc - Devoteam
body: Hi [@Florin](/t5/user/viewprofilepage/user-id/5205323)

I do agree what [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730) states.

Also why don't you integrate Jira and ServiceNow directly as SN spokes are available for Jira integration.

See: <https://docs.servicenow.com/bundle/vancouver-integrate-applications/page/administer/integrationhub-store-spokes/concept/jira-spoke-v3-0-2.html>

comments: author: Florin
body: I would prefer that but unfortunately, we will not be granted access to ServiceNow. We must use ServiceHub which is an integration with SN. So the only viable solution is to have another app that acts as an intermediary between them to catch the API calls.


author: David Bakkers
body: Hello [@Florin](/t5/user/viewprofilepage/user-id/5205323)

You really, really want to re-think going through such a complex and convoluted process of adding another layer of cost and complexity to the problem.

If this 'integration' that you currently have between ServiceHub and Jira is a commercial product that isn't working properly, surely it can be configured to make it work in the manner you need. Who makes it and what is it called?

If it's not a commercial toolset and was custom made by someone at your company, why not get them to fix it and make it work the way it needs to?

comments: author: Florin
body: Unfortunately, the people who manage ServiceHub do not want to make any changes as this will affect the other customers. ServiceHub is integrated into ServiceNow, but we will not be granted access to SN.  
This integration is very limited and the only viable solution is to have an intermediary app to catch all the API calls between Jira and ServiceHub.  
I am fully aware this is more complicated and includes extra costs, but we have no other option.


Tags: api

cloud

jira-service-management

jira-service-management-cloud

json

rest

rest-api

webhook