Batch Create Knowledge Base Data Source Links

Batch Create Knowledge Base Data Source Links

This method allows you to link multiple data sources to a knowledge base using a single request.

For each data source in the request, the response will show you the status of the link between the data source and the knowledge base, or it will provide you with details why linking failed.

For details, refer to the method to Create a link between a data source and a knowledge base.

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

knowledge_base_id


Request Body
LinkedDataSourceBatchCreateRequest of type(s) application/json
Required

Show optional properties

{
    "data_source_ids": [
        {}
    ]
}
{
    "data_source_ids": [
        "string"
    ]
}
array of string
data_source_ids
Required

List of data source IDs to link.

Authentication
This operation uses the following authentication methods.
Responses
200

Successful Response

Returns LinkedDataSourceBatchCreateResponse of type(s) application/json
"LinkedDataSourceBatchCreateResponse Object"
array of object
succeeded
Required

List of data sources successfully linked to the knowledge base.

array of object
failed
Required

List of errors that occurred while linking data sources to the knowledge base.


400

The knowledge base does not support linking to a data source.

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 POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"data_source_ids":["string"]}' https://{api_host}/api/v1/control/knowledge-bases/{knowledge_base_id}/batch/data-sources/link