Query knowledge base details¶
Read the complete metadata of a knowledge base, including associated assets, index status, and versions.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/knowledge-bases/{knowledge_base_id}
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 agent 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/workspaces/$WORKSPACE_ID/knowledge-bases/$KNOWLEDGE_BASE_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The current workspace ID must be consistent with X-Workspace-ID. |
|
string |
Yes |
The knowledge base ID to view. |
Successful response¶
{
"code": 0,
"data": {
"id": "kb_01",
"workspace_id": "ws_01",
"name": "产品文档",
"description": "已审核的产品资料",
"status": "active",
"source_type": "catalog_resource",
"catalog_asset_refs": [
{
"type": "catalog",
"id": "cat_01",
"role": "source"
}
],
"tags": ["产品", "文档"],
"owner_user_id": "user_01",
"visibility": "workspace",
"index_status": "ready",
"last_indexed_at": "2026-08-18T01:00:00Z",
"version": 2,
"labels": {
"department": "product"
},
"created_by": "user_01",
"updated_by": "user_01",
"created_at": "2026-08-18T01:00:00Z",
"updated_at": "2026-08-18T02:00:00Z"
}
}
Returns 200 on success. data is knowledge base metadata.
Field |
Type |
Description |
|---|---|---|
|
integer |
0 on success. |
|
string |
knowledge base ID. |
|
string |
The workspace ID to which it belongs. |
|
string |
Name and description. Does not return if description is not set. |
|
string |
Name and description. Does not return if description is not set. |
|
string |
knowledge base status and source type. |
|
string |
knowledge base status and source type. |
|
array |
Related assets. Does not return if not set. For member description, see Create the associated asset field in the knowledge base. |
|
string |
Configuration references are retrieved by default. Does not return if not set. |
|
array of string |
label. Does not return if not set. |
|
string |
Owner user ID. Does not return if not set. |
|
string |
Visible range and index status. |
|
string |
Visible range and index status. |
|
string |
Last index time and error message. Does not return if not set. |
|
string |
Last index time and error message. Does not return if not set. |
|
integer |
Resource version. |
|
object |
Extended tags, annotations and metadata. Does not return if not set. |
|
object |
Extended tags, annotations and metadata. Does not return if not set. |
|
object |
Extended tags, annotations and metadata. Does not return if not set. |
|
string |
Creator and last updated ID. Does not return if not set. |
|
string |
Creator and last updated ID. Does not return if not set. |
|
string |
Creation and last update times, in RFC 3339 format. |
|
string |
Creation and last update times, in RFC 3339 format. |
Error response¶
{
"code": 3,
"message": "knowledge base not found"
}
Common HTTP errors
HTTP status code |
error code |
Description |
|---|---|---|
|
|
The path parameter is invalid. Recommendation: Check the workspace ID and knowledge base ID, do not use path separators in the ID. |
|
|
Valid identity credentials are missing. Recommendation: Check the API Key. |
|
|
The knowledge base does not exist in the current workspace. Suggestion: Check |
|
|
The knowledge base service is temporarily unavailable. Suggestion: Try again later. |