Ask question
/srt/api/v1/search/question
This method returns a set of search results for the specified question.
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/question?question=how+do+i+upgrade+my+device
The request returns a set of search results for the specified question.
http://<SEARCH_REST_API_HOST>/srt/api/v1/search/question?question=how+do+i+upgrade+my+device&facet=Collections.OKKB-FAQ
The request returns a set of pre-filtered search results for the specified content-type, FAQ.
A session object stores the session information of a transaction. The session information includes information about the current result set, page tracking, and navigation activity. The implementing agent must store and return the session information back and forth during runtime for each subsequent request.
Facets are a way of categorizing the content. They help you categorize information to enhance the search capabilities. Facet based search allows you to apply multiple filters while searching for information. If you are an author in Information Manger console, you can assign categories to the content and find the facets assigned to the content by referring the assigned categories.
Request
- application/json
- application/xml
-
facet(optional): string
The facet or category which should be used in narrowing down the search results.
-
pageSize(optional): integer
Integer value, the number of results a page should have.
-
question: string
The question asked or the search made(by the end user).
-
startOverFlag: boolean
Should search state be reset to start all over from beginning.
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
GIML
-
constraints(optional):
object SearchConstraints
Title:
SearchConstraints
-
priorTransactionId(optional):
integer
Prior TransactionId
-
query(optional):
object Query
Title:
Query
-
results(optional):
object RequestResult
Title:
RequestResult
-
session(optional):
string
Session Node
-
transactionId(optional):
integer
TransactionId
object
SearchConstraints
-
baseURL(optional):
string
BaseURL of the SearchConstraints object
-
domainGroup(optional):
string
DomainGroup of the SearchConstraints object
-
language(optional):
string
Language of the SearchConstraints object
- navigationApplicationId(optional): string
-
querySource(optional):
string
QuerySource of the SearchConstraints object
-
requestSource(optional):
string
RequestSource of the SearchConstraints object
-
resultLanguages(optional):
string
ResultLanguages of the SearchConstraints object
-
segment(optional):
string
Segment of the SearchConstraints object
-
subject(optional):
string
Subject of the SearchConstraints object
-
uiMode(optional):
string
UiMode of the SearchConstraints object
object
Query
-
interactive(optional):
boolean
Interactive Spellchecking enabled
-
original(optional):
string
Original Question
-
paraphrase(optional):
string
Paraphrased Question
-
spellchecked(optional):
object Spellchecked
Title:
Spellchecked
object
RequestResult
-
facets(optional):
array facets
To Many Relationship to child facets
-
message(optional):
string
-
messageCode(optional):
string
-
results(optional):
array results
list of textElements
object
Spellchecked
-
corrections(optional):
array corrections
list of SuggestionBO
array
-
Array of:
object Correction
Title:
Correction
object
Correction
-
correction(optional):
string
-
suggestions(optional):
array suggestions
list of SuggestionBO
-
word(optional):
string
array
-
Array of:
object Suggestion
Title:
Suggestion
array
-
Array of:
object FacetResultNode
Title:
FacetResultNode
array
-
Array of:
object ComponentResult
Title:
ComponentResult
object
FacetResultNode
-
children(optional):
array children
To Many Relationship to child facets
-
count(optional):
integer
FacetResultNode of the FacetResultNode object
-
desc(optional):
string
FacetResultNode of the FacetResultNode object
-
id(optional):
string
FacetResultNode of the FacetResultNode object
-
incomplete(optional):
boolean
FacetResultNode of the FacetResultNode object
-
inEffect(optional):
boolean
FacetResultNode of the FacetResultNode object
-
showLink(optional):
boolean
FacetResultNode of the FacetResultNode object
-
tempSelect(optional):
boolean
FacetResultNode of the FacetResultNode object
array
-
Array of:
object FacetResultNode
Title:
FacetResultNode
array
-
Array of:
object ResultItem
Title:
ResultItem
object
ResultItem
-
answerId(optional):
integer
Id of this answer
-
clickThroughLink(optional):
string
-
dateModified(optional):
string(date-time)
The date when the Article was last modified
-
docId(optional):
integer
Id of the document corresponding to this answer
-
fileType(optional):
string
type of file that the result item is from, if applicable
-
globalAnswerId(optional):
string
Global AnswerId of this answer
-
highlightedLink(optional):
string
-
link(optional):
string
- relatedIds(optional): array relatedIds
-
rule(optional):
string
rule for result item
-
score(optional):
number
-
similarResponseLink(optional):
string
-
textElements(optional):
array textElements
list of textElements
-
title(optional):
object TextElement
Title:
TextElement
-
type(optional):
string
type of result item
array
-
Array of:
object TextElement
Title:
TextElement
object
TextElement
-
snippets(optional):
array snippets
-
type(optional):
Allowed Values:
[ "UNSTRUCTURED", "STRUCTURED", "STRING", "URL", "HTML" ]
Text element type String, URL, HTML -
url(optional):
string
Examples
The following example shows how to create a question in the repository 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/question"
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.
{ "constraints" : { "baseURL" : "BASEURL_VALUE", "language" : "LANGUAGE_VALUE", "resultLanguages" : "RESULTLANGUAGES_VALUE", "domainGroup" : "DOMAINGROUP_VALUE", "navigationApplicationId" : "NAVIGATIONAPPLICATIONID_VALUE", "segment" : "SEGMENT_VALUE", "querySource" : "QUERYSOURCE_VALUE", "uiMode" : "UIMODE_VALUE", "requestSource" : "REQUESTSOURCE_VALUE", "subject" : "SUBJECT_VALUE" }, "results" : { "results" : [ { "name" : "NAME_VALUE", "pageNumber" : 119012499, "pageMore" : -1787984382, "pageStart" : 1011298310, "score" : 0.8950256205517777, "pageSize" : -356445925, "unshownResults" : -567000158, "totalResults" : 964064210, "resultItems" : [ { "rule" : "RULE_VALUE", "type" : "TYPE_VALUE", "fileType" : "FILETYPE_VALUE", "answerId" : -2113305261, "docId" : -1406261280, "score" : 0.0, "title" : { "url" : "URL_VALUE", "type" : "HTML", "snippets" : [ { "text" : "TEXT_VALUE", "level" : 1829155447 } ] }, "dateModified" : "2018-08-15T14:22:19-0600", "link" : "LINK_VALUE", "clickThroughLink" : "CLICKTHROUGHLINK_VALUE", "similarResponseLink" : "SIMILARRESPONSELINK_VALUE", "highlightedLink" : "HIGHLIGHTEDLINK_VALUE", "textElements" : [ { "url" : "URL_VALUE", "type" : "UNSTRUCTURED", "snippets" : [ { "text" : "TEXT_VALUE", "level" : -1117285219 } ] } ] } ] } ] }, "session" : "SESSION_VALUE", "transactionId" : -1551467838, "priorTransactionId" : 28680311 }