Skip to main content

Tovie Data Agent public API (1.0.0)

Download OpenAPI specification:Download

ProjectsPublic

Project operations.

Get list of projects

Get the list of projects in the account. An administrative API key is required for the operation.

Authorizations:
bearerAuth
query Parameters
pageNum
integer <int32>
Default: 0

Page number for pagination, starting from 0.

pageSize
integer <int32>
Default: 20

Page size.

name
string

Filters items by their name. The search is case-insensitive and matches any substring.

Responses

Response samples

Content type
application/json
{
  • "content": [
    ],
  • "paging": {
    }
}

Create project

Create a new knowledge base project. An administrative API key is required for the operation.

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
required
string

Project name.

Responses

Request samples

Content type
application/json
{
  • "name": "Information service"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "status": "CREATED",
  • "resources": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "indexingPriority": 1,
  • "indexingRetryCount": 10
}

Get knowledge base project info

Get basic information about a knowledge base project. This operation requires the project’s API key. To retrieve the project settings, use the GET /projects/{projectId}/settings endpoint.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "status": "CREATED",
  • "resources": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "indexingPriority": 1,
  • "indexingRetryCount": 10
}

Update project

Change the name of a knowledge base project. This operation requires an administrative API key. To update the project settings, use the POST /projects/{projectId}/settings endpoint.

Authorizations:
bearerAuth
path Parameters
projectId
required
integer <int64> (LongId)

Knowledge base project identifier.

Request Body schema: application/json
required
name
required
string

Project name.

Responses

Request samples

Content type
application/json
{
  • "name": "Information service"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "status": "CREATED",
  • "resources": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "indexingPriority": 1,
  • "indexingRetryCount": 10
}

Delete project

Delete the knowledge base project. An administrative API key is required for the operation.

Authorizations:
bearerAuth
path Parameters
projectId
required
integer <int64> (LongId)

Knowledge base project identifier.

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "description": "string"
}

Get project settings

Get knowledge base project settings. This endpoint accepts both project and administrative API keys.

For a detailed description of the settings, see the documentation.

Authorizations:
bearerAuth
path Parameters
projectId
required
integer <int64> (LongId)

Knowledge base project identifier.

Responses

Response samples

Content type
application/json
{
  • "indexing": {
    },
  • "search": {
    },
  • "generation": {
    }
}

Update project settings

Update knowledge base project settings. This endpoint accepts both project and administrative API keys.

The request must include all project settings, including existing values for any settings that do not need to be changed. We recommend retrieving the current settings first using GET /projects/{projectId}/settings.

For a detailed description of the settings, see the documentation.

Authorizations:
bearerAuth
path Parameters
projectId
required
integer <int64> (LongId)

Knowledge base project identifier.

Request Body schema: application/json
required
required
object (ProjectIndexingSettingsDTO)

Indexing settings. For a detailed description, see the documentation.

required
object (ProjectSearchSettingsDTO)

Chunk search settings. For a detailed description, see the documentation.

required
object (ProjectGenerationSettingsDTO)

Response generation settings. For a detailed description, see the documentation.

Responses

Request samples

Content type
application/json
{
  • "indexing": {
    },
  • "search": {
    },
  • "generation": {
    }
}

Response samples

Content type
application/json
{
  • "indexing": {
    },
  • "search": {
    },
  • "generation": {
    }
}

QueriesPublic

Independent requests for chunk retrieval or response generation. The message history can be optionally passed within the request.

Retrieve chunks

Retrieve chunks relevant to the user’s query.

Authorizations:
bearerAuth
Request Body schema: application/json
required
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 (AccessSettings)

Settings for filtering sources.

If the integrationId and externalUserId parameters are specified, a list of access groups is automatically generated based on the user’s permissions in Confluence. This is combined with the list from the accessControlAttributes parameter. For For a detailed description, see the documentation.

object (RetrievingSettings)

Chunk search settings.

enableAgentTableProcessing
boolean
Default: false

Retrieve chunks from CSV and XLSX files using LLM (this may increase costs).

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "history": [
    ],
  • "accessSettings": {
    },
  • "settings": {
    },
  • "enableAgentTableProcessing": false
}

