Integration with Restful Web Service
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2017 02:13 PM
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();
}
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2017 07:40 PM
What exception are you getting?