john_andersen
Tera Guru

find_real_file.png

REST based web services have been increasing in popularity. I get asked more and more how people can POST data into ServiceNow with REST-based calls using JSON. This functionality has been in the product for a long time, but is often overlooked. There is a plugin that is will need to be enabled in order to do this. It is the "JSON Web Services" plugin.

To get a good feel for the JSON based RESTful capabilities coming into ServiceNow, please review the ServiceNow documentation:
http://wiki.servicenow.com/index.php?title=JSON_Web_Service

This week I took some time to create a ServiceNow REST tool that allows you to connect to any instance that has the JSON Web Services plugin enabled. You can perform the same functions to tables or web service import sets that you can do with SOAP Web Services. However, it is a lot simpler and you don't have to deal with XML.

My tool also provides template buttons for the supported functions. If you click on those buttons, it will fill in the appropriate fields with sample data that you can modify to suit your needs.

Once you submit the restful post, the tool will show you the URL that was used, the credentials that were passed, and the Content-Body that was submitted. This gives you a good way to test the RESTful web services before you put them to actual code.

In the future, I may have the response show sample code snippets for various languages, but that is a project for another day.

Have fun with the tool and let me know if you run into any problems!

Check out the tool at:
http://www.john-james-andersen.com/hidden/sn-rest-post-tool

6 Comments