Request Custom Function error Exception - 'SSLException'

Request Custom Function error Exception - 'SSLException'

Hello, I'm trying to use Request Custom Function to update request details. I found a script from another topic, but I'm getting "Exception - 'SSLException'" when trying to run it. Our servicedesk plus is a https site only, so maybe I'm doing something wrong with that.

The code I'm trying to use:
In global function (this is global_function_4)
configuration = Map();
configuration.put("url","https://site:443");
configuration.put("technicianKey","our API key here");
return configuration;

And in Custom Action
configuration = global_function_4();
instanceJson = context.get("instance");
portalID = instanceJson.get("id");
workorderid = requestObj.get('id');
returnObj = Collection();
url = configuration.get('url') + "/api/v3/requests/"+workorderid;
headers= {"authtoken":configuration.get("technicianKey"),"portalid":portalID};
input_data = {"request": {"request_type": {"name": "Incident"}}};
//info input_data;
response = invokeurl
[
url: url
type: PUT
parameters: {"input_data":input_data}
headers: headers
];
if ( response.get('response_status').get('status') == 'success'){
returnObj.insert("result":"Success");
returnObj.insert("message":"Field updated");
return returnObj;
}
else{
returnObj.insert("result":"Failed");
returnObj.insert("message":"Field update failed");
return returnObj;
}
//info response;
return returnObj;

Ideally I would use this request custom function in business rule.


                  New to ADSelfService Plus?