Update Knowledge Base

Update Knowledge Base

This method allows you to update a previously created knowledge base using its ID.

You can obtain the ID of the knowledge base to update either from the API response when you created the knowledge base, or by listing the available knowledge bases.

It is sufficient to provide the fields that should be changed. To reset/remove a property from the knowledge base, use the null value.

Note that some properties of the knowledge base, such as its type, cannot be changed after the creation. For details, refer to the method to Create a new knowledge base.

Request
URI
PATCH
https://{api_host}/api/v1/control/knowledge-bases/{knowledge_base_id}
COPY
Path Parameters
string
knowledge_base_id
Required

knowledge_base_id


Request Body
KnowledgeBaseUpdateRequest of type(s) application/json
Required
{
    "name": "string",
    "description": "string"
}
string
name
Optional
Constraints: maxLength: 256

Name of the knowledge base.

string
description
Optional

Description of the knowledge base.

index_refresh_policy
Optional

Policy defining when to refresh the index of the knowledge base.

Authentication
This operation uses the following authentication methods.
Responses
200

Successful Response

Returns KnowledgeBase of type(s) application/json
"KnowledgeBase Object"
string As uuid As uuid
id
Required

ID of the knowledge base.

string
name
Optional
Constraints: maxLength: 256

Name of the knowledge base.

string
description
Optional

Description of the knowledge base.

index_refresh_policy
Required

Policy defining when to refresh the index of the knowledge base.

string
data_origin_type
Required

data_origin_type

Possible values are : DATA_SOURCES, LOCAL_FILES,
string
object
Optional
Constraints: default: knowledge_base

Object type, which is always knowledge_base.

integer
created_at
Required

Unix timestamp (in seconds) when the knowledge base was created.

integer
last_updated_at
Required

Unix timestamp (in seconds) when the knowledge base was last updated.

integer
next_index_refresh_at
Optional

Unix timestamp (in seconds) of the next scheduled indexing.


400

An unsupported knowledge base configuration was provided.

Operation doesn't return any data structure

404

Invalid knowledge base ID.

Operation doesn't return any data structure

422

Validation Error

Returns HTTPValidationError of type(s) application/json
"HTTPValidationError Object"
array of object
detail
Optional

detail


Code Samples
COPY
                    curl -X PATCH -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}'