Query the knowledge base list¶
Paging lists the knowledge base (semantic model) that can be read by the current workspace. First find the knowledge base ID through this interface, and then query the details or add a data source.
GET $CLOUDSIGMA_API_BASE/semantic-models
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. Prepare a personal access token and target workspace ID that can access the target workspace.
Request parameters¶
curl "$CLOUDSIGMA_API_BASE/semantic-models?page_size=20&search=product&tags=product" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Query parameters
The interface supports server-side paging. Continue to use the next_page_token returned in the response and do not infer the last page based on the current page entry count.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
No |
The number of items on a single page, ranging from |
|
string |
No |
|
|
string |
No |
Search criteria for name or description. |
|
array of string |
No |
Tag filters. Pass parameters repeatedly, such as |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"items": [
{
"id": 401,
"name": "product_docs",
"description": "产品文档",
"tables": [],
"files": [],
"source_counts": {
"files": 2,
"tables": 1,
"total": 3
},
"created_at": 1735632000,
"updated_at": 1735718400
}
],
"total": 1,
"next_page_token": ""
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
response data. |
|
array of object |
The knowledge base of the current page. |
|
integer |
The total number of matches that match the current filter criteria. |
|
string |
The token passed in unchanged when reading the next page. |
|
integer |
Knowledge base ID, which can be used as |
|
string |
knowledge base name. |
|
string |
knowledge base description. May be omitted if not set. |
|
array of object |
Compatible legacy table source definitions. |
|
object |
Compatible legacy file source definitions. May be omitted if not set. |
|
object |
The number of sources that the list or detail path supplements. |
|
integer |
Unix timestamp of creation time. |
|
integer |
Unix timestamp of the time of update. |
|
string |
The name of the database where the table comes from. |
|
array of string |
The name of the table included in the knowledge base in this database. |
|
array of string |
File ID. |
|
array of string |
The parent path of the file source. |
|
array of string |
The volume ID from which the file originated. |
|
array of object |
File source volume and path. |
|
string |
Vector table name. |
|
string |
Embedding model identifier. |
|
array of string |
File source tag. |
|
string |
Volume ID. |
|
array of string |
The parent path of the volume source. |
|
array of string |
File path within the volume. |
|
integer |
Number of file sources. |
|
integer |
Table source number. |
|
integer |
Total number of sources. |
Read next page
When data.next_page_token is not empty, pass it as page_token to the next request until an empty token is returned.
Error response¶
The same response format is returned when the request fails, where data is null.
{
"code": "ErrParamInvalid",
"msg": "page_size is invalid",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Error description. |
|
null |
|