Rest API query filter not returning proper results

ktmbdev
Giga Contributor

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?

4 REPLIES 4

kps sumanth
Mega Guru

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.

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.

 

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

Apologies, i should have been more clear. I needed an output like this.

 

Ex. My user resets the password today