Response samples

Content type
application/json
{
  • "chunks": [
    ]
}

Generate response

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.

Authorizations:
bearerAuth
Request Body schema: application/json
required
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 (AccessSettings)

Settings for filtering sources.

If the integrationId and externalUserId parameters are specified, a list of access groups is automatically generated based on the user’s permissions in Confluence. This is combined with the list from the accessControlAttributes parameter. For For a detailed description, see the documentation.

object (RagSettings)

Query processing settings.

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "history": [
    ],
  • "accessSettings": {
    },
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "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": [
    ]
}

Generate response (asynchronous request)

Asynchronous request to generate a response to the user’s query.

The result can be obtained via GET /query/{queryId} endpoint, where queryId is the request identifier received in the current response.

Authorizations:
bearerAuth
Request Body schema: application/json
required
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 (AccessSettings)

Settings for filtering sources.

If the integrationId and externalUserId parameters are specified, a list of access groups is automatically generated based on the user’s permissions in Confluence. This is combined with the list from the accessControlAttributes parameter. For For a detailed description, see the documentation.

object (RagSettings)

Query processing settings.

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "history": [
    ],
  • "accessSettings": {
    },
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "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": [
    ]
}

Generate response (streaming)

Request to generate a response to a user query, with a result streamed as Server-Sent Events (SSE).

The response is returned in SSE format with the following event types:

  • start: start of processing
  • chunk: a portion of the LLM response
  • done: completion with the full response and metadata
  • error: error information.

Ensure that your HTTP client supports SSE and has a connection timeout set to more than 1 minute.

Authorizations:
bearerAuth
Request Body schema: application/json
required
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 (AccessSettings)

Settings for filtering sources.

If the integrationId and externalUserId parameters are specified, a list of access groups is automatically generated based on the user’s permissions in Confluence. This is combined with the list from the accessControlAttributes parameter. For For a detailed description, see the documentation.

object (RagSettings)

Query processing settings.

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "history": [
    ],
  • "accessSettings": {
    },
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "code": "string",
  • "description": "string"
}

Processing status of the response generation request

Get the current processing status of the response generation request. Long polling is used if the waitTimeSeconds parameter is specified.

Authorizations:
bearerAuth
path Parameters
queryId
required
integer <int64> (LongId)

Identifier of the response generation request.

query Parameters
waitTimeSeconds
integer <int32> [ 0 .. 30 ]
Default: 3

HTTP request timeout. Used in long polling.

Responses

Response samples

Content type
application/json
{
  • "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": [
    ]
}

Cancel response generation request

Authorizations:
bearerAuth
path Parameters
queryId
required
integer <int64> (LongId)

Identifier of the response generation request.

Responses

Response samples

Content type
application/json
{
  • "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": [
    ]
}

ChatsPublic

Requests for chunk retrieval and response generation within a user chat.

Create chat

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
string

Name of the user’s chat.

object (RagSettings)

Query processing settings.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "settings": {
    }
}

Get chat info

Authorizations:
bearerAuth
path Parameters
chatId
required
integer <int64> (LongId)

Identifier of the chat in the knowledge base project.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "settings": {
    }
}

Retrieve chunks

Retrieve chunks that are relevant to the user’s query within the chat.

Authorizations:
bearerAuth
path Parameters
chatId
required
integer <int64> (LongId)

Identifier of the chat in the knowledge base project.

Request Body schema: application/json
required
query
required
string

Text of the user’s query.

object (AccessSettings)

Settings for filtering sources.

If the integrationId and externalUserId parameters are specified, a list of access groups is automatically generated based on the user’s permissions in Confluence. This is combined with the list from the accessControlAttributes parameter. For For a detailed description, see the documentation.

object (RetrievingSettings)

Chunk search settings.

enableAgentTableProcessing
boolean
Default: false

Retrieve chunks from CSV and XLSX files using LLM (this may increase costs).

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "accessSettings": {
    },
  • "settings": {
    },
  • "enableAgentTableProcessing": false
}

Response samples

Content type
application/json
{
  • "chunks": [
    ]
}

