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.

Complex types

Category Complex Type

Field Type Description
id String Category identifier
kbid String Knowledge Base identifier
name String Category name

CategoryFacetItem

Field Type Description
id String unique category identifier
kbId String knowledge base identifier
name String name of category
count String How many documents refers to this category

CategoryNode Complex Type

Field Type Description
id String Category id
kbid String Knowledge base id
name String Category name
path String Category path
count Int Count of documents that are related to this category
ChildrenCategories CategoryNode [] Children categories

RelatedCategory Complex Type

Field Type Description
id String Category id
kbid String Knowledge base id
path String Category path
name String Category name
count Int Count of documents that are related to this category

KbCategoryTree Complex Type

Field Type Description
kbid String Knowledge base id
categories CategoryNode [] Categories that are related to this knowledge base

DocumentEntry Complex Type

Field Type Description
id String Unique document ID
kbId String Knowledge base ID
language String Document language
type String Document type (ARTICLE or QNA)
url String External URL associated with this document
media String[] List of media types associated with this document
tags String[] List of tags associated with this document
categories String[] List of categories associated with this document
relatedCategories RelatedCategory [ ] List of qualified category objects that are associated with this document
created Date Document creation date, represented as a string in the format of "yyyy-MM-dd HH:mm:ss"
modified Date Document modification date, represented as a string in the format of "yyyy-MM-dd HH:mm:ss"
customFields Map<String, Object> Set of custom field values
question String FAQ question (document type of QNA)
answer String FAQ answer (document type of QNA)
title String Article title (document type of ARTICLE)
description String Article description (document type of ARTICLE)
summary String Article summary (document type of ARTICLE)

ScoredDocumentEntry Complex Type

Field Type Description
All the fields of DocumentEntry
score Float Relevancy score of document against particular search request obtained by core functionality


ConfidentDocumentEntry Complex Type

Field Type Description
All the fields of ScoredDocumentEntry
confidence Float Confidence level of content against particular query

API Reference

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 Required Default Description
spellcheck Boolean No false Spell checking strategy
lang String Yes "_default" Language Identifier
sessionId String No Session Identifier
size Integer No Configuration Count of documents for retrieving
tenantId String Yes Tenant identifier
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/{lang}/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 Required Default Description
spellcheck Boolean No false Spell checking strategy
sessionId String No Session Identifier
size Integer No Configuration Count of documents for retrieving
tenantId String Yes Tenant identifier
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.
categories CategoryFacetItem[] Facet selection of categories, related to selected documents set
relatedCategories KbCategoryTree[ ] Tree of categories that are related to selected set of documents

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 Yes "_default" Language Identifier
sessionId String No Session Identifier
tenantId String Yes Tenant identifier
Request SearchRequest
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
sessionId String No Session identifier
tenantId String Yes Tenant 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
sessionId String No Session Identifier
media String No any Interaction media type
tenantId String Yes Tenant 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.
categories CategoryFacetItem[] Facet selection of categories, related to selected documents set
relatedCategories KbCategoryTree[ ] Tree of categories that are related to selected set 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}/langs/{lang}/morelikethis
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
{lang} String Language identifier
URL Parameters
Parameter Type Required Default Description
sessionId String No Session Identifier
media String No any Interaction media type
tenantId String Yes Tenant identifier
Request KnowledgeBaseListRequest
Output
Field Type Description
count int total count of documents in selection (pagination-independent)
documents ConfidentDocumentEntry[] Result selection of documents.
categories CategoryFacetItem[] Facet selection of categories, related to selected documents set
relatedCategories KbCategoryTree[ ] Tree of categories that are related to selected set 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
URL Parameters
Parameter Type Required Description
lang String Yes Language Identifier
number int No Number of suggestions to be proposed. The default value is 1
text String Yes Text for spell checking
tenantId String Yes 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.

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
URL Parameters
Parameter Type Required Description
number int No Number of suggestions to be proposed. The default value is 1
text String Yes Text for spell checking
tenantId String Yes 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.

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 Yes language identifier
from int No page start index
size int No page size
media String No Interaction media type
tenantId String Yes Tenant identifier
Request
Field Type Description
knowledgebases String [] List of knowledgebases for retrieving documents. Empty means need to retrieve documents related to any knowledgebase.
categories String [] List of names of categories for retrieving. Empty list means absence of category filtering.
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
relatedCategories KbCategoryTree[ ] Tree of categories that are related to selected set 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.

This page was last edited on June 21, 2017, at 14:12.
Comments or questions about this documentation? Contact us for support!