This API provides the search results and answers for one or more search requests from the past. In contrast to the History API, which returns all the searches conducted by a user in the past, this API allows you to search for specific search requests.
Method | POST |
Endpoint | <host_url>/searchassistapi/external/stream/<streamId>/history/search |
Request Headers | Content-Type: application/json
Auth: <JWT Token> |
Content-Type | application/json |
Authorization | auth: <JWT Token> |
API Scope | Analytics |
Rate Limit | 200 requests per application per hour |
Query Parameters:
streamID: Provide your application ID here.
Skip: This is an optional field that refers to the number of initial records to skip from the result.
Limit: This optional parameter refers to the number of records to be included in the result. This is used for pagination. The maximum value of the limit can be 200. The default pagination limit is 20.
Request Parameters:
Parameters | Description | Mandatory |
searchRequestIds | This is an array of search request Ids corresponding to which the result results and answers are to be fetched. | Yes |
projectionOpts | This field describes the fields to be added to the response. It can take the following values in the given format.
"projectionOpts": [ "searchRequestId", "graph_answer", "results" ] The results field refers to the search results generated for the query. graph_answer refers to the answer generated for the query. |
No If this field is not passed, searchRequestIds and graph_answer is returned. |
Sample Request
{ "searchRequestIds": [ "fsh-fcc515da-012f-5836-bdcb-914e2e7fd491", "fsh-dd6d6899-ac23-5cd4-9cc9-1ec21124885b" ], "projectionOpts": [ "searchRequestId", "graph_answer", "results" ] } |
Response Format
{ "history": [ {}, {} ], "hasMore": <true/false>, "total": <number of records> } |
Sample Response
{ "history": [ { "_id": "fsh-f5d3782d-40e8-5272-9bcd-82f30cc67961", "searchRequestId": "fsh-f5d3782d-40e8-5272-9bcd-82f30cc67961", "response": { "results": { "file": { "data": [ { "contentId": "fc-f3c8504b-6d3e-569d-ac08-09d7c2996b2d", "sys_content_type": "file", "score": 23.875584, "config": { "pinIndex": -1, "boost": 1, "visible": true }, "addedResult": false, "file_url": "https://searchassist-dev.kore.ai/searchassistapi/getMediaStream/findly/f-5cd52943-eca3-5a54-a277-9ad79734e17e.pdf?n=1607475660&s=InN5Yjdza3ZIQnRhdCs1bHhEaVlKZ1FCRXZ1ZS9RSmJkbi9mT2o3TVZucG89Ig$$&t=c84ec27a0e410c36cd7585689ecd8164b112951e75a8ef6e6d096ec602157e09#page=6", "sys_source_name": "Default", "file_title": "SearchAssist Onprem Architecture - v1.0.0.pdf", "file_preview": "High Availability / Redundancy Mode\n\n Component Name Mode\n\n Horizontally Scalable [1...N] Application Server, Service Admin, searchbackend, pluginservice, nl2sr, Tika, FAQ, idproxy, keyserver\n\n Active / Active [1..2] RabbitMQ Server, Redis Cache\n\n Replication Mode [1..3] MongoDB Farm Can be ", "sys_racl": [ "*" ], "createdOn": "2024-07-08T08:44:56.073000", "file_image_url": "https://searchassist-dev.kore.ai:443/home/assets/images/thumb-nails/pdf.svg" } ], "doc_count": 1 } }, "graph_answer": { "payload": { "center_panel": { "data": [ { "snippet_title": "SearchAssist Application Components Component Name Description Required software", "snippet_content": "Application Server Exposes REST API endpoints to different subsystems of the application cluster including searchassist builder. REST API endpoints for storing and retrieving data and configuration definitions, endpoints for webhook, web, and mobile channels. Expands the resource metadata in the REST API response. Internal service used by the Application Server. API Service that provides HTTP over WebSockets for persistent connections. This service provides the endpoint for web and mobile channels. Nginx, Node.js IDProxy Server Provides SSO and OAuth integration. Exposes an endpoint idp.<domain>.<tld> for configuring as a callback URL for oAuth endpoints that are being integrated for SearchAssist authentication. Node.js RabbitMQ Server AMQP Message broker. Internal subsystems of the Kore.ai cluster use AMQP messages as a way of communicating across services. Rabbitmq Service Admin Service admin has async job engine deployed as part of search assist stack Node.js Key Server API server to manage key encryption/decryption. This is also the ...", "url": "https://searchassist-dev.kore.ai/searchassistapi/getMediaStream/findly/f-5cd52943-eca3-5a54-a277-9ad79734e17e.pdf?n=1607475660&s=InN5Yjdza3ZIQnRhdCs1bHhEaVlKZ1FCRXZ1ZS9RSmJkbi9mT2o3TVZucG89Ig$$&t=c84ec27a0e410c36cd7585689ecd8164b112951e75a8ef6e6d096ec602157e09#page=5", "re_rank_score": 0, "source": "SearchAssist Onprem Architecture - v1.0.0.pdf", "doc_id": "fc-f3c8504b-6d3e-569d-ac08-09d7c2996b2d", "source_type": "file", "snippet_type": "extractive_model", "score": "209.6714%", "timeTaken": "0.71ms", "message": "Presented Answer", "isPresentedAnswer": true } ], "type": "paragraph_snippet" } } } } } ], "hasMore": false, "total": 1 } |