This integration allows bi-directional communication between StackStorm and ServiceNow REST API
This action provides the basic REST primitives necessary to allow communication between StackStorm and ServiceNow. Ideally, this integration will be consumed in a site-specific integration pack that defines actions to specific ServiceNow specific business logic.
ServiceNow provides two videos to demonstrate how to setup Inbound and Outbound Web Service integrations.
- Inbound Integration - https://www.youtube.com/watch?v=EhxgEECd7mQ
- Outbound Integration - https://www.youtube.com/watch?v=WeeDW_iRM8k
An example pack has been included in this pack to show the integration of ServiceNow with these two integration examples.
Copy the example configuration servicenow.yaml.example to
/opt/stackstorm/configs/servicenow.yaml and edit as required. It should contain:
instance_name- Upstream Instance Name (e.x.: stackstorm)username- Username of service accountpassword- Password of service accountcustom_params- Common supported parameters that will be passed to all calls. Example
Note : When modifying the configuration in /opt/stackstorm/configs/ please
remember to tell StackStorm to load these new values by running
st2ctl reload --register-configs
In your ServiceNow Outbound integration, REST endpoints accept JSON payloads. In addition, you must specify the following headers in your payload request:
Accept: application/json
Content-Type: application/json
servicenow.approve_changeSet a change request number to approvedservicenow.assign_incident_toassign an incident to a usernameservicenow.get- Get an entry using a dictionary query from a ServiceNow Tableservicenow.get_non_structured- Get an entry using a string query from a ServiceNow Tableservicenow.get_incidents_assigned_to- Get incidents assigned to a particular userservicenow.update- Update an entry in a ServiceNow Tableservicenow.set_incident_owner- Set the owner of an incident recordservicenow.insert- Insert an entry to a ServiceNow Tableservicenow.delete- Delete an entry from a ServiceNow Tableservicenow.create_record- Create an entry to a ServiceNow Tableservicenow.get_attachments- Gets the metadata of all attachments to a ServiceNow Tableservicenow.get_attachment- Gets the metadata of an attachment on a ServiceNow Tableservicenow.upload_attachment- Uploads an attachment to an entry on a ServiceNow Table