Answer

post

/srt/api/v1/search/answer

This method returns a record of clicks on answer results with sentence highlighting which helps you find the section that matches your search query. This method also provides a click-through URI, highlighted document, and action tracking for analytics and billing purposes. All parameters in the Search request are mandatory values.

Note: If you are using Oracle B2C Service Knowledge Advanced, you must pass the interfaceId parameter in the kmauthtoken header.

Example URI

The example URI for this method is as follows:

  • http://<SEARCH_REST_API_HOST>/srt/api/v1/search/answer?priorTransactionId=12345&answerId=16777216&trackClickFlag=true&highlightFlag=true

    The request provides a record of clicks on answer results for the specified transaction ID. The result list appears with sentence highlighting.

Request

Supported Media Types
Query Parameters
Body ()
The session object which stores the content of a session.
Root Schema : SearchSession
Type: object
Title: SearchSession
Show Source
Nested Schema : CCAInfo
Type: object
Title: CCAInfo
Show Source
Nested Schema : ClientInfo
Type: object
Title: ClientInfo
Show Source
Nested Schema : requestAttributes
Type: array
list of Map Entries
Show Source
Nested Schema : requestHeaders
Type: array
list of Map Entries
Show Source
Nested Schema : requestParameters
Type: array
list of Map Entries
Show Source
Nested Schema : MapEntry
Type: object
Title: MapEntry
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Message
Type: object
Title: Message
Show Source
Back to Top

Examples

The following example shows how to create a record of clicks on answer results with sentence highlighting by submitting a post request on the REST resource using cURL.

cURL Command

curl -X "POST" "http://<SEARCH_REST_API_HOST>/srt/api/latest/search/answer"

Example of Request Header

The following shows an example of the request header.

-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"interfaceId\":\"1\",\"interactionIdGenerated\":\"true\",\"knowledgeInteractionId\":\"Z9X3D85Ka8C\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9"}" \
-H "Accept: application/json"

Example of Request Body

The following shows an example of the request body in JSON format.

{
  "session" : "SESSION_VALUE",
  "transactionId" : -470886747,
  "facetPriorTransactionId" : 0,
  "baseURL" : "BASEURL_VALUE",
  "locale" : "LOCALE_VALUE",
  "resultLocales" : "RESULTLOCALES_VALUE",
  "domainGroup" : "DOMAINGROUP_VALUE",
  "navigationApplicationId" : "NAVIGATIONAPPLICATIONID_VALUE",
  "segment" : "SEGMENT_VALUE",
  "querySource" : "QUERYSOURCE_VALUE",
  "uiMode" : "UIMODE_VALUE",
  "requestSource" : "REQUESTSOURCE_VALUE",
  "subject" : "SUBJECT_VALUE",
  "isDeflection" : true,
  "clientInfo" : {
    "agentAddress" : "AGENTADDRESS_VALUE",
    "extSessionId" : "EXTSESSIONID_VALUE",
    "referrer" : "REFERRER_VALUE",
    "cookies" : "COOKIES_VALUE",
    "address" : "ADDRESS_VALUE",
    "host" : "HOST_VALUE",
    "requestHeaders" : [ {
      "key" : "KEY_VALUE",
      "value" : "VALUE_VALUE"
    } ],
    "requestParameters" : [ {
      "key" : "KEY_VALUE",
      "value" : "VALUE_VALUE"
    } ],
    "requestAttributes" : [ {
      "key" : "KEY_VALUE",
      "value" : "VALUE_VALUE"
    } ]
  }
}

Example of Response Body

The following shows an example of the response body in JSON format.

{
  "session" : "SESSION_VALUE",
  "transactionId" : 1001427731,
  "priorTransactionId" : -802261982,
  "title" : "TITLE_VALUE",
  "url" : "URL_VALUE",
  "documentType" : "DOCUMENTTYPE_VALUE"
}
Back to Top