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 Make your first AI Studio API call.
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¶
First list data sources to confirm existing data sources in the target knowledge base.
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.
Preview data sources to add before adding them. After confirming the preview, add data.
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¶
Task |
Use it when |
|---|---|
Prepare local files before creating a knowledge base. |
|
Prepare local files for an existing knowledge base. |
|
Check input before adding data sources to an existing knowledge base. |
|
Check input before providing data sources at knowledge-base creation. |
|
Add data sources to the target knowledge base after confirming the preview. |
|
Complete historical data-source relationships. |
Query, preview, and maintain data sources¶
Task |
Use it when |
|---|---|
Confirm the relationship for a specified data source before or after adding it. |
|
Obtain data sources and their IDs in the target knowledge base. |
|
You have a document ID and need to view the document. |
|
Inspect a data source’s original file. |
|
Inspect a data source’s processing result. |
|
You identified a target data source and need to adjust governance settings. |
|
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.