Generate response

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.

Authorizations:
bearerAuth
path Parameters
chatId
required
integer <int64> (LongId)

Identifier of the chat in the knowledge base project.

Request Body schema: application/json
required
query
required
string

Text of the user’s query.

object (AccessSettings)

Settings for filtering sources.

If the integrationId and externalUserId parameters are specified, a list of access groups is automatically generated based on the user’s permissions in Confluence. This is combined with the list from the accessControlAttributes parameter. For For a detailed description, see the documentation.

object (RagSettings)

Query processing settings.

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "accessSettings": {
    },
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "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": [
    ]
}

Generate response (asynchronous request)

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 /chat/{chatId}/query/{queryId} endpoint, where queryId is the request identifier received in the current response.

Authorizations:
bearerAuth
path Parameters
chatId
required
integer <int64> (LongId)

Identifier of the chat in the knowledge base project.

Request Body schema: application/json
required
query
required
string

Text of the user’s query.

object (AccessSettings)

Settings for filtering sources.

If the integrationId and externalUserId parameters are specified, a list of access groups is automatically generated based on the user’s permissions in Confluence. This is combined with the list from the accessControlAttributes parameter. For For a detailed description, see the documentation.

object (RagSettings)

Query processing settings.

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "accessSettings": {
    },
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "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": [
    ]
}

Processing status of the response generation request

Get the current processing status of the response generation request within a user chat. Long polling is used if the waitTimeSeconds parameter is specified.

Authorizations:
bearerAuth
path Parameters
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.

query Parameters
waitTimeSeconds
integer <int32> [ 0 .. 30 ]
Default: 3

HTTP request timeout. Used in long polling.

Responses

Response samples

Content type
application/json
{
  • "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": [
    ]
}

Cancel response generation request within a user chat

Authorizations:
bearerAuth
path Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "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": [
    ]
}

SourcesPublic

Sources operations.

Get list of sources

Get the list of knowledge base sources.

Authorizations:
bearerAuth
query Parameters
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:

  • READY_TO_INGEST: Ready for indexing.
  • PROCESSING: In progress.
  • INGESTED: Indexed.
  • FAILED_TO_INGEST: Indexing error.

Responses

Response samples

Content type
application/json
{
  • "sources": [
    ]
}

Add from text

Add the provided text as a source to the knowledge base. Indexing begins automatically after the source is added.

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
string

Name of the source. It must include the file extension (for example, txt, md, or json) and be unique within the project. If not specified, it is automatically generated.

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 instead.

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.

accessControlAttributes
Array of strings

Access groups that have permission to the source. If a group with the specified name does not exist, it will be created.

If no access groups are assigned, all users have access.

Access groups can only be assigned when adding the source.

Responses

Request samples

Content type
application/json
{
  • "name": "filename.txt",
  • "text": "string",
  • "segment": "string",
  • "segments": [
    ],
  • "accessControlAttributes": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "segments": [
    ],
  • "status": "string",
  • "lastError": "string",
  • "version": "string",
  • "sizeBytes": 0,
  • "sizeChars": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "type": "FILE",
  • "accessControlAttributes": [
    ],
  • "hash": "sha256:abcd1234ef5678…"
}

Update with text

Replace the source with the text provided. Indexing begins automatically after the source is updated.

Authorizations:
bearerAuth
Request Body schema: application/json
required
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 instead.

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.

accessControlAttributes
Array of strings

This value is ignored when the source is updated.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "text": "string",
  • "segment": "string",
  • "segments": [
    ],
  • "accessControlAttributes": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "segments": [
    ],
  • "status": "string",
  • "lastError": "string",
  • "version": "string",
  • "sizeBytes": 0,
  • "sizeChars": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "type": "FILE",
  • "accessControlAttributes": [
    ],
  • "hash": "sha256:abcd1234ef5678…"
}

Add from file

Add the provided file as a source to the knowledge base. Indexing begins automatically after the source is added.

Authorizations:
bearerAuth
Request Body schema: multipart/form-data
required
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 instead.

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.

accessControlAttributes
Array of strings

