Jump to: navigation, search

Knowledge Base Operations

The Knowledge Base Operations API lets you explore how many categories your knowledge bases contain, what the categories are, and what specific articles are contained in a knowledge base.

Authorization

The operations carried out by the Knowledge Base Operations API can be accessed by all roles.

Complex Types

DocumentEntry Complex Type

Field Type Description
id String Unique document ID
kbId String Knowledge base ID
language String Document language
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
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
answer String FAQ answer

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

Pagination Complex Type

Field Type Description
from int Page offset
size int Page size

CategoryFacetItem

Field Type Description
id String Category Identifier
count int Count of categories with this id in obtained document selection

Retrieve a List of Supported Knowledge Bases

Description Retrieves a list of supported knowledge bases
URL /kbs/
Method GET
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifiers None
URL Parameters
Parameter Type Req? Default Description
lang String No "_all" Language. Use _all for retrieving meta information about all knowledge bases, independently of supported language. Specify particular language for retrieving meta information of knowledge bases that support this language.
sessionId String No Session ID
Request Empty
Response
Field Type Description
knowledgebases KnowledgeBaseMeta List of knowledge bases
Notes If successful, 200 OK is returned. However, if the dataset already exists, 400 BAD REQUEST is returned.

Retrieve Knowledge Base Information

Description Retrieves information about a specific knowledge base (including supported languages)
URL /kbs/{kbId}
Method GET
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifiers
Parameter Type Description
{kbId} String Knowledge base ID
URL Parameters
Parameter Type Req? Default Description
sessionId String No   Session ID
Request Empty
Response KnowledgeBaseMeta 
Notes If successful, 200 OK is returned. However, if the dataset already exists, 400 BAD REQUEST is returned.

Get Knowledge Base Document Categories

Category Complex Type

Field Type Description
id String Unique category ID
name String Category name

Get Knowledge Base Document Categories

Description Returns a list of categories
URL /kbs/{kbId}/categories
Method GET
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifiers
Parameter Type Description
{kbId} String Knowledge base ID
URL parameters
Parameter Type Req? Default Description
lang String No "_default" Language
sessionId String No   Session ID
Request Empty
Response
Parameter Type Description
categories Category List of categories for a given knowledge base
Notes If successful, 200 OK is returned. However, if the dataset already exists, 400 BAD REQUEST is returned.

Get Knowledge Base Documents Associated With A Given Category

Description Returns all document previews for the specified category
URL /kbs/{kbId}/{catId}/documents
Method GET
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifiers
Parameter Type Description
{kbId} String Knowledge base ID
{catId} String Specific category ID. Use _all for retrieving all documents, independently of category. Specify particular category ID for retrieving documents from this category.
URL parameters
Parameter Type Required Default Description
from int No 0 Start position for pagination, default=0
size int No 0 Size of page for pagination, default=0. 0 means that you are about to retrieve all documents, related to given category.
lang String No "_default" Language ID
sessionId String No Session ID
Request Empty
Response
Field Type Description
count int Total count of documents in selection (pagination-independent)
page Pagination Pagination information
documents DocumentEntry Resulting selection of document
categories CategoryFacetItem Facet selection of categories, related to selected document set
Notes If successful, 200 OK is returned. However, if the dataset already exists, 400 BAD REQUEST is returned.

Get Top X Trending Documents

Description Returns the top X trending documents
URL /kbs/{kbId}/top
Method GET
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifiers
Parameter Type Description
{kbId} String Knowledge base ID
URL parameters
Parameter Type Required Default Description
lang String No "_default" Language
size Integer No   Size of selection to retrieve
sessionId String No   Session id
Request Empty
Response
Field Type Description
count int Total count of documents in selection (pagination-independent)
documents DocumentEntry Resulting selection in document
categories CategoryFacetItem Facet selection of categories, related to selected document set
Notes If successful, 200 OK is returned. However, if the dataset already exists, 400 BAD REQUEST is returned.

Get Full Contents Of Document

Description Returns the full content of the specified document
URL /kbs/{kbId}/documents/{docId}
Method GET
Request Content-Type
Response Content-Type application/json
Role Any
URL Identifiers
Parameter Type Description
{kbId} String Knowledge base ID
{docId} String Unique document ID
URL parameters
Parameter Type Required Default Description
lang String No "_default" Language ID
sessionId String No   Session ID
Request Empty
Response DocumentEntry
 
Notes If successful, 200 OK is returned. However, if the dataset already exists, 400 BAD REQUEST is returned.
This page was last edited on May 19, 2015, at 09:24.
Comments or questions about this documentation? Contact us for support!