Using ServiceNow SOAP and REST APIs With Demo Sandbox Environment
Using ServiceNow SOAP and REST APIs With Demo Sandbox Environment
Basic Concepts
ServiceNow specializes in IT Service Management based on ITIL standards. IT
service management (ITSM) refers to the entirety of activities directed by
policies, organized and structured in processes and supporting procedures that
are performed by an organization or part of an organization to plan, deliver,
operate and control IT services offered to customers.
Create Record
POST https:// <service-now-instance-name>/api/now/table/{tableName}
Modify Record
PUT https:// <service-now-instance-name>/api/now/table/{tableName}/{sys_id}
Delete Record
DELETE https:// <service-now-instance-name>/api/now/table/{tableName}/
{sys_id}
All ServiceNow demo instances are reset every 24 hours. So all the changes that
you make to these instances will be reset every 24 hours.
2.
3.
4.
5.
6.
7.
8.
getRecords
get
insert
insertMultiple
update
deleteRecord
deleteMultiple
For detailed information about sample SOAP Envelope requests and responses
please refer to following link - http://wiki.servicenow.com/index.php?
title=SOAP_Direct_Web_Service_API
Use of SOAPAction Header Field
SOAPAction header field needs to be set on the request for all requests made
using SOAP. Its value is equivalent to the name of the operation being executed.
For example in case of insert operations the value of SOAPAction header would
be insert.
For more details about request parameters and response refer to the following
url - http://wiki.servicenow.com/index.php?title=Table_API
Using Templates
ServiceNow allows using templates for creating entities like change, incident etc.
A template allows creating any entity with pre-defined values of certain
attributes for that entity. Lets take an example of Change. Refer to attached
screenshot.
Here you can see that in the background there is a Create Change form saved
with some values. One can save this is a template as shown above.
All the values are separated by ^ character. This string has to be parsed and
values for different attributes have to be fed in create change request.