Full-Text Search
5 min
executes a search based on the keyword in single or in multiple business objects search in single business object executes search in the defined specific single business object search in single business object example here is an example to execute a search based on the search keyword in an incident business object url https //{tenant url}/api/rest/search/fulltext \<font color="#ffffff">method\</font> post header name authorization jwt token/session key/rest api key status code 200 request payload click to view the request payload { "text" "printer", "objecttype" "incident", "top" 20 , "skip" 20 } \<font color="#ffffff">response payload\</font> click to view the response payload { "data" \[ { "incidentnumber" 10005, "subject" "the printer near user's desk small like it is very hot ", "recid" "dab00e0c24454b07b0a355420d6b0e1c" }, { "incidentnumber" 10021, "subject" "the printer near user's desk small like it is very hot ", "recid" "efaa6661bb3e49deb14a1aeb50b9becb" }, { "incidentnumber" 10081, "subject" "printer is jamming with labels ", "recid" "d9c47bb249b7443c866eb9e7939eca54" }, { "incidentnumber" 10155, "subject" "printer is jamming with labels ", "recid" "45cfee518cd74e2cac59a5d94abbc008" }, { "incidentnumber" 10205, "subject" "check the printer setup in the hr dept", "recid" "81dee4064d84437ca902f00b4879a81f" } ], "metadata" \[ { "fieldref" "incidentnumber", "displayname" "incident id", "datatype" 6 }, { "fieldref" "subject", "displayname" "summary", "datatype" 1 }, { "fieldref" "recid", "displayname" "recid", "datatype" 4 } ], "totalrows" 20, "keyref" "recid", "searchtext" "printer" } unsuccessful responses search in single business object empty search parameter (keyword) scenario executing a search without entering a search keyword https //{tenant url}/api/rest/search/fulltext header name authorization sessionkey code ism 4000 description bad request message "search keyword cannot be blank, provide a keyword and try again" \<font color="#ffffff">http status code\</font> 400 empty search parameter (business object type) scenario executing a search without defining the business object type in the request body https //{tenant url}/api/rest/search/fulltext header name authorization sessionkey code ism 4000 description bad request message "objecttype cannot be blank please provide the business object name in the objecttype field and try again" \<font color="#ffffff">http status code\</font> 400 search in multiple business objects executes search in multiple business objects search in multiple business object example the business objects on which search is executed is based on the search configurations here is an example to execute a search in multiple business objects url https //{tenant url}/api/rest/search \<font color="#ffffff">method\</font> post header name authorization sessionkey/rest api key status code 200 request payload click to view the request payload { "text" "phone" } \<font color="#ffffff">response payload\</font> click to view the request payload { "items" \[ { "title" "how to access my voicemail from my desk phone or cell?", "description" "accessing from your own cisco phone \r\ndial 1790 (or press the envelope button if you have a 7940 model)\r\nenter your pin followed by # \r\nstart listening to messages\r\npress 0 to return to main menu for more options, e g press 2 to record greetings as you wish", "tableref" "faq#", "objectid" "70aee924d22d487cb99d02b0de090305", "formname" "faq brief", "objecttype" "faq", "createddatetime" "may 9, 2007", "score" null, "numberoflines" 3, "\<category>k backingfield" null }, { "title" "network maintenance", "description" "scheduled maintenance will be peformed for all routers for apac region all network access, include phone, internet, and email, will be down the weekend of 11/2/2007 11/3/2007 and will resume 11/4/2007 ", "tableref" "announcement#", "objectid" "bd9fe5abb34d480abfadbc29e018f2a2", "formname" "announcement brief", "objecttype" "announcement", "createddatetime" "may 15, 2007", "score" null, "numberoflines" 3, "\<category>k backingfield" null } ], "totalrecords" 2, "errormessage" null } unsuccessful response search in multiple business objects empty search parameter (keyword) scenario executing a search without entering a search keyword https //{tenant url}/api/rest/search header name authorization sessionkey code ism 4000 description bad request message "search keyword cannot be blank, provide a keyword and try again" \<font color="#ffffff">http status code\</font> 400
