Quantcast
Channel: Service-Now | John Andersen
Viewing all articles
Browse latest Browse all 82

ServiceNow REST API tool

$
0
0

While ServiceNow doesn’t come with a standards based REST API, it does provide a API that can be leveraged by REST based libaries and clients. The current ServiceNow REST API is available through the “JSON Web Service” plugin and is documented on the wiki.

The plugin format has several rules that are a bit hard to keep straight. Therefore, I have created a JSON RESTful POST tool to help people who develop integrations into ServiceNow through the REST API. In order to access this tool, browse to “RESTful POST Tool for ServiceNow“. (Tools->ServiceNow->RESTful POST Tool for ServiceNow).

REST Tool Templates

At the top of the tool, I have created a number of templates that demonstrate the functionality that is available through the API.

Screenshot_3_11_13_2_36_PM

In order to use one of the templates, click on the desired button and notice the fields that are populated. Modify the fields to match your instance information as well as the query and data you need to set.

Rest tool response parts

Once you submit your settings from the tool, you are shown the response that ServiceNow provided with the corresponding RESTful POST. In this case, you see the details of the Problem ticket that was created.

REST Tool Code Samples

Below the HTTP components, the tool displays sample code snippets in a variety of programming languages that would generate the very same REST call that you made through the tool. This will allow you to copy and paste the segment of code and incorporate it into your tool that will be responsible for consuming the web service. Please note, that while there are some javascript examples, browsers may limit your posting ability to protect you from Cross Site Scripting attacks.

Below the POST and Sample Code information, the tool is displayed once again with the same settings you used in the last POST. You can click on another template button and perform another operation if you wish.

My hope is that with this handy tool in your back pocket, you will be ready to embark on the adventure of interacting with a ServiceNow instance using REST-based clients. The POST generator should save you hours of effort in understanding the API and coding up the necessary components for integrating with ServiceNow RESTfully.

For a complete demo, view my video at: ServiceNow REST API Tool


Viewing all articles
Browse latest Browse all 82

Trending Articles