Clone Knowledge Base

Clone Knowledge Base
Clone a knowledge base by its ID.

Clone an existing knowledge base.

A cloned knowledge base contains the same configuration as the original knowledge base (at the time of cloning - later changes are not propagated to the clone).

Note that this only clones the knowledge base without cloning any index that belongs to that knowledge base or any contents stored in the index.

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

knowledge_base_id


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

Name of the new knowledge base. If omitted, the name of the cloned knowledge base is used.

Authentication
This operation uses the following authentication methods.
Responses
200

Successful Response

Returns KnowledgeBaseDetails of type(s) application/json
{
    "id": "string",
    "name": "string",
    "description": "string",
    "index_refresh_policy": {
        "policy_type": "string"
    },
    "data_origin_type": "string",
    "object": "string",
    "created_at": 0,
    "last_updated_at": 0,
    "next_index_refresh_at": 0,
    "status": "string",
    "num_linked_data_sources": 0,
    "num_linked_agents": 0
}
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.

string
status
Required

Availability status of a knowledge base.

Possible values are : AVAILABLE, ERROR, NOT_CONFIGURED,
integer
num_linked_data_sources
Required

Number of linked data sources.

integer
num_linked_agents
Required

Number of agents using this knowledge base.


404

Invalid knowledge base ID.

Operation doesn't return any data structure

422

Validation Error

Returns HTTPValidationError of type(s) application/json
{
    "detail": [
        {
            "loc": [
                {}
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
array of object
detail
Optional

detail


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/api/v1/control/knowledge-bases/{knowledge_base_id}/clone