I want to call the external systems(any other App) API from Jira ScriptRunner using a groovy script.
i ran the script but its throwing errors because of these libraries
import groovy.json.JsonOutput
import groovyx.net.http.ContentType
import groovyx.net.http.HttpResponseDecorator
import groovyx.net.http.RESTClient
Errors:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 4: unable to resolve class groovyx.net.http.RESTClient @ line 4, column 1. import groovyx.net.http.RESTClient ^ Script1.groovy: 2: unable to resolve class groovyx.net.http.ContentType @ line 2, column 1. import groovyx.net.http.ContentType ^ Script1.groovy: 3: unable to resolve class groovyx.net.http.HttpResponseDecorator @ line 3, column 1. import groovyx.net.http.HttpResponseDecorator
can any one help me on how to get this working is there any way we can upload libraries in script runner which are popping this errors.
Thank you.
ScriptRunner have built-in tools for REST API calls, you don't need to rely on the "groovyx" packages.
See: https://docs.adaptavist.com/sr4jc/latest/best-practices/rest-apis
Thanks for the quick reply @Aron Gombas _Midori_
But if I want to connect Jira with workday by using the script runner and calling workday from Jira scriptrunner via APIs. How can i achieve this? can u please help me out with this.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, don't know if it is still valid and if you are on Cloud/Datacenter - but this might help you - there are also examples included: REST API FAQs (adaptavist.com)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.