Query data source list¶
Paging query data sources and their processing status in the knowledge base. Use the returned source record ID to query details, modify settings, edit segments, or remove the data source.
GET $CLOUDSIGMA_API_BASE/semantic-models/{model_id}/sources
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the knowledge base list to obtain the knowledge base ID. Prepare a personal access token and target workspace ID that can access the target workspace.
Request parameters¶
curl "$CLOUDSIGMA_API_BASE/semantic-models/$MODEL_ID/sources?page=1&page_size=20" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
knowledge base ID. |
Query parameters
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
No |
Page number, must be a positive integer. |
|
integer |
No |
The number of items on a single page, ranging from |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"items": [
{
"row_id": "src_01",
"source_type": "file",
"model_id": 401,
"resource_id": "file_01",
"display_name": "product-guide.pdf",
"path": ["docs", "product-guide.pdf"],
"ingest_status": "ready",
"enabled": true,
"effective_enabled": true,
"governance_status": "managed"
}
],
"total": 1,
"page": 1,
"page_size": 20,
"legacy_backfill_required": false
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
response data. |
|
array of object |
The source record of the current page. |
|
integer |
The total number of sources matching the criteria. |
|
integer |
Current page number. |
|
integer |
Current page size. |
|
boolean |
Whether it is necessary to complete the old source relationship. |
|
string |
Source record ID. |
|
string |
Source ID. Returns if not empty. |
|
string |
Source type: |
|
integer |
Belonging knowledge base ID. |
|
string |
Source resource ID. |
|
string |
Original resource ID. Returned if there is a value. |
|
string |
Resource ID on the knowledge base side. Returned if there is a value. |
|
string |
Original file ID. Returned if there is a value. |
|
string |
knowledge base file ID. Returned if there is a value. |
|
integer |
Original table ID. Returned if there is a value. |
|
integer |
knowledge base table ID. Returned if there is a value. |
|
string or null |
Display name. |
|
array of string |
Source path. |
|
string |
Original source path. Returned if there is a value. |
|
string or null |
Database name. |
|
string or null |
Table name. |
|
integer or null |
File size. |
|
integer or null |
Number of table rows. |
|
string or null |
Source processing status. |
|
boolean or null |
The enabled status of the configuration. |
|
integer or null |
Expiration time. |
|
boolean |
Has it expired? |
|
boolean |
Actual effective status. |
|
boolean |
Whether to force activation after expiration. |
|
array of string |
Source tag. Returns if not empty. |
|
string |
Creator ID. Returned if there is a value. |
|
string |
Last updated by ID. Returned if there is a value. |
|
integer or null |
Last updated time. |
|
string or null |
Handle error summaries. |
|
string |
Data source management status. Returns if not empty. |
|
string |
Historical source markers. Returned if there is a value. |
The list does not return the ETag of the staging snapshot. Before writing the segment, separately query the knowledge base document details to obtain data.etag.
Read next page
Calculate the last page based on data.total and page_size at the time of request, and then add page in sequence.
Error response¶
{
"code": "ErrParamInvalid",
"msg": "Bad Request"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Error description. |