Christopher_Mal
ServiceNow Employee
ServiceNow Employee

Attached is the REST Plugin I promised early this morning. I have not implemented the DELETE and PUT functionality yet, but GET and POST work. This is a v1.0 release, so before the hate mail starts coming in, I am offering this update set as a good will offering to the community. For those of you that know me, I love the open source model. Sharing information and knowledge is how we progress. With that said, if anyone has any improvements please let me know. I have spotted several issues already, so expect a new version in the future. For those of you that want to get your hands dirty have a go at it.

After the update set is applied you will see a Rest Message module (very similar to and located under the SOAP Message module). This module was designed to work very similar to the SOAP Message when incorporating it in other scripts. I didn't want to shift paradigms since most of us are already familiar with how SOAP Message functions.

Here are the steps for sending your first Restful Http Get request:
Step 1: Click on the ReST Message module in the left navigation
Step 2: Click the New button at the top of the form
Step 3: Add this data to the form -
Name Stock Quote Get
Base URL http://www.webservicex.net/stockquote.asmx
Service URL http://www.webservicex.net/stockquote.asmx/GetQuote
Port 80
Request Type GET
Step 4: Click New in the Rest Message Parameters Related List
Step 5: Add this data to the Rest Message Parameters form
Name symbol
Value IBM
Step 6: Click Update
Step 7: Click "Test" in the Related Links section

Results:
You will see the GET request and the XML response for that given HTTP request.

Post will follow the same steps. The only difference is you will not see a request for the POST, but the XML response will populate the REST Message Test list.

That is all I have for the community this week. I'm going to go catch some rays in this beautiful weather I am having. Cheers.

3 Comments