- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2016 10:22 AM
I'm trying to create a REST GET query using the sysparm_query parameter matching a subset of a field name, e.g.
to match all records in cmdb_ci_server where the OS has 'Windows' in it. Obviously this doesn't work.
However, if I search for the full name, e.g.
...&os=Windows 2012 Datacenter
it matches correctly, but in this case I'm trying to match all versions of Windows.
Is there a way to do this? Or would I better off to pull down all records and filter them client side?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2016 10:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2016 12:38 PM
I have found a couple of caveats to using Copy Query to generate URLs for use with cURL:
- Any spaces in the query string must be converted to '%20'
- Some extended properties are collapsed in the Service Now web interface and need to be expanded to the fully qualified field name. i.e. 'Manufacturer' needs to be expanded to 'manufacturer.name'
But this allowed me to condense a 50 line Powershell script into a 1 line cURL statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2016 11:28 AM
Nevermind, Figured out that 'osCONTAINSWindows^cpu_nameCONTAINSamd' works.