Calling ServiceNow AI search through REST API
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 01:46 AM
Hi guys, has anyone experience with calling ServiceNow AI search through REST API ? We are struggling to understand how to provide correct parameters into out of the box function "search" in Script Include AISASearchUtilSNC. We are struggling how to provide facetFilters and searchFilters in correct format. There is no documentation available anywhere.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
const SEARCHCONTEXT = // now/nav/ui/classic/params/target/sys_search_context_config_list.do (pick one). I built my own to only return certain types of data
const body = {
searchTerm: query,
searchContextConfigId: SEARCHCONTEXT,
rpSysId: RPSYSID,
disableAllSuggestions: false, // keep suggestions / ranking logic
disableSpellCheck: false // allow typo correction
};
const resp = await this.http.post(`/api/now/aisa/search`, body);