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 this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query the knowledge base list to obtain the knowledge base ID.
Set the operation-specific values used in the request:
$WORKSPACE_ID: Target workspace ID, passed through theX-Workspace-IDheader and also asworkspace_idin the path.$KNOWLEDGE_BASE_ID: ID of the knowledge base to be queried.
Request¶
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
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
Current workspace ID, must be consistent with |
|
string |
Yes |
The ID of the knowledge base to be queried. |
Successful response¶
Returns 200 on success. data is knowledge base metadata.
{
"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"
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
string |
Knowledge base ID. |
|
string |
ID of the workspace to which it belongs. |
|
string |
Name and description; will not be returned if no description is set. |
|
string |
Name and description; will not be returned if no description is set. |
|
string |
Knowledge base status and source type. |
|
string |
Knowledge base status and source type. |
|
object[] |
Associated assets; not returned if not set. Each item can contain |
|
string |
Default retrieval configuration reference; does not return if not set. |
|
string[] |
Label; does not return if not set. |
|
string |
Owner user ID; not returned if not set. |
|
string |
Visible range and index status. |
|
string |
Visible range and index status. |
|
string |
Recent index time and error message; not returned if not set. |
|
string |
Recent index time and error message; not returned if not set. |
|
integer |
Resource version. |
|
object |
Extended tags, comments, and metadata; not returned if not set. |
|
object |
Extended tags, comments, and metadata; not returned if not set. |
|
object |
Extended tags, comments, and metadata; not returned if not set. |
|
string |
Creator and last updater ID; not returned if not set. |
|
string |
Creator and last updater ID; not returned if not set. |
|
string |
Creation and last update times, in RFC 3339 format. |
|
string |
Creation and last update times, in RFC 3339 format. |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Error response¶
{
"code": 3,
"message": "knowledge base not found"
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The path parameter is invalid. |
Check the workspace ID and knowledge base ID and do not use path separators in the ID. |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The knowledge base does not exist in the current workspace. |
Check out |
|
|
The knowledge base service is temporarily unavailable. |
Try again later. |
Follow-up operations¶
When metadata needs to be modified, call Update knowledge base.