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.

HTTP
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

Shell
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

model_id

integer

Yes

knowledge base ID.

Query parameters

Field

Type

Required

Description

page

integer

No

Page number, must be a positive integer.

page_size

integer

No

The number of items on a single page, ranging from 1 to 100.

Successful response

JSON
{
  "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

code

string

OK on success.

msg

string

OK on success.

data

object

response data.

data.items

array of object

The source record of the current page.

data.total

integer

The total number of sources matching the criteria.

data.page

integer

Current page number.

data.page_size

integer

Current page size.

data.legacy_backfill_required

boolean

Whether it is necessary to complete the old source relationship.

data.items[].row_id

string

Source record ID.

data.items[].source_id

string

Source ID. Returns if not empty.

data.items[].source_type

string

Source type: file, volume or table.

data.items[].model_id

integer

Belonging knowledge base ID.

data.items[].resource_id

string

Source resource ID.

data.items[].source_resource_id

string

Original resource ID. Returned if there is a value.

data.items[].kb_resource_id

string

Resource ID on the knowledge base side. Returned if there is a value.

data.items[].source_file_id

string

Original file ID. Returned if there is a value.

data.items[].kb_file_id

string

knowledge base file ID. Returned if there is a value.

data.items[].source_table_id

integer

Original table ID. Returned if there is a value.

data.items[].kb_table_id

integer

knowledge base table ID. Returned if there is a value.

data.items[].display_name

string or null

Display name.

data.items[].path

array of string

Source path.

data.items[].source_path

string

Original source path. Returned if there is a value.

data.items[].db_name

string or null

Database name.

data.items[].table_name

string or null

Table name.

data.items[].size_bytes

integer or null

File size.

data.items[].row_count

integer or null

Number of table rows.

data.items[].ingest_status

string or null

Source processing status.

data.items[].enabled

boolean or null

The enabled status of the configuration.

data.items[].expires_at

integer or null

Expiration time.

data.items[].expired

boolean

Has it expired?

data.items[].effective_enabled

boolean

Actual effective status.

data.items[].force_enabled_after_expiry

boolean

Whether to force activation after expiration.

data.items[].tags

array of string

Source tag. Returns if not empty.

data.items[].created_by

string

Creator ID. Returned if there is a value.

data.items[].updated_by

string

Last updated by ID. Returned if there is a value.

data.items[].updated_at

integer or null

Last updated time.

data.items[].error

string or null

Handle error summaries.

data.items[].governance_status

string

Data source management status. Returns if not empty.

data.items[].legacy_origin

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.

Calculate the last page based on data.total and page_size at the time of request, and then add page in sequence.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "Bad Request"
}

Field

Type

Description

code

string

error code.

msg

string

Error description.

Last updated on