- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 11:44 AM - edited 01-25-2024 11:46 AM
Hi,
I have tried the following approach to filter my API call using short description, but it was not working properly. its the same format on what i see when saving the query from the UI. Any ideas on how to make it work? Wanted to filter short descriptions that either contains the word password or access
incident?sysparm_limit=2^short_descriptionLIKEpassword^ORshort_descriptionLIKEaccess
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 02:06 PM
Hi, REST Table API calls utilize the 'spam_query' parameter for filtering data and this field takes an encoded query,
Table API | ServiceNow Developers
Meaning your query would look like something like
Encoded query
short_descriptionLIKEpassword^ORshort_descriptionLIKEaccess
REST message
/api/now/table/incident?sysparm_query=short_descriptionLIKEpassword%5EORshort_descriptionLIKEaccess&sysparm_limit=10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 02:06 PM
Hi, REST Table API calls utilize the 'spam_query' parameter for filtering data and this field takes an encoded query,
Table API | ServiceNow Developers
Meaning your query would look like something like
Encoded query
short_descriptionLIKEpassword^ORshort_descriptionLIKEaccess
REST message
/api/now/table/incident?sysparm_query=short_descriptionLIKEpassword%5EORshort_descriptionLIKEaccess&sysparm_limit=10