- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2017 11:54 AM
hi
We are on Helsinki. Can someone please help and show me how to add Not Equal to condition to REST API url?
Please see the url below. And I want to filter out sys_class_name = Hyper-V Server from the result set. (i.e. sys_class_name =! 'Hyper-V Server')
The way I have added it, doesn't work.
Please advise.
Thanks,
Rajan Mehta
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2017 01:34 PM
I'm not on my computer right now, so I don't know the system name of the host name field, but the easiest way to build your query is go to cmdb_ci_list.do in your instance. Then use the filter to add all of the conditions you want and verify your results are correct.
then right click the filter text and click copy query. This will copy the encoded query for you, and then you can put that right after sysparm_query= in your URL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2017 12:06 PM
Hi Rajan,
Provided link is not getting open, but i noticed that you are using equal not (=!) instead, please try Not Equal (!=). Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2017 01:00 PM
Hello Shishir,
I tried doing it that way, but still it doesn't filter.
Any idea.
Thanks,
Rajan Mehta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2017 12:08 PM
sysparm_query=sys_class_name!=cmdb_ci_hyper_v_server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2017 01:00 PM
Hello Jonathan,
I tried doing it that way, but still it doesn't filter.
Any idea.
Thanks,
Rajan Mehta
