Download OpenAPI specification:Download
Get the list of projects in the account. An administrative API key is required for the operation.
pageNum | integer <int32> >= 0 Default: 0 Page number for pagination, starting from 0. |
pageSize | integer <int32> [ 1 .. 100 ] Default: 20 Page size. |
{- "content": [
- {
- "id": 0,
- "name": "string",
- "status": "CREATED",
- "resources": {
- "llmModels": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "paging": {
- "totalCount": 0,
- "pageNum": 0,
- "pageSize": 0
}
}
Create a new knowledge base project. An administrative API key is required for the operation.
name required | string Project name. |
{- "name": "Information service"
}
{- "id": 0,
- "name": "string",
- "status": "CREATED",
- "resources": {
- "llmModels": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Get information on the knowledge base project. An API key of the project is required for the operation.
{- "id": 0,
- "name": "string",
- "status": "CREATED",
- "resources": {
- "llmModels": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Update the knowledge base project. An administrative API key is required for the operation.
projectId required | integer <int64> (LongId) Knowledge base project identifier. |
name required | string Project name. |
{- "name": "Information service"
}
{- "id": 0,
- "name": "string",
- "status": "CREATED",
- "resources": {
- "llmModels": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Delete the knowledge base project. An administrative API key is required for the operation.
projectId required | integer <int64> (LongId) Knowledge base project identifier. |
{- "code": "string",
- "description": "string"
}
Independent requests for chunk retrieval or response generation. The message history can be optionally passed within the request.
Retrieve chunks relevant to the user’s query from the knowledge base.
query required | string Text of the user’s query. |
Array of objects (HistoryRecord) Dialogue history. Entries are displayed in reverse chronological order (from latest to earliest). | |
object (RetrievingSettings) Chunk search settings. |
{- "query": "string",
- "history": [
- {
- "content": "string",
- "role": "user"
}
], - "settings": {
- "pipeline": "semantic",
- "search": {
- "similarityTopK": 5,
- "candidateRadius": 10,
- "reranker": {
- "type": "manual",
- "minScore": -10,
- "maxChunksPerDocument": 1,
- "maxChunks": 1,
- "scoreReductionLimit": 1
}, - "fullTextSearch": {
- "strategy": "hybrid",
- "semanticPortion": 10,
- "ftsPortion": 1,
- "threshold": 1
}, - "rephraseUserQuery": {
- "prompt": "Read the dialogue history, rephrase the current user question considering the history by adding it as context. Make the question more understandable, clear, and structured. Add similar queries and a title to the question, and return the text with the title."
}, - "segment": "string",
- "segments": [
- "Legal documents",
- "include_without_segments"
], - "segmentSearchMode": "strict"
}, - "llm": {
- "model": "string",
- "contextWindow": 4000,
- "maxTokens": 500,
- "temperature": 1,
- "topP": 1,
- "frequencyPenalty": -2,
- "presencePenalty": -2
}
}
}
{- "chunks": [
- {
- "score": 0.1,
- "content": "string",
- "docId": "string",
- "metadata": {
- "sourcePath": "string",
- "sourceUrl": "string",
- "segments": [
- "string"
]
}, - "source": {
- "id": 0,
- "title": "string",
- "sourceType": "FILE",
- "path": "string",
- "externalLink": "string"
}
}
]
}
Synchronous request to generate a response to the user’s query.
Please note that request processing may take a significant amount of time. Ensure that the connection timeout set in your HTTP client is more than 1 minute.
query required | string Text of the user’s query. |
Array of objects (HistoryRecord) Dialogue history. Entries are displayed in reverse chronological order (from latest to earliest). | |
object (RagSettings) Query processing settings. |
{- "query": "string",
- "history": [
- {
- "content": "string",
- "role": "user"
}
], - "settings": {
- "pipeline": "semantic",
- "search": {
- "similarityTopK": 5,
- "candidateRadius": 10,
- "reranker": {
- "type": "manual",
- "minScore": -10,
- "maxChunksPerDocument": 1,
- "maxChunks": 1,
- "scoreReductionLimit": 1
}, - "fullTextSearch": {
- "strategy": "hybrid",
- "semanticPortion": 10,
- "ftsPortion": 1,
- "threshold": 1
}, - "rephraseUserQuery": {
- "prompt": "Read the dialogue history, rephrase the current user question considering the history by adding it as context. Make the question more understandable, clear, and structured. Add similar queries and a title to the question, and return the text with the title."
}, - "segment": "string",
- "segments": [
- "Legal documents",
- "include_without_segments"
], - "segmentSearchMode": "strict"
}, - "llm": {
- "model": "string",
- "contextWindow": 4000,
- "maxTokens": 500,
- "temperature": 1,
- "topP": 1,
- "frequencyPenalty": -2,
- "presencePenalty": -2
}, - "responseGeneration": {
- "prompt": "string",
- "showRelevantSources": true
}
}
}
{- "id": 0,
- "request": "string",
- "response": "string",
- "status": "READY_TO_PROCESS",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "comment": "string",
- "relevantSources": [
- {
- "id": 0,
- "title": "string",
- "sourceType": "FILE",
- "path": "string",
- "externalLink": "string"
}
]
}
Asynchronous request to generate a response to the user’s query.
The result can be obtained via GET /api/knowledge-hub/query/{queryId} endpoint, where queryId
is the request identifier received in the current response.
query required | string Text of the user’s query. |
Array of objects (HistoryRecord) Dialogue history. Entries are displayed in reverse chronological order (from latest to earliest). | |
object (RagSettings) Query processing settings. |
{- "query": "string",
- "history": [
- {
- "content": "string",
- "role": "user"
}
], - "settings": {
- "pipeline": "semantic",
- "search": {
- "similarityTopK": 5,
- "candidateRadius": 10,
- "reranker": {
- "type": "manual",
- "minScore": -10,
- "maxChunksPerDocument": 1,
- "maxChunks": 1,
- "scoreReductionLimit": 1
}, - "fullTextSearch": {
- "strategy": "hybrid",
- "semanticPortion": 10,
- "ftsPortion": 1,
- "threshold": 1
}, - "rephraseUserQuery": {
- "prompt": "Read the dialogue history, rephrase the current user question considering the history by adding it as context. Make the question more understandable, clear, and structured. Add similar queries and a title to the question, and return the text with the title."
}, - "segment": "string",
- "segments": [
- "Legal documents",
- "include_without_segments"
], - "segmentSearchMode": "strict"
}, - "llm": {
- "model": "string",
- "contextWindow": 4000,
- "maxTokens": 500,
- "temperature": 1,
- "topP": 1,
- "frequencyPenalty": -2,
- "presencePenalty": -2
}, - "responseGeneration": {
- "prompt": "string",
- "showRelevantSources": true
}
}
}
{- "id": 0,
- "request": "string",
- "response": "string",
- "status": "READY_TO_PROCESS",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "comment": "string",
- "relevantSources": [
- {
- "id": 0,
- "title": "string",
- "sourceType": "FILE",
- "path": "string",
- "externalLink": "string"
}
]
}
Get the current processing status of the response generation request.
Long polling is used if the waitTimeSeconds
parameter is specified.
queryId required | integer <int64> (LongId) Identifier of the response generation request. |
waitTimeSeconds | integer <int32> [ 0 .. 30 ] Default: 3 HTTP request timeout. Used in long polling. |
{- "id": 0,
- "request": "string",
- "response": "string",
- "status": "READY_TO_PROCESS",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "comment": "string",
- "relevantSources": [
- {
- "id": 0,
- "title": "string",
- "sourceType": "FILE",
- "path": "string",
- "externalLink": "string"
}
]
}
queryId required | integer <int64> (LongId) Identifier of the response generation request. |
{- "id": 0,
- "request": "string",
- "response": "string",
- "status": "READY_TO_PROCESS",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "comment": "string",
- "relevantSources": [
- {
- "id": 0,
- "title": "string",
- "sourceType": "FILE",
- "path": "string",
- "externalLink": "string"
}
]
}
name | string Name of the user’s chat. |
object (RagSettings) Query processing settings. |
{- "name": "string",
- "settings": {
- "pipeline": "semantic",
- "search": {
- "similarityTopK": 5,
- "candidateRadius": 10,
- "reranker": {
- "type": "manual",
- "minScore": -10,
- "maxChunksPerDocument": 1,
- "maxChunks": 1,
- "scoreReductionLimit": 1
}, - "fullTextSearch": {
- "strategy": "hybrid",
- "semanticPortion": 10,
- "ftsPortion": 1,
- "threshold": 1
}, - "rephraseUserQuery": {
- "prompt": "Read the dialogue history, rephrase the current user question considering the history by adding it as context. Make the question more understandable, clear, and structured. Add similar queries and a title to the question, and return the text with the title."
}, - "segment": "string",
- "segments": [
- "Legal documents",
- "include_without_segments"
], - "segmentSearchMode": "strict"
}, - "llm": {
- "model": "string",
- "contextWindow": 4000,
- "maxTokens": 500,
- "temperature": 1,
- "topP": 1,
- "frequencyPenalty": -2,
- "presencePenalty": -2
}, - "responseGeneration": {
- "prompt": "string",
- "showRelevantSources": true
}
}
}
{- "id": 0,
- "name": "string",
- "settings": {
- "pipeline": "semantic",
- "search": {
- "similarityTopK": 5,
- "candidateRadius": 10,
- "reranker": {
- "type": "manual",
- "minScore": -10,
- "maxChunksPerDocument": 1,
- "maxChunks": 1,
- "scoreReductionLimit": 1
}, - "fullTextSearch": {
- "strategy": "hybrid",
- "semanticPortion": 10,
- "ftsPortion": 1,
- "threshold": 1
}, - "rephraseUserQuery": {
- "prompt": "Read the dialogue history, rephrase the current user question considering the history by adding it as context. Make the question more understandable, clear, and structured. Add similar queries and a title to the question, and return the text with the title."
}, - "segment": "string",
- "segments": [
- "Legal documents",
- "include_without_segments"
], - "segmentSearchMode": "strict"
}, - "llm": {
- "model": "string",
- "contextWindow": 4000,
- "maxTokens": 500,
- "temperature": 1,
- "topP": 1,
- "frequencyPenalty": -2,
- "presencePenalty": -2
}, - "responseGeneration": {
- "prompt": "string",
- "showRelevantSources": true
}
}
}
chatId required | integer <int64> (LongId) Identifier of the chat in the knowledge base project. |
{- "id": 0,
- "name": "string",
- "settings": {
- "pipeline": "semantic",
- "search": {
- "similarityTopK": 5,
- "candidateRadius": 10,
- "reranker": {
- "type": "manual",
- "minScore": -10,
- "maxChunksPerDocument": 1,
- "maxChunks": 1,
- "scoreReductionLimit": 1
}, - "fullTextSearch": {
- "strategy": "hybrid",
- "semanticPortion": 10,
- "ftsPortion": 1,
- "threshold": 1
}, - "rephraseUserQuery": {
- "prompt": "Read the dialogue history, rephrase the current user question considering the history by adding it as context. Make the question more understandable, clear, and structured. Add similar queries and a title to the question, and return the text with the title."
}, - "segment": "string",
- "segments": [
- "Legal documents",
- "include_without_segments"
], - "segmentSearchMode": "strict"
}, - "llm": {
- "model": "string",
- "contextWindow": 4000,
- "maxTokens": 500,
- "temperature": 1,
- "topP": 1,
- "frequencyPenalty": -2,
- "presencePenalty": -2
}, - "responseGeneration": {
- "prompt": "string",
- "showRelevantSources": true
}
}
}
Retrieve chunks from the knowledge base that are relevant to the user’s query within the chat.
chatId required | integer <int64> (LongId) Identifier of the chat in the knowledge base project. |
query required | string Text of the user’s query. |
object (RetrievingSettings) Chunk search settings. |
{- "query": "string",
- "settings": {
- "pipeline": "semantic",
- "search": {
- "similarityTopK": 5,
- "candidateRadius": 10,
- "reranker": {
- "type": "manual",
- "minScore": -10,
- "maxChunksPerDocument": 1,
- "maxChunks": 1,
- "scoreReductionLimit": 1
}, - "fullTextSearch": {
- "strategy": "hybrid",
- "semanticPortion": 10,
- "ftsPortion": 1,
- "threshold": 1
}, - "rephraseUserQuery": {
- "prompt": "Read the dialogue history, rephrase the current user question considering the history by adding it as context. Make the question more understandable, clear, and structured. Add similar queries and a title to the question, and return the text with the title."
}, - "segment": "string",
- "segments": [
- "Legal documents",
- "include_without_segments"
], - "segmentSearchMode": "strict"
}, - "llm": {
- "model": "string",
- "contextWindow": 4000,
- "maxTokens": 500,
- "temperature": 1,
- "topP": 1,
- "frequencyPenalty": -2,
- "presencePenalty": -2
}
}
}
{- "chunks": [
- {
- "score": 0.1,
- "content": "string",
- "docId": "string",
- "metadata": {
- "sourcePath": "string",
- "sourceUrl": "string",
- "segments": [
- "string"
]
}, - "source": {
- "id": 0,
- "title": "string",
- "sourceType": "FILE",
- "path": "string",
- "externalLink": "string"
}
}
]
}
Synchronous request to generate a response to the user’s query. The chat message history is taken into account.
Please note that request processing may take a significant amount of time. Ensure that the connection timeout set in your HTTP client is more than 1 minute.
chatId required | integer <int64> (LongId) Identifier of the chat in the knowledge base project. |
query required | string Text of the user’s query. |
object (RagSettings) Query processing settings. |
{- "query": "string",
- "settings": {
- "pipeline": "semantic",
- "search": {
- "similarityTopK": 5,
- "candidateRadius": 10,
- "reranker": {
- "type": "manual",
- "minScore": -10,
- "maxChunksPerDocument": 1,
- "maxChunks": 1,
- "scoreReductionLimit": 1
}, - "fullTextSearch": {
- "strategy": "hybrid",
- "semanticPortion": 10,
- "ftsPortion": 1,
- "threshold": 1
}, - "rephraseUserQuery": {
- "prompt": "Read the dialogue history, rephrase the current user question considering the history by adding it as context. Make the question more understandable, clear, and structured. Add similar queries and a title to the question, and return the text with the title."
}, - "segment": "string",
- "segments": [
- "Legal documents",
- "include_without_segments"
], - "segmentSearchMode": "strict"
}, - "llm": {
- "model": "string",
- "contextWindow": 4000,
- "maxTokens": 500,
- "temperature": 1,
- "topP": 1,
- "frequencyPenalty": -2,
- "presencePenalty": -2
}, - "responseGeneration": {
- "prompt": "string",
- "showRelevantSources": true
}
}
}
{- "id": 0,
- "chatId": 0,
- "request": "string",
- "response": "string",
- "status": "READY_TO_PROCESS",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "comment": "string",
- "relevantSources": [
- {
- "id": 0,
- "title": "string",
- "sourceType": "FILE",
- "path": "string",
- "externalLink": "string"
}
]
}
Asynchronous request to generate a response to the user’s query. The chat message history is taken into account.
The result can be obtained via GET /api/knowledge-hub/chat/{chatId}/query/{queryId} endpoint, where queryId
is the request identifier received in the current response.
chatId required | integer <int64> (LongId) Identifier of the chat in the knowledge base project. |
query required | string Text of the user’s query. |
object (RagSettings) Query processing settings. |
{- "query": "string",
- "settings": {
- "pipeline": "semantic",
- "search": {
- "similarityTopK": 5,
- "candidateRadius": 10,
- "reranker": {
- "type": "manual",
- "minScore": -10,
- "maxChunksPerDocument": 1,
- "maxChunks": 1,
- "scoreReductionLimit": 1
}, - "fullTextSearch": {
- "strategy": "hybrid",
- "semanticPortion": 10,
- "ftsPortion": 1,
- "threshold": 1
}, - "rephraseUserQuery": {
- "prompt": "Read the dialogue history, rephrase the current user question considering the history by adding it as context. Make the question more understandable, clear, and structured. Add similar queries and a title to the question, and return the text with the title."
}, - "segment": "string",
- "segments": [
- "Legal documents",
- "include_without_segments"
], - "segmentSearchMode": "strict"
}, - "llm": {
- "model": "string",
- "contextWindow": 4000,
- "maxTokens": 500,
- "temperature": 1,
- "topP": 1,
- "frequencyPenalty": -2,
- "presencePenalty": -2
}, - "responseGeneration": {
- "prompt": "string",
- "showRelevantSources": true
}
}
}
{- "id": 0,
- "chatId": 0,
- "request": "string",
- "response": "string",
- "status": "READY_TO_PROCESS",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "comment": "string",
- "relevantSources": [
- {
- "id": 0,
- "title": "string",
- "sourceType": "FILE",
- "path": "string",
- "externalLink": "string"
}
]
}
Get the current processing status of the response generation request within a user chat.
Long polling is used if the waitTimeSeconds
parameter is specified.
chatId required | integer <int64> (LongId) Identifier of the chat in the knowledge base project. |
queryId required | integer <int64> (LongId) Identifier of the response generation request. |
waitTimeSeconds | integer <int32> [ 0 .. 30 ] Default: 3 HTTP request timeout. Used in long polling. |
{- "id": 0,
- "chatId": 0,
- "request": "string",
- "response": "string",
- "status": "READY_TO_PROCESS",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "comment": "string",
- "relevantSources": [
- {
- "id": 0,
- "title": "string",
- "sourceType": "FILE",
- "path": "string",
- "externalLink": "string"
}
]
}
chatId required | integer <int64> (LongId) Identifier of the chat in the knowledge base project. |
queryId required | integer <int64> (LongId) Identifier of the response generation request. |
{- "id": 0,
- "chatId": 0,
- "request": "string",
- "response": "string",
- "status": "READY_TO_PROCESS",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "comment": "string",
- "relevantSources": [
- {
- "id": 0,
- "title": "string",
- "sourceType": "FILE",
- "path": "string",
- "externalLink": "string"
}
]
}
Get the list of knowledge base sources.
createDateFrom | string <date> Select sources added on or after the specified date. |
createDateTo | string <date> Select sources added on or before the specified date. |
sourceStatus | string Select sources with the specified indexing status. Acceptable statuses:
|
{- "sources": [
- {
- "id": 0,
- "name": "string",
- "segments": [
- "string"
], - "status": "string",
- "lastError": "string",
- "version": "string",
- "sizeBytes": 0,
- "sizeChars": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "type": "FILE"
}
]
}
Upload a file via link and add it as a source to the knowledge base. Indexing begins automatically after the source is added.
name | string Name of the source. It must include the file extension and be unique within the project. If not specified, it is automatically generated. |
link required | string Link to the file. See the file requirements. If the link leads to an HTML page, only the HTML is downloaded, excluding images. |
segment | string Deprecated Knowledge base segment (tag).
This parameter is deprecated. Use |
segments | Array of strings Knowledge base segments (tags). The source will be available when searching within these segments. Each segment name must be 1 to 100 characters long and must not contain commas. |
{- "name": "filename.txt",
- "link": "string",
- "segment": "string",
- "segments": [
- "Lending",
- "Legal documents"
]
}
{- "id": 0,
- "name": "string",
- "segments": [
- "string"
], - "status": "string",
- "lastError": "string",
- "version": "string",
- "sizeBytes": 0,
- "sizeChars": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "type": "FILE"
}
Upload a file via link and replace the source with the specified name. Indexing begins automatically after the source is updated.
name | string Name of the source. If no source with this name exists, an error is returned. |
link required | string Link to the file. See the file requirements. If the link leads to an HTML page, only the HTML is downloaded, excluding images. |
segment | string Deprecated Knowledge base segment (tag).
This parameter is deprecated. Use |
segments | Array of strings Knowledge base segments (tags). The source will be available when searching within these segments. Each segment name must be 1 to 100 characters long and must not contain commas. |
{- "name": "string",
- "link": "string",
- "segment": "string",
- "segments": [
- "Lending",
- "Legal documents"
]
}
{- "id": 0,
- "name": "string",
- "segments": [
- "string"
], - "status": "string",
- "lastError": "string",
- "version": "string",
- "sizeBytes": 0,
- "sizeChars": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "type": "FILE"
}
Add the provided text as a source to the knowledge base. Indexing begins automatically after the source is added.
name | string Name of the source. It must include the file extension (for example, |
text required | string Text of the source. The maximum size is specified in the file requirements. |
segment | string Deprecated Knowledge base segment (tag).
This parameter is deprecated. Use |
segments | Array of strings Knowledge base segments (tags). The source will be available when searching within these segments. Each segment name must be 1 to 100 characters long and must not contain commas. |
{- "name": "filename.txt",
- "text": "string",
- "segment": "string",
- "segments": [
- "Lending",
- "Legal documents"
]
}
{- "id": 0,
- "name": "string",
- "segments": [
- "string"
], - "status": "string",
- "lastError": "string",
- "version": "string",
- "sizeBytes": 0,
- "sizeChars": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "type": "FILE"
}
Replace the source with the text provided. Indexing begins automatically after the source is updated.
name | string Name of the source. If no source with this name exists, an error is returned. |
text required | string Text of the source. The maximum size is specified in the file requirements. |
segment | string Deprecated Knowledge base segment (tag).
This parameter is deprecated. Use |
segments | Array of strings Knowledge base segments (tags). The source will be available when searching within these segments. Each segment name must be 1 to 100 characters long and must not contain commas. |
{- "name": "string",
- "text": "string",
- "segment": "string",
- "segments": [
- "Lending",
- "Legal documents"
]
}
{- "id": 0,
- "name": "string",
- "segments": [
- "string"
], - "status": "string",
- "lastError": "string",
- "version": "string",
- "sizeBytes": 0,
- "sizeChars": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "type": "FILE"
}
Add the provided file as a source to the knowledge base. Indexing begins automatically after the source is added.
file required | string <binary> File to upload. See the file requirements. |
name | string Name of the source. It must include the file extension and be unique within the project. If not specified, it is automatically generated. |
segment | string Deprecated Knowledge base segment (tag).
This parameter is deprecated. Use |
segments | Array of strings Knowledge base segments (tags). The source will be available when searching within these segments. Each segment name must be 1 to 100 characters long and must not contain commas. |
{- "id": 0,
- "name": "string",
- "segments": [
- "string"
], - "status": "string",
- "lastError": "string",
- "version": "string",
- "sizeBytes": 0,
- "sizeChars": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "type": "FILE"
}
Replace the source with the file provided. Indexing begins automatically after the source is updated.
file required | string <binary> File to upload. See the file requirements. |
name | string Name of the source. If no source with this name exists, an error is returned. |
segment | string Deprecated Knowledge base segment (tag).
This parameter is deprecated. Use |
segments | Array of strings Knowledge base segments (tags). The source will be available when searching within these segments. Each segment name must be 1 to 100 characters long and must not contain commas. |
{- "id": 0,
- "name": "string",
- "segments": [
- "string"
], - "status": "string",
- "lastError": "string",
- "version": "string",
- "sizeBytes": 0,
- "sizeChars": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "type": "FILE"
}
Get information about the knowledge base source.
sourceId required | integer <int64> (LongId) Identifier of the source in the knowledge base project. |
{- "id": 0,
- "name": "string",
- "segments": [
- "string"
], - "status": "string",
- "lastError": "string",
- "version": "string",
- "sizeBytes": 0,
- "sizeChars": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "type": "FILE"
}
Add an integration to the knowledge base. Indexing begins automatically after data is downloaded, both when creating the integration or during automatic synchronisation, if enabled.
name required | string Name of the integration. |
autoSync | boolean Enable automatic data synchronisation |
downloadAttachmentFiles | boolean Enable download attached files in acceptable formats, see the file requirements. This setting does not affect downloading images: they are downloaded anyway. |
syncIntervalMinutes | integer Update interval in minutes. The minimum value is 30. |
required | object (IntegrationSettings) Integration settings. |
{- "name": "string",
- "autoSync": true,
- "downloadAttachmentFiles": true,
- "syncIntervalMinutes": 0,
- "settings": {
- "baseUrl": "string"
}
}
{- "id": 0,
- "name": "string",
- "autoSync": true,
- "syncIntervalMinutes": 0,
- "settings": {
- "baseUrl": "string"
}, - "status": "ACTIVE",
- "lastError": "string"
}
Get the list of knowledge base integrations.
{- "integrations": [
- {
- "id": 0,
- "name": "string",
- "autoSync": true,
- "syncIntervalMinutes": 0,
- "settings": {
- "baseUrl": "string"
}, - "status": "ACTIVE",
- "lastError": "string"
}
]
}
Get information about the integration.
integrationId required | integer <int64> (LongId) Identifier of the integration. |
{- "id": 0,
- "name": "string",
- "autoSync": true,
- "syncIntervalMinutes": 0,
- "settings": {
- "baseUrl": "string"
}, - "status": "ACTIVE",
- "lastError": "string"
}
Change the name of a segment (tag) across all assigned sources.
oldName required | string Current segment name. |
newName required | string New segment name. Must be 1 to 100 characters long. Commas are not allowed. |
{- "oldName": "Law",
- "newName": "Legal documents"
}
{- "updatedFileIds": [
- 0
]
}
Add the specified segments (tags) to the list of segments assigned to each source.
sourceIds required | Array of integers <int64> (LongId) [ items <int64 > ] Identifiers of the sources. If omitted, changes will be applied to all sources in the knowledge base. |
segments required | Array of strings Segments to assign to the sources. Each segment name must be 1 to 100 characters long and must not contain commas. |
{- "sourceIds": [
- 0
], - "segments": [
- "Lending",
- "Legal documents"
]
}
{- "updatedFileIds": [
- 0
]
}
Remove the specified segments (tags) from the list of segments assigned to each source. If a segment to be removed is not assigned to a given source, it will be skipped.
sourceIds required | Array of integers <int64> (LongId) [ items <int64 > ] Identifiers of the sources. |
segments required | Array of strings Segments to unassign from the sources. |
{- "sourceIds": [
- 0
], - "segments": [
- "Lending",
- "Legal documents"
]
}
{- "updatedFileIds": [
- 0
]
}
Create a new API key for the knowledge base project. An administrative API key is required for the operation.
projectId required | integer <int64> (LongId) Knowledge base project identifier. |
name required | string API key name. |
expiredAt | string <date-time> API key expiry date and time. If not specified, a permanent key will be created. |
{- "name": "For website and apps",
- "expiredAt": "2019-08-24T14:15:22Z"
}
{- "id": 0,
- "projectId": 0,
- "name": "string",
- "key": "string",
- "status": "string",
- "ownerLogin": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "expiredAt": "2019-08-24T14:15:22Z",
- "lastUsedAt": "2019-08-24T14:15:22Z"
}
Get the list of API keys for the knowledge base project. An administrative API key is required for the operation.
projectId required | integer <int64> (LongId) Knowledge base project identifier. |
pageNum | integer <int32> >= 0 Default: 0 Page number for pagination, starting from 0. |
pageSize | integer <int32> [ 1 .. 100 ] Default: 20 Page size. |
onlyActive | boolean Default: false Return only active API keys. |
{- "content": [
- {
- "id": 0,
- "projectId": 0,
- "name": "string",
- "key": "string",
- "status": "string",
- "ownerLogin": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "expiredAt": "2019-08-24T14:15:22Z",
- "lastUsedAt": "2019-08-24T14:15:22Z"
}
], - "paging": {
- "totalCount": 0,
- "pageNum": 0,
- "pageSize": 0
}
}
Revoke the API key for the knowledge base project. An administrative API key is required for the operation.
projectId required | integer <int64> (LongId) Knowledge base project identifier. |
apiKeyId required | integer <int64> (LongId) API key identifier. |
{- "id": 0,
- "projectId": 0,
- "name": "string",
- "key": "string",
- "status": "string",
- "ownerLogin": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "expiredAt": "2019-08-24T14:15:22Z",
- "lastUsedAt": "2019-08-24T14:15:22Z"
}