Access groups that have permission to the source. If a group with the specified name does not exist, it will be created.

If no access groups are assigned, all users have access.

Access groups can only be assigned when adding the source.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "segments": [
    ],
  • "status": "string",
  • "lastError": "string",
  • "version": "string",
  • "sizeBytes": 0,
  • "sizeChars": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "type": "FILE",
  • "accessControlAttributes": [
    ],
  • "hash": "sha256:abcd1234ef5678…"
}

Update with file

Replace the source with the file provided. Indexing begins automatically after the source is updated.

Authorizations:
bearerAuth
Request Body schema: multipart/form-data
required
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 instead.

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.

accessControlAttributes
Array of strings

This value is ignored when the source is updated.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "segments": [
    ],
  • "status": "string",
  • "lastError": "string",
  • "version": "string",
  • "sizeBytes": 0,
  • "sizeChars": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "type": "FILE",
  • "accessControlAttributes": [
    ],
  • "hash": "sha256:abcd1234ef5678…"
}

Get source info

Get information about the knowledge base source.

Authorizations:
bearerAuth
path Parameters
sourceId
required
integer <int64> (LongId)

Identifier of the source in the knowledge base project.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "segments": [
    ],
  • "status": "string",
  • "lastError": "string",
  • "version": "string",
  • "sizeBytes": 0,
  • "sizeChars": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "type": "FILE",
  • "accessControlAttributes": [
    ],
  • "hash": "sha256:abcd1234ef5678…"
}

Delete source

Delete the source from the knowledge base.

Authorizations:
bearerAuth
path Parameters
sourceId
required
integer <int64> (LongId)

Identifier of the source in the knowledge base project.

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "description": "string"
}

Export source

Export the source file from the knowledge base.

Authorizations:
bearerAuth
path Parameters
sourceId
required
integer <int64> (LongId)

Identifier of the source in the knowledge base project.

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "description": "string"
}

IntegrationsPublic

Integrations operations.

Create integration

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.

Authorizations:
bearerAuth
Request Body schema: application/json
required
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.

accessControlAttributes
Array of strings

Access groups that have permission to sources imported from this integration. If a group with the specified name does not exist, it will be created. If no access groups are assigned, all users have access.

required
object (IntegrationSettings)

Integration settings.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "autoSync": true,
  • "downloadAttachmentFiles": true,
  • "syncIntervalMinutes": 0,
  • "accessControlAttributes": [
    ],
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "autoSync": true,
  • "syncIntervalMinutes": 0,
  • "settings": {
    },
  • "status": "ACTIVE",
  • "lastError": "string",
  • "accessControlAttributes": [
    ],
  • "lastSuccessfulSyncAt": "2019-08-24T14:15:22Z"
}

Get list of integrations

Get the list of knowledge base integrations.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "integrations": [
    ]
}

Get integration info

Get information about the integration.

Authorizations:
bearerAuth
path Parameters
integrationId
required
integer <int64> (LongId)

Identifier of the integration.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "autoSync": true,
  • "syncIntervalMinutes": 0,
  • "settings": {
    },
  • "status": "ACTIVE",
  • "lastError": "string",
  • "accessControlAttributes": [
    ],
  • "lastSuccessfulSyncAt": "2019-08-24T14:15:22Z"
}

Delete integration

Remove the integration from the knowledge base.

Authorizations:
bearerAuth
path Parameters
integrationId
required
integer <int64> (LongId)

Identifier of the integration.

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "description": "string"
}

SegmentsPublic

Knowledge base segments (tags) operations.

Get list of segments

Get the paginated list of knowledge base segments (tags), filtered by name.

Authorizations:
bearerAuth
query Parameters
pageNum
integer <int32>
Default: 0

Page number for pagination, starting from 0.

pageSize
integer <int32>
Default: 20

Page size.

name
string

Filters items by their name. The search is case-insensitive and matches any substring.

Responses

Response samples

Content type
application/json
{
  • "segments": [
    ],
  • "paging": {
    }
}

Rename segment

Change the name of a segment (tag) across all assigned sources.

Authorizations:
bearerAuth
Request Body schema: application/json
required
oldName
required
string

