I was using the below script to load some data into the Database picker custom field.
I was using an APIGEE API which makes an OAuth call first and then it uses the OAuth Token as the Authentication in the corresponding API call to retrieve data from an application.
Can you recommend any particular library to import?
import com.atlassian.jira.component.ComponentAccessor
import org.apache.log4j.Logger
import org.apache.log4j.Level
public class ProjectDataInjection
{
def ProjectsData()
{
//Calling UDP API with parameters
def log = Logger.getLogger("Project API Call")
log.setLevel(Level.DEBUG)
def master = new MasterFile()
String projectURL = master.udpProjects
String token = new getApigeeToken().getToken()
def data = new APICall().getAPICall(projectURL, "Bearer " + token)
def sort = new sortOptions()
But I got the following error:
unable to resolve class getApigeeToken
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script95.groovy: 19: unable to resolve class getApigeeToken @ line 19, column 24. String token = new getApigeeToken().getToken()
Can someone please help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.