Jump to: navigation, search

FAQ Retrieval

You can use the FAQ Retrieval API to ask your knowledge base a question and find the answers, and also any documents that are related to this question.

Authorization

The operations carried out by the FAQ Retrieval API can be accessed by all roles.

Search for documents in a particular knowledge base

Description Executes a search for the answer to the given query
URL /kbs/{kbId}/search
Method POST
Request Content-Type application/json
Response Content-Type application/json
Role Any
URL Identifiers
Parameter Type Description
{kbId} String Knowledge base Identifier
URL parameters
Parameter Type Reqired Default Description
spellcheck Boolean No false Spell checking strategy
lang String No "_default" Language Identifier
subTenantId String No Sub tenant identifier
sessionId String No Session Identifier
size Integer No Configuration Count of documents for retrieving
Request SearchRequest
Response
Field Type Description
count int Total count of documents in selection (pagination-independent)
documents ConfidentDocumentEntry Resulting selection of document

Federated Search

Description Executes a search for the answer to the given query
URL /kbs/langs/{langId}search
Method POST
Request Content-Type application/json
Response Content-Type application/json
Role Any
URL Identifiers
Identifier Type Description
lang String Language identifier
URL parameters
Parameter Type Reqired Default Description
spellcheck Boolean No false Spell checking strategy
SubTenant ID String No Sub tenant identifier
sessionId String No Session Identifier
size Integer No Configuration Count of documents for retrieving
Request FederatedSearchRequest
Response
Field Type Description
count int Total count of documents in selection (pagination-independent)
documents ConfidentDocumentEntry Resulting selection of documents. Documents are ordered by their confidence levels. Confidence level of each document is computed against its relevance score in space of knowledge base that contains this particular document.

IntelliSense

Description autocomplete functionality
URL /kbs/{kbId}/suggestions
Method POST
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifiers
Field Type Description
kbId String Knowledgebase identifier
URL parameters
Parameter Type Required Default Description
lang String No "_default" Language Identifier
SubTenantId String No Sub tenant identifier
sessionId String No Session Identifier
Request FederatedSearchRequest
Output
Parameter Type Description
suggestions String[] Autocomplete suggestions

Federated IntelliSense

Description federated autocomplete functionality
URL /kbs/langs/{lang}/suggestions
Method POST
Request Content-Type
Response Content-Type application/json
Role Any
URL IDentifiers
Identifier Type Description
lang String Language identifier
URL Parameters
Parameter Type Required Default Description
subTenantId String No Sub tenant identifier
sessionId String No Session identifier
Request FederatedSearchRequest
Response
Parameter Type Description
suggestions String[] autocomplete suggestions
Notes In case of success returns payload in response field of "response" of declared structure.

In case of error returns code and description of error.

More Like This

Description Returns similar content for the document provided
URL /kbs/{kbId}/documents/{docId}/morelikethis
Method GET
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifier
Parameter Type Description
{kbId} String Knowledge base Identifier
{docId} String Document Identifier
URL Parameters
Parameter Type Required Default Description
lang String No Language Identifier
SubTenantId String No Sub tenant identifier
sessionId String No Session Identifier
Request
Field Type Required Description
knowledgebases String [] No List of knowledge base identifiers, or absent. If list is absent or empty, search is executed within current knowledge base.
Output
Field Type Description
count int total count of documents in selection (pagination-independent)
documents ConfidentDocumentEntry[] Result selection of documents.
Notes In case of success returns payload in response field of "response" of declared structure.

in case of error returns code and description of error.

Federated More Like This

Description returns similar content for the document provided (searches among documents of listed or all available knowledge bases)
URL /kbs/{kbId}/documents/{docId}/federatedmorelikethis
Method POST
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifier
Parameter Type Description
{kbId} String Knowledge base Identifier
{docId} String Document Identifier
URL Parameters
Parameter Type Required Default Description
lang String No "_default" Language Identifier
SubTenantId String No Sub tenant identifier
sessionId String No Session Identifier
Request KnowledgeBaseListRequest
Output
Field Type Description
count int total count of documents in selection (pagination-independent)
documents ConfidentDocumentEntry[] Result selection of documents.
Notes In case of success returns payload in response field of "response" of declared structure.

in case of error returns code and description of error.

Guess Spelling Correction

Description Guesses the correct spelling for the entered query
URL /kbs/{kbId}/spelling
Method GET
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifiers
Parameter Type Description
kbId String Knowledgebase identifier
Parameters
Parameter Type Req? Description
lang String No Language Identifier
number int No Number of suggestions to be proposed. The default value is 1
text String Yes Text for spell checking
SubTenantId String No Sub tenant identifier
Request empty
Response
Field Type Description
suggestions suggestion[] Spell check suggestions

Each item of suggestions has the following structure

Field Type Description
word String Token from checked text
suggestions String[] Suggestions for spell correction in descending order of relevancy
Notes In case of success returns payload in response field of "response" of declared structure.

in case of error returns code and description of error.

Browse documents

Description Retrieves documents, associated to requested knowledge bases and categories.
URL

/kbs/langs/{lang}documents

Method POST
Request Content-Type
Response Content-Type application/json
Role Customer
URL Identifiers
URL Parameters
Parameter Type Required Description
lang String No language identifier, or _default
from int No page start index
size int No page size
subTenantId String No Sub tenant identifier
media String No Retrieve given media related documents
Request
Field Type Description
knowledgebases String [] List of knowledgebases for retrieving documents. Empty means need to retrieve documents related to any knowledgebase.
categories Category [] Set of categories for filtering of documents related to these categories.

Empty "categories" field means absence of filtering of documents by categories.

Each Category is item of structure:

Field Type Description
id String category identifier
kbId String knowledge base identifier

WARNING!
Please take into account that the "knowledgebases" and "categories" filters are applied using the condition "AND", therefore you might lose documents that do no match both
filter conditions at the same time. The easiest way to avoid this situation is to use only one filter at a time.

Response
Field Type Description
page Pagination pagination information
documents DocumentEntry [] result selection of document
count int total count of documents in selection (pagination-independent)
categories CategoryFacetItem[] Facet selection of categories, related to seslected documents set

The structure of each item of categories is (CategoryFacetItem):

Field Type Description
id String id of category
count String count of this particular category id in result selection
Notes In case of success returns payload in response field of "response" of declared structure.

In case of error returns code and description of error.

Guess Federated Spelling Correction

Description Guesses spelling correction for the entered query on basis of corpus of listed or all available knowledge bases
URL /kbs/langs/{lang}/spelling
Method GET
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifiers
Identifier Type Description
lang String Language identifier
Parameters
Parameter Type Req? Description
lang String No Language Identifier, or _default
number int No Number of suggestions to be proposed. The default value is 1
text String Yes Text for spell checking
SubTenantId String No Sub tenant identifier
Request KnowledgeBaseListRequest
Response
Field Type Description
suggestions suggestion[] Spell check suggestions

Each item of suggestions has the following structure

Field Type Description
word String Token from checked text
suggestions String[] Suggestions for spell correction in descending order of relevancy
Notes In case of success returns payload in response field of "response" of declared structure.

in case of error returns code and description of error.

This page was last edited on March 11, 2016, at 23:04.
Comments or questions about this documentation? Contact us for support!