The CreatorCon Call for Content is officially open! Get started here.

Integration with Restful Web Service

mjocasio23
Tera Expert

I have successfully define a end point between two instances to retrieve incident data, Now what I will like to do, is used that end point as a reference from an integrated project using Spring boot to access the same table data.... I have try to look for example code to reference this Restful end point in this software but I haven't found an accurate example...

Does any one knows how to reference a servicenow API from spring boot? This is a code build from the configuration setting when restfull was defined,,,, it works between two instances....

But i will like used a third party software (spring boot) to access this end point.....

try {

var r = new sn_ws.RESTMessageV2('Company Research Incident query', 'GET');

r.setStringParameterNoEscape('var1', '5');

//override authentication profile

//authentication type ='basic'/ 'oauth2'

//r.setAuthentication(authentication type, profile name);

var response = r.execute();

var responseBody = response.getBody();

var httpStatus = response.getStatusCode();

}

catch(ex) {

var message = ex.getMessage();

}

1 REPLY 1

antin_s
ServiceNow Employee
ServiceNow Employee

What exception are you getting?