12-12-2012 11:11 AM
Hi, I'm coming up to speed on the REST API documented in "Cisco Service Portal Integration Guide". While working through some sample requests to get a feel for things I came across an issue fetching a catagory by name.
The guide has this sample in for "Get consumer service category by Name":
http://<ServerURL>/RequestCenter/nsapi/definition/categories/name/<categoryName>
A response from definition/categories?catalogType=offeringCatalog included this:
<category>
<categoryId>2</categoryId>
<categoryName><b>Service Offerings</b></categoryName>
The category name is "<b>Service Offerings</b>" and this is giving me fits. I've tried encoding a few ways:
definition/categories/name/Service%20Offerings
definition/categories/name/%3Cb%3EService%20Offerings%3C%2Fb%3E
I end up with HTTP/1.1 400 Bad Request or HTTP/1.1 404 Not Found.
This exact request may not be required for us, but I need to master the API and do not understand how to plug in a name as documented. Can I get some help with this example? Also, if I come across other issues or have more questions, should I just keep using this discussion? I'm not certain of the policy.
---
Adding another example of similar problem.
---
The doc says a service item may be fetched by name as follows:
http://<ServerURL>/RequestCenter/nsapi/serviceitem/<serviceItemName>
I am getting HTTP/1.1 404 Not Found for this request:
http://<ServerURL>/RequestCenter/nsapi/serviceitem/a6803a03-3c4d-db5b-8994-da383b9d8836
The service item name comes from a current service item in UI:
My goal is to get the service item details visible in UI using REST.
Thanks!
Solved! Go to Solution.
12-12-2012 01:10 PM
For the latter case, the Service Item Name is actually the name of the table, such as SiVirtualMachine.
You're looking at Service Item definitional information, not individual service items.
12-12-2012 01:10 PM
For the latter case, the Service Item Name is actually the name of the table, such as SiVirtualMachine.
You're looking at Service Item definitional information, not individual service items.
12-12-2012 03:20 PM
Latest block is how to filter. I wish the doc had more literal examples instead of "serviceitemsubscription/
Given the following snippet from serviceitemsubscription response with no filter:
...
...
...
How can I only fetch SiHosts or Hosts service items (not the real goal, but same approach applies to SiVirtualMachines). The following attempts all fail:
serviceitems/serviceitemsubscription/logicName%3DSiHosts
serviceitems/serviceitemsubscription/logicName=SiHosts
serviceitems/serviceitemsubscription/name%3DHosts
serviceitems/serviceitemsubscription/name=Hosts
I'm not sure what are valid column names and going by the XML element names. Can you help me with syntax to only get service items of interest based on Si type name?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide