- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2022 01:12 AM
I was able to get created Incidents from the Service-now table API. I want to know is there any endpoint available to fetch each incidents modifications activities after those modified by someone.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2022 09:27 AM
Instead of using endPoint function you should create the REST MESSAGE and call In your script
var request = new sn_ws.RESTMessageV2('YourRestMsgName','Post');
Regards,
Suresh.
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 02:28 AM
I updated the REST Message's Endpoint URL as " https://03w7-192-684-85-96.ngrok.io/api/info" which is listing on my running server. But when i calling the Business Role, My server didn't received any request from service-now. Is there any missing part which i do need to fix?
Business Rule script
(function executeRule(current, previous /*null when async*/ ) {
if (current.sys_updated_on.toString() != previous.sys_updated_on.toString()) {
try {
var r = new sn_ws.RESTMessageV2('Intigrate_with_another_server', 'Create_Incident');
var data = {
short_description: current.short_description.toString(),
caller_id: current.caller_id.email.toString(),
state: current.state.toString()
};
r.setRequestHeader("Accept", "application/json");
r.setRequestHeader('Content-Type', 'application/json');
r.setRequestBody(JSON.stringify(data));
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
} catch (ex) {
var message = ex.message;
}
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2022 12:57 AM
Can you refer below link and it having other option how to use REST AND SOAP integrations.
https://www.learnnowlab.com/rest-integration/
Regards,
Suresh.
Suresh.