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.
Example URI
The example URI for this method is as follows:
-  http://<SEARCH_REST_API_HOST>/srt/api/v1/search/initialScreenThe request creates a new search session and returns a session ID. 
Request
Supported Media Types
                - application/json
- application/xml
The session object which stores the content of a session.
                
                
                
                Root Schema : SearchSession
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        SearchSession- 
            baseURL: 
            string
            Base URL
- 
            ccaInfo: 
            object  CCAInfo
            
            Title:CCAInfo
- 
            clientInfo: 
            object  ClientInfo
            
            Title:ClientInfo
- 
            domainGroup: 
            string
            The domain group to use for this request
- 
            facetPriorTransactionId: 
            integer
            The ID that is set from the transactionId of a previous transaction to retain the facets. You can set the value of this ID to the transactionId of a previous transaction in the same session to retain the facets selected in a previous transaction. You must either set the value of the startOverFlag to false or omit the flag. Omitting the flag defaults to false. You can use the transactionIds from the most recent transaction or five previous transactions in the history to set facetPriorTransactionId of the current transaction. Note that the facetPriorTransactionId applies only to the /question endpoint.
- 
            isDeflection: 
            boolean
            Is this request an attempt to deflect
- 
            locale: 
            string
            locale of the request
- navigationApplicationId: string
- 
            pageSize: 
            integer
            Max results in this page
- 
            querySource: 
            string
            The query source for this request
- 
            requestSource: 
            string
            Request Source
- 
            resultLocales: 
            string
            A comma separted list of the desired resulting locales
- 
            segment: 
            string
            The analytics segment to associate with this request
- 
            session: 
            string
            Session Node
- 
            subject: 
            string
            The subject/vertical to use for this request
- 
            transactionId: 
            integer
            TransactionId
- 
            uiMode: 
            string
            The UI mode for this request
Nested Schema : CCAInfo
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        CCAInfo- 
            answerSolutionList: 
            string
            Answer Solution List
- 
            caseDescription: 
            string
            Case Description
- 
            connected: 
            boolean
            Connected
- 
            contentIds: 
            string
            ContentIds
- 
            extSolutionList: 
            string
            External Solution List
- 
            name: 
            string
            Name
- 
            SRKey: 
            string
            SRKey
- 
            system: 
            string
            System
- 
            types: 
            string
            Types
Nested Schema : ClientInfo
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        ClientInfo- 
            address: 
            string
            Address
- 
            agentAddress: 
            string
            Agent Address
- 
            cookies: 
            string
            Cookies
- 
            extSessionId: 
            string
            External Session Id
- 
            host: 
            string
            Host
- 
            referrer: 
            string
            Referrer URL
- 
            requestAttributes: 
            array  requestAttributes
            
            list of Map Entries
- 
            requestHeaders: 
            array  requestHeaders
            
            list of Map Entries
- 
            requestParameters: 
            array  requestParameters
            
            list of Map Entries
Nested Schema : requestAttributes
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arraylist of Map Entries
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  MapEntry
            
            Title:MapEntry
Nested Schema : requestHeaders
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arraylist of Map Entries
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  MapEntry
            
            Title:MapEntry
Nested Schema : requestParameters
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arraylist of Map Entries
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  MapEntry
            
            Title:MapEntry
Nested Schema : MapEntry
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        MapEntry- 
            key: 
            string
            Key Name
- 
            value: 
            string
            Value
Response
Supported Media Types
                - application/json
- application/xml
200 Response
OK.
                
                
                    Root Schema : GIML
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        GIML- 
            constraints: 
            object  SearchConstraints
            
            Title:SearchConstraints
- 
            priorTransactionId: 
            integer
            Prior TransactionId
- 
            query: 
            object  Query
            
            Title:Query
- 
            results: 
            object  RequestResult
            
            Title:RequestResult
- 
            session: 
            string
            Session Node
- 
            transactionId: 
            integer
            TransactionId
Nested Schema : SearchConstraints
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        SearchConstraints- 
            baseURL: 
            string
            BaseURL of the SearchConstraints object
- 
            domainGroup: 
            string
            DomainGroup of the SearchConstraints object
- 
            language: 
            string
            Language of the SearchConstraints object
