Initial screen

post

/srt/api/v1/search/initialScreen

This method creates a new search session and returns the ID of the session. All subsequent requests must use the returned session ID as their session attribute to perform and track the user's actions.

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/initialScreen

    The request creates a new search session and returns a session ID.

Request

Supported Media Types
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 : GIML
Type: object
Title: GIML
Show Source
Nested Schema : SearchConstraints
Type: object
Title: SearchConstraints
Show Source
Nested Schema : Query
Type: object
Title: Query
Show Source
Nested Schema : RequestResult
Type: object
Title: RequestResult
Show Source
Nested Schema : Spellchecked
Type: object
Title: Spellchecked
Show Source
Nested Schema : corrections
Type: array
list of SuggestionBO
Show Source
Nested Schema : Correction
Type: object
Title: Correction
Show Source
Nested Schema : suggestions
Type: array
list of SuggestionBO
Show Source
Nested Schema : Suggestion
Type: object
Title: Suggestion
Show Source
Nested Schema : facets
Type: array
To Many Relationship to child facets
Show Source
Nested Schema : results
Type: array
list of textElements
Show Source
Nested Schema : FacetResultNode
Type: object
Title: FacetResultNode
Show Source
Nested Schema : children
Type: array
To Many Relationship to child facets
Show Source
Nested Schema : ComponentResult
Type: object
Title: ComponentResult
Show Source
Nested Schema : resultItems
Type: array
list of textElements
Show Source
Nested Schema : ResultItem
Type: object
Title: ResultItem
Show Source
Nested Schema : relatedIds
Type: array
List of Ids of the answers related to this answer
Show Source
Nested Schema : textElements
Type: array
list of textElements
Show Source
Nested Schema : TextElement
Type: object
Title: TextElement
Show Source
Nested Schema : snippets
Type: array
Show Source
Nested Schema : Snippet
Type: object
Title: Snippet
Show Source
Back to Top

Examples

The following example shows how to create a search session and return the session ID 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/initialScreen"

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.

{
  "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
          } ]
        },
        "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
}
Back to Top