Rest API query filter not returning proper results
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 08:41 AM
Hi,
I was trying to extract incident tickets using short description that have user (any other characters/words) password
using this filter setup
sysparm_query=short_descriptionLIKEuser%password
It was returning results that is not even on that category. Do i need to add more to the query filter to make it work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 08:49 AM
Hello @ktmbdev ,
You can use below query to get those Incidents.
sysparm_query=short_descriptionLIKEuser^short_descriptionLIKEpassword
Please mark this Accepted if this worked.
Thanks,
Sai.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 09:01 AM
Thanks for the response. The result for this is also returning description that only have passwords
I would like to only have like this. Ex. user resets the password.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 09:06 AM
Hello @ktmbdev ,
If I am understanding your requirement correctly, you need Incidents which contains keyword "user" anywhere in the description but the description always ends with password. If yes then you can user below query.
sysparm_query=short_descriptionLIKEuser^short_descriptionENDSWITHpassword
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 09:14 AM
Apologies, i should have been more clear. I needed an output like this.
Ex. My user resets the password today
