Cognitive Search
Version: 1.0.0
This section contains Cognitive Search APIs that allows to add structured and unstructured documents or PDF, or to upload urls to mine and to query from the uploaded documents and urls.
API methods: Cognitive Search
POST /ctrainer/train/upload
Upload documents
Upload structured or unstructured word documents and PDFs to process them for cognitive search.
Request body
- Media types
- multipart/form-data
Schema FileUpload
Responses
- 200
files uploaded Successfully
- Media types
- application/json
Schema BasicResponse Examples - Success
{ "status": "success", "message": "files uploaded Successfully", "data": null, "error": { "reason": "", "errorlog": null } }
POST /botbuilder/urlmining
Upload URLs for mining
Upload the base url and set include and exclude parameters to mine the website and train the model.
Request body
- Media types
- application/json
Schema UrlMiningRequest
Responses
- 200
Success
- Media types
- */*
Schema UrlMiningResponse - application/json
Examples - Success
{ "status": { "responseType": "success", "statusCode": "200" }, "data": [ { "url": "https://abc.xyz/", "level": 0 }, { "url": "http://www.calicolabs.com/", "level": 1 }, { "url": "https://abc.xyz/investor/", "level": 1 } ], "errors": "" }
POST /botbuilder/cognitive/cognitivesearch
Perform cognitive search
Use this api to perform cognitive search.
Request body
Required: true
- Media types
- application/json
Schema CSSearchReq
Responses
- 200
Success
- Media types
- */*
Schema BasicResponseDataListCSData - application/json
Examples - success
{ "status": { "responseType": "success", "statusCode": "200" }, "data": [ { "title": "travel policy", "para": " o o The denomination of currency against which a travel advance will be issued is mentioned in Annexure B.Employees are requested to use the company provided Travel/Forex card wherever applicable for all official expenses while on travel and all unused Forex to be returned to company as foreign currency only through the same vendor o For travel less than a month, the allowance for the expected duration of stay will be given as travel advance together with a maximum buffer of USD 500 or its equivalent. o For travel greater than a month, the advance amount to the maximum of one month’s eligibility will be issued o o Employees will also be reimbursed for expenses on account of official phone calls, faxes, photocopying, based on the approval of the L4 Head (RM in case L4 head or above is travelling). Employees are requested to get local connections for the purpose of calling while on international travel.", "shortPara": null, "score": "0.7058551583800096", "fileType": "pdf", "fileContent": null, "sourceURL": null, "encryptedContent": null, "project": null, "decriptedFileContent": null, "sh_ans": null }, { "title": "travel policy", "para": " Travel Plans (TP): Employees will be classified into different Travel Plans: TP1 to TP3 as per the table below: Travel Plan Employee Band TP1 E6/E7/E8*/E9** TP2 EM/E3/E4/E5 TP3 EC/E0/E1/E2 Travel in which all the segments are within the home country of the employee has been defined as Domestic Travel. Travel, where at least one segment of travel is outside the home country of the employee is defined as International Travel. Exceptions to this are: travel between and within US, Canada and Mexico; UK - Continental Europe; Singapore Malaysia which would be treated as domestic travel. HCL Travel Desk (Travel Desk) should be the used to meet all ticketing needs. It is recommended that the following guidelines be adhered to for employees undertaking business travel: o This policy is meant to cover only Business travel. If the employee combines business travel with personal/holiday travel, then the employee is expected to segregate all bills (including lodging, boarding, conveyance, etc) and claim only the official expenses.", "shortPara": null, "score": "0.7043652953368509", "fileType": "pdf", "fileContent": null, "sourceURL": null, "encryptedContent": null, "project": null, "decriptedFileContent": null, "sh_ans": null }, { "title": "travel policy", "para": " All tickets will be booked only with the employee’s base location as the start point. o All domestic travel within India that takes less than 8 hours will have to be by train for employees who fall under E0 and E1 band, rest all travel plans will be eligible for air travel even if the travel hours are less than 8 hours. Employees can get the train ticket booked by either through Travel Admin team or can self-book and claim it from the company through GCS. Employees shall be provided with same travel class ticket i.e. business, premium or economy where there is a layover even though the travel hour to final destination is less than 8 hours. For example, if an employee eligible for business lass is travelling to Sydney, via Singapore from New Delhi, then the flight from New Delhi to Singapore as well as the flight from Singapore to Sydney, will booked under business class. o *For all international travels with a duration of 8 hours and above, E8 band employees will be eligible to travel in Premium Economy.", "shortPara": null, "score": "0.700057579584518", "fileType": "pdf", "fileContent": null, "sourceURL": null, "encryptedContent": null, "project": null, "decriptedFileContent": null, "sh_ans": null } ], "errors": "" }
Components
Schemas
CSSearchReq
- Properties
orgName stringproject stringquery string
type | object |
CSData
- Properties
decriptedFileContent arrayitems string(byte)encryptedContent stringfileContent stringfileType stringpara stringproject stringscore stringsh_ans stringshortPara stringsourceURL stringtitle string
type | object |
FileUpload
- Properties
files arrayitems string(binary)categoryName stringdescription stringfileArray stringlanguage stringprojectName stringtags stringvalidate boolean
required |
|
type | object |
UrlMiningRequest
- Properties
excludePattern arrayitems stringlevel integer(int32)onlyInclude arrayitems stringprojectName stringurl string
type | object |
UrlMiningResponse
- Properties
response arrayitems $ref MiningResponse
type | object |
MiningResponse
- Properties
level integer(int32)url string
type | object |
BasicResponseDataListCSData
- Properties
data arrayitems $ref CSData errors stringstatus $ref BasicResponseStatus
type | object |
BasicResponse
- Properties
data stringerrors stringstatus $ref BasicResponseStatus
type | object |
BasicResponseStatus
- Properties
responseType stringdescription status response type
statusCode stringdescription status code
type | object |