This document provides various examples of connecting to a ServiceNow REST API from edgeCore. It is written against ServiceNow version Istanbul.
Please see the following link as needed for ServiceNow REST API documentation:
Instance REST API Explorer:
Access to the ServiceNOW REST API is protected by Basic Authentication.
cURL reference authentication request
curl “https://instance.service-now.com/api/now/table/incident?sysparm_limit=10″ \ –request GET \ –header “Accept:application/json” \ –user ‘admin’:'<adminpw>’
edgeCore connects to the ServiceNow REST API using a Web Data Connection. An example Connection Configuration for the ServiceNow REST API is presented below:
edgeCore can also make REST API calls to the REST API utilized by the ServiceNow web UI. To do so, copy the ServiceNowRESTSso.js file to the edgeCore <Install_Home>/webrules/generic/sso/ directory. When creating a connection to ServiceNow, set the SSO Handler to ServiceNowRESTSso.
ServiceNow provides both a supported and unsupported REST API for data requests. The unsupported REST API is used by the native ServiceNow web UI.
An example Connection Configuration for the ServiceNow Web UI REST API is presented below:
edgeCore makes requests to the ServiceNow REST API using the JSON Feed. Below are defaults for all ServiceNow Feed configuration properties unless otherwise specified:
Listed below are a series of sample JSON Feed Configurations that make requests to the supported ServiceNow REST API:
Listed below are a series of sample JSON Feed Configurations that make requests to the unsupported ServiceNow REST API: