Skip to main content
POST
/
v4
/
knowledge-bases
/
{knowledge_base_id}
/
uploads
Python
import os
from scale_gp import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
create_knowledge_base_upload_response = client.knowledge_bases.uploads.create(
    knowledge_base_id="knowledge_base_id",
    data_source_config={
        "aws_account_id": "aws_account_id",
        "aws_region": "aws_region",
        "s3_bucket": "s3_bucket",
        "source": "S3",
    },
)
print(create_knowledge_base_upload_response.upload_id)
{
  "upload_id": "<string>"
}

Authorizations

x-api-key
string
header
required

Path Parameters

knowledge_base_id
string
required

Body

application/json
data_source_config
S3 DataSource Config · object
required

Configuration for the data source which describes where to find the data.

data_source_auth_config
SharePoint DataSource Auth Config · object

Configuration for the data source which describes how to authenticate to the data source.

chunking_strategy_config
CharacterChunkingStrategyConfig · object

Configuration for the chunking strategy which describes how to chunk the data.

force_reupload
boolean
default:false

Force reingest, regardless the change of the source file.

tagging_information
TaggingInformationPerFile · object

A dictionary of tags to apply to all artifacts added from the data source.

Response

Successful Response

upload_id
string
required

ID of the created knowledge base upload job.