Current segment name.

newName
required
string

New segment name. Must be 1 to 100 characters long. Commas are not allowed.

Responses

Request samples

Content type
application/json
{
  • "oldName": "Law",
  • "newName": "Legal documents"
}

Response samples

Content type
application/json
{
  • "updatedFileIds": [
    ]
}

Assign segments to sources

Add the specified segments (tags) to the list of segments assigned to each source.

Authorizations:
bearerAuth
Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "sourceIds": [
    ],
  • "segments": [
    ]
}

Response samples

Content type
application/json
{
  • "updatedFileIds": [
    ]
}

Unassign segments from sources

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.

Authorizations:
bearerAuth
Request Body schema: application/json
required
sourceIds
required
Array of integers <int64> (LongId) [ items <int64 > ]

Identifiers of the sources.

segments
required
Array of strings

Segments to unassign from the sources.

Responses

Request samples

Content type
application/json
{
  • "sourceIds": [
    ],
  • "segments": [
    ]
}

Response samples

Content type
application/json
{
  • "updatedFileIds": [
    ]
}

IndexingPublic

Indexing control.

Start indexing of knowledge base

Start indexing of sources that haven’t been indexed since upload or whose indexing previously failed.

Authorizations:
bearerAuth

Responses

Stop indexing of knowledge base

Terminate the ongoing indexing.

Authorizations:
bearerAuth

Responses

ApiKeysPublic

Operations on project API keys.

Create API key

Create a new API key for the knowledge base project. An administrative API key is required for the operation.

Authorizations:
bearerAuth
path Parameters
projectId
required
integer <int64> (LongId)

Knowledge base project identifier.

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "name": "For website and apps",
  • "expiredAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "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 list of API keys

Get the list of API keys for the knowledge base project. An administrative API key is required for the operation.

Authorizations:
bearerAuth
path Parameters
projectId
required
integer <int64> (LongId)

Knowledge base project identifier.

query Parameters
pageNum
integer <int32>
Default: 0

Page number for pagination, starting from 0.

pageSize
integer <int32>
Default: 20

Page size.

onlyActive
boolean
Default: false

Return only active API keys.

Responses

Response samples

Content type
application/json
{
  • "content": [
    ],
  • "paging": {
    }
}

Revoke API key

Revoke the API key for the knowledge base project. An administrative API key is required for the operation.

Authorizations:
bearerAuth
path Parameters
projectId
required
integer <int64> (LongId)

Knowledge base project identifier.

apiKeyId
required
integer <int64> (LongId)

API key identifier.

Responses

Response samples

Content type
application/json
{
  • "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"
}

AccessControlPublic

Get list of access groups

Get the list of access groups in the account. An administrative API key is required for the operation.

Authorizations:
bearerAuth
query Parameters
pageNum
integer <int32>
Default: 0

Page number for pagination, starting from 0.

pageSize
integer <int32>
Default: 20

Page size.

name
string <= 100 characters
Example: name=HR

Filters access groups by their name. The search is case-insensitive and matches any substring.

projectIds
Array of integers <int64> [ items <int64 > ]
Example: projectIds=1,2,3

Filters access groups assigned to any source in any of the specified projects. Specify project IDs as a comma-separated string.

Responses

Response samples

Content type
application/json
{
  • "content": [
    ],
  • "paging": {
    }
}

Access group details

Get detailed information about an access group with the paginated list of sources. An administrative API key is required for the operation.

Authorizations:
bearerAuth
path Parameters
attributeId
required
integer <int64> (LongId)

Access group identifier.

query Parameters
pageNum
integer <int32>
Default: 0

Page number for pagination, starting from 0.

pageSize
integer <int32>
Default: 20

Page size.

filename
string

Filters sources by their name. The search is case-insensitive and matches any substring.

projectIds
string

Filters sources from the specified projects. Specify project IDs as a comma-separated string.

segments
string

Filters sources assigned to the specified segments. Specify segments as a comma-separated string.

Responses

Response samples

Content type
application/json
{
  • "attribute": {
    },
  • "files": [
    ],
  • "paging": {
    }
}