cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1440
Views
0
Helpful
6
Replies

Consuming RESTful Web Services/API

lim.park01
Level 1
Level 1

My understanding is that HTTP/WS adapter provided out-of-the-box supports only SOAP web services.

Has anyone worked to integrate/work with RESTful web services from Cisco Prime Service Catalog?

With many if not majority of 3rd party applications and systems offering REST based web services and APIs, any plans to provide a build-in adapter to work with RESTful web services?

Ideally, I would also like to see ability to call service link or REST web services directly from within the service form also (like data retrieval rule, but do REST operation or call service link) to use the returning data/information on the service form directly.

6 Replies 6

derevan
Level 4
Level 4

You can call REST APIs directly from a service form using JavaScript. It's actually pretty straight-forward. Let me know if you would like me to dig up some examples.

Could you post some examples if you can?

How about external tasks via service link?

Here is a very basic example (refer to the following http://www.w3schools.com/xml/xml_http.asp).

It does not have to be XML. It can be JSON as well.

if (window.XMLHttpRequest) {

   // code for IE7+, Firefox, Chrome, Opera, Safari

   xmlhttp = new XMLHttpRequest();

} else {// code for IE6, IE5

    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

}

xmlhttp.open("GET", << YOUR REST API URL HERE >>, false);

xmlhttp.send();

xmlDoc = xmlhttp.responseXML; // or JSON.parse(xmlhttp.responseText);

if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {

  << YOUR CODE TO PARSE AND DO WHAT YOU WANT WITH THE RESPONSE

}

PS. I am not aware of a direct way to make REST API calls via ServiceLink. We use the Process Orchestrator during service delivery for this sort of thing.

Ok thanks for your help Derek.

One of the 3rd party orchestration tool we are trying to work with actually only supports RESTful web services, hence the question...

Thanks.

Hi Lim,

Not sure if it would help with your project - starting with version 10.0 Service Catalog would support both POST and GET calls in Service Link. We have enhanced support for RESTful APIs in this release.

10.0 FCS is just around the corner. Perhaps this is something you could use in your project? You customers would also love new UI. There are many other features in the release as well.

Thanks,
Max.

Review Cisco Networking for a $25 gift card