- navigationApplicationId: string
- 
            querySource: 
            string
            QuerySource of the SearchConstraints object
- 
            requestSource: 
            string
            RequestSource of the SearchConstraints object
- 
            resultLanguages: 
            string
            ResultLanguages of the SearchConstraints object
- 
            segment: 
            string
            Segment of the SearchConstraints object
- 
            subject: 
            string
            Subject of the SearchConstraints object
- 
            uiMode: 
            string
            UiMode of the SearchConstraints object
Nested Schema : Query
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        Query- 
            interactive: 
            boolean
            Interactive Spellchecking enabled
- 
            original: 
            string
            Original Question
- 
            paraphrase: 
            string
            Paraphrased Question
- 
            spellchecked: 
            object  Spellchecked
            
            Title:Spellchecked
Nested Schema : RequestResult
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        RequestResult- 
            facets: 
            array  facets
            
            To Many Relationship to child facets
- 
            message: 
            string
            
- 
            messageCode: 
            string
            
- 
            results: 
            array  results
            
            list of textElements
Nested Schema : Spellchecked
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        Spellchecked- 
            corrections: 
            array  corrections
            
            list of SuggestionBO
Nested Schema : corrections
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arraylist of SuggestionBO
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  Correction
            
            Title:Correction
Nested Schema : Correction
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        Correction- 
            correction: 
            string
            
- 
            suggestions: 
            array  suggestions
            
            list of SuggestionBO
- 
            word: 
            string
            
Nested Schema : suggestions
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arraylist of SuggestionBO
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  Suggestion
            
            Title:Suggestion
Nested Schema : facets
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayTo Many Relationship to child facets
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  FacetResultNode
            
            Title:FacetResultNode
Nested Schema : results
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arraylist of textElements
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  ComponentResult
            
            Title:ComponentResult
Nested Schema : FacetResultNode
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        FacetResultNode- 
            children: 
            array  children
            
            To Many Relationship to child facets
- 
            count: 
            integer
            FacetResultNode of the FacetResultNode object
- 
            desc: 
            string
            FacetResultNode of the FacetResultNode object
- 
            id: 
            string
            FacetResultNode of the FacetResultNode object
- 
            incomplete: 
            boolean
            FacetResultNode of the FacetResultNode object
- 
            inEffect: 
            boolean
            FacetResultNode of the FacetResultNode object
- 
            showLink: 
            boolean
            FacetResultNode of the FacetResultNode object
- 
            tempSelect: 
            boolean
            FacetResultNode of the FacetResultNode object
Nested Schema : children
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayTo Many Relationship to child facets
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  FacetResultNode
            
            Title:FacetResultNode
Nested Schema : resultItems
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arraylist of textElements
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  ResultItem
            
            Title:ResultItem
Nested Schema : ResultItem
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        ResultItem- 
            answerId: 
            integer
            Id of this answer
- 
            clickThroughLink: 
            string
            The URL contains the file name with original encoding when the search result is an Content(IM) file attachment. Otherwise, the value is same as the URL parameter value.
- 
            dateModified: 
            string(date-time)
            The date when the Article was last modified 
- 
            docId: 
            integer
            Id of the document corresponding to this answer
- 
            fileType: 
            string
            type of file that the result item is from, if applicable
- 
            globalAnswerId: 
            string
            Global AnswerId of this answer
- 
            highlightedLink: 
            string
            
- 
            link: 
            string
            
- relatedIds: array relatedIds
- 
            rule: 
            string
            rule for result item
- 
            score: 
            number
            
- 
            similarResponseLink: 
            string
            
- 
            textElements: 
            array  textElements
            
            list of textElements
- 
            title: 
            object  TextElement
            
            Title:TextElement
- 
            type: 
            string
            type of result item
Nested Schema : textElements
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arraylist of textElements
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  TextElement
            
            Title:TextElement
Nested Schema : TextElement
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        TextElement- 
            snippets: 
            array  snippets
            
            
- 
            type: 
            
            Allowed Values:[ "UNSTRUCTURED", "STRUCTURED", "STRING", "URL", "HTML" ]Text element type String, URL, HTML
- 
            url: 
            string
            
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 "https://<SEARCH_REST_API_HOST>/srt/api/latest/search/initialScreen" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json" -d "@<FilePath/RequestBody.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
}