Skip to main content
POST
/
v4
/
knowledge-base-data-sources
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
)
knowledge_base_data_source = client.knowledge_base_data_sources.create(
    account_id="account_id",
    data_source_config={
        "aws_account_id": "aws_account_id",
        "aws_region": "aws_region",
        "s3_bucket": "s3_bucket",
        "source": "S3",
    },
    name="name",
)
print(knowledge_base_data_source.id)
{
  "name": "<string>",
  "data_source_config": {
    "source": "<string>",
    "s3_bucket": "<string>",
    "aws_region": "<string>",
    "aws_account_id": "<string>",
    "s3_prefix": ""
  },
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "created_by_user_id": "<string>",
  "created_by_identity_type": "user",
  "account_id": "<string>",
  "description": "<string>",
  "tagging_information": {
    "type": "all",
    "tags_to_apply": {}
  }
}

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Body

application/json
name
string
required
data_source_config
S3 DataSource Config · object
required
account_id
string
required

The ID of the account that owns the given entity.

description
string
data_source_auth_config
SharePoint DataSource Auth Config · object
tagging_information
TaggingInformationAll · object

Response

Successful Response

name
string
required
data_source_config
S3 DataSource Config · object
required
id
string
required

The unique identifier of the entity.

created_at
string<date-time>
required

The date and time when the entity was created in ISO format.

updated_at
string<date-time>
required

The date and time when the entity was last updated in ISO format.

created_by_user_id
string
required

The user who originally created the entity.

created_by_identity_type
enum<string>
required

The type of identity that created the entity.

Available options:
user,
service_account
account_id
string
required

The ID of the account that owns the given entity.

description
string
tagging_information
TaggingInformationAll · object