Manage data sources and documents

Add, preview, query, or delete data sources in an existing knowledge base, and view related documents and processed artifacts. This page does not create knowledge bases or modify segment content.

Prerequisites

Prepare credentials that can access the target workspace and the target knowledge base ID. For service endpoints, authentication, and general request formats, see Prepare to call an API.

If data comes from a local file, select the upload action that matches when you are creating the knowledge base. A successful upload does not mean the data source has been added to the knowledge base.

Call sequence

  1. First list data sources to confirm existing data sources in the target knowledge base.

  2. To upload a local file, choose the upload action based on whether it is before knowledge-base creation, and retain file or data-source information returned by that action page.

  3. Preview data sources to add before adding them. After confirming the preview, add data.

  4. After adding, query data sources, documents, or processed artifacts to confirm observable results. To remove data, delete it with the target data-source ID.

API operations

Upload, preview, and add data sources

What you need to do

API operation

Use it when

Upload local files before creation

Upload local files before creating a knowledge base

Prepare local files before creating a knowledge base.

Upload local files

Upload local files to a knowledge base

Prepare local files for an existing knowledge base.

Preview data sources to add

Preview data to add

Check input before adding data sources to an existing knowledge base.

Preview data sources at creation

Preview data before creating a knowledge base

Check input before providing data sources at knowledge-base creation.

Add data sources

Add data

Add data sources to the target knowledge base after confirming the preview.

Backfill historical data-source relationships

Backfill data records for a knowledge base

Complete historical data-source relationships.

Query, preview, and maintain data sources

What you need to do

API operation

Use it when

Check whether a data source is added

Check whether data has been added

Confirm the relationship for a specified data source before or after adding it.

Query data sources

List data sources

Obtain data sources and their IDs in the target knowledge base.

Query document details

Get document details

You have a document ID and need to view the document.

Preview a source file

Preview a source file

Inspect a data source’s original file.

Preview a processed artifact

Preview a processed artifact image

Inspect a data source’s processing result.

Update data-source governance settings

Update data settings

You identified a target data source and need to adjust governance settings.

Delete a data source

Delete data

Confirm impact and conditions on the action page before deletion.

Confirm the result

After adding or updating, use List data sources to confirm data-source relationships. To verify content, use Get document details, Preview a source file, or Preview a processed artifact image.

Limitations and notes

Deleting a data source affects that source in the target knowledge base. Confirm conditions and results in Delete data before proceeding.

Next steps

Last updated on