Search

This search RESTful API is used to get the search results suggested by Smart Analytics.

Request:

POST http://<SM Server Address>:13080/SM/9/rest/SmartAnalytics/1/action/search

An example of the request body:

{
  SmartAnalytics:{
    query:'mobile',
    start:1,
    count:100,
    filters:'{"Knowledge_Library":{"status":["external","internal"],"doctype":["howto"]},"Incident_Library":{}}',
    max_characters:500,
    startTag: '<_em_>',
    endTag: '</_em_>'

   }
}

Response example:

Note You can ignore the messages in the response as these messages are printed by the Restful framework.

{
  "@count": 2,
  "@start": "1",
  "Messages": [],
  "ResourceName": "SmartAnalytics",
  "ReturnCode": 0,
  "content": [
    {"SmartAnalytics": {
      "content": "ADJUST THE TIME AFTER WHICH <em>MOBILE<\/em> ENTERS THE SLEEP MODE. howto. How to adjust the time after which <em>mobile<\/em> enters the sleep mode in Android 4.2.2 Operating System.. To adjust the time after which <em>mobile<\/em>",
      "id": "KM0122",
      "title": "ADJUST THE TIME AFTER WHICH MOBILE ENTERS THE SLEEP MODE"
    }},
    {"SmartAnalytics": {
      "content": "Email receiving error when using <em>mobile<\/em> phone as email client.. Email receiving error when using <em>mobile<\/em> phone as email client.. report error about &#x27;connection fail&#x27; when attempt to connect to mail server..",
      "id": "IM10012",
      "title": "Email receiving error when using mobile phone as email client."
    }}
  ]
}