Hi community;
My enterprise has changed to be working in cloud until February to now work in server, and for me is very different but I know how works the scripts in cloud by the rest api, and to do the cahange ... wow!!!
I put here a simple code in cloud and I need to understand how I can transform in server
Thanks

I put here the code to copy and paste if you need
def projectKey = 'XXXX'
/*
{ "startAt": 0,
"maxResults": 50, no poner más de 100 porque peta por todos lados
"total": 250,
"issues": [] }
*/
def resultx = get('/rest/api/2/search?jql=project='+projectKey+'&maxResults=100&startAt=0')
.header('Content-Type', 'application/json')
.asObject(Map)
if (result.status == 200){
log.warn('Total Issues = ' + result.body.total)
} else {
return "Failed to find issue: Status:"+result.status
}
def links = result.body.issues.fields.issuelinks
def tipo = result.body.issues.fields.issuelinks.outwardIssue.fields.issuetype
return tipo