Answer
/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 Service Cloud 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
- application/json
- application/xml
-
answerId: integer
The Id of the answer that user clicked
-
highlightFlag: boolean
Whether the service should do sentence highlighting on the returned answer.
-
highlightInfo(optional): string
The highlightInfo
-
pdfFlag(optional): boolean
The pdfFlag
-
priorTransactionId: integer
This ID relates to the current result set. This includes the displayed results plus any result up to the max number of results, as defined in the search configuration. If the request is for pagination or navigation, it applies pagination or navigation only to the current result set and doesn't retrieve new results.
-
trackClickFlag: boolean
Whether the service should track the click or not.
-
trackedUrl(optional): string
The exact URL that should be tracked
-
unstructuredFlag(optional): boolean
The unstructuredFlag
object
SearchSession
-
baseURL(optional):
string
Base URL
-
ccaInfo(optional):
object CCAInfo
Title:
CCAInfo
-
clientInfo(optional):
object ClientInfo
Title:
ClientInfo
-
domainGroup(optional):
string
The domain group to use for this request
-
facetPriorTransactionId(optional):
integer
FacetPriorTransactionId
-
isDeflection(optional):
boolean
Is this request an attempt to deflect
-
locale(optional):
string
locale of the request
- navigationApplicationId(optional): string
-
pageSize(optional):
integer
The maximum number of search results to be displayed in the results page. If a value is not specified by the client, then the default value is used.
-
querySource(optional):
string
The query source for this request
-
requestSource(optional):
string
Request Source
-
resultLocales(optional):
string
A comma separted list of the desired resulting locales
-
segment(optional):
string
The analytics segment to associate with this request
-
session(optional):
string
Session Node
-
subject(optional):
string
The subject/vertical to use for this request
-
transactionId(optional):
integer
TransactionId
-
uiMode(optional):
string
The UI mode for this request
object
CCAInfo
-
answerSolutionList(optional):
string
Answer Solution List
-
caseDescription(optional):
string
Case Description
-
connected(optional):
boolean
Connected
-
contentIds(optional):
string
ContentIds
-
extSolutionList(optional):
string
External Solution List
-
name(optional):
string
Name
-
SRKey(optional):
string
SRKey
-
system(optional):
string
System
-
types(optional):
string
Types
object
ClientInfo
-
address(optional):
string
Address
-
agentAddress(optional):
string
Agent Address
-
cookies(optional):
string
Cookies
-
extSessionId(optional):
string
External Session Id
-
host(optional):
string
Host
-
referrer(optional):
string
Referrer URL
-
requestAttributes(optional):
array requestAttributes
list of Map Entries
-
requestHeaders(optional):
array requestHeaders
list of Map Entries
-
requestParameters(optional):
array requestParameters
list of Map Entries
array
-
Array of:
object MapEntry
Title:
MapEntry
array
-
Array of:
object MapEntry
Title:
MapEntry
array
-
Array of:
object MapEntry
Title:
MapEntry
object
MapEntry
-
key(optional):
string
Key Name
-
value(optional):
string
Value
Response
- application/json
- application/xml
200 Response
object
Message
-
documentType(optional):
string
Answer Document Type
-
HttpPassThrough(optional):
string
HttpPassthrough
-
priorTransactionId(optional):
integer
Prior TransactionId
-
session(optional):
string
Session Node
-
title(optional):
string
Answer Title
-
transactionId(optional):
integer
TransactionId
-
url(optional):
string
Answer URL
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\","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" }