Get the Knowledge Base task list.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| pailangstudio:ListKnowledgeBaseJobs | list | *All Resources * |
| none |
Request syntax
GET /api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasejobs HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | No | 知识库所在工作空间 ID。 | 478** |
| KnowledgeBaseId | string | No | 知识库 ID。 | d-ksicx823d |
| KnowledgeBaseJobId | string | No | 知识库任务 ID。 | kbjob-9m******54 |
| Status | string | No | 知识库任务状态。
| Running |
| JobAction | string | No | 任务操作类型。
| SyncIndex |
| NextToken | string | No | 用来标记当前开始读取的位置,置空表示从头开始。 | 10 |
| MaxResults | integer | No | 使用 NextToken 方式查询时,每次最多返回的结果数。 | 10 |
| SortBy | string | No | 排序字段。目前只支持 GmtCreateTime。 | GmtCreateTime |
| Order | string | No | 排序方式。
| DESC |
| PageNumber | integer | No | 当前页数。 取值范围:大于 0。 默认值:1。如果同时传入 MaxResults,则使用 NextToken 查询方式,忽略此字段值。 | 1 |
| PageSize | integer | No | 每页查询的数量。如果同时传入 MaxResults,则以 MaxResults 数量为准。 | 10 |
Response parameters
Examples
Sample success responses
JSONformat
{
"KnowledgeBaseJobs": [
{
"WorkspaceId": "",
"Accessibility": "",
"Creator": "",
"GmtCreateTime": "",
"GmtModifiedTime": "",
"KnowledgeBaseId": "",
"KnowledgeBaseJobId": "",
"JobAction": "",
"Description": "",
"Status": "",
"ResourceId": "",
"EcsSpecs": [
{
"Type": "",
"InstanceType": "",
"PodCount": 0,
"CPU": 0,
"GPU": 0,
"Memory": 0,
"SharedMemory": 0,
"GPUType": "",
"Driver": ""
}
],
"UserVpc": {
"VpcId": "",
"VSwitchId": "",
"SecurityGroupId": ""
},
"MaxRunningTimeInSeconds": 0,
"GmtFinishTime": "",
"ErrorMessage": "",
"PipelineRunInfo": {
"PipelineRunId": ""
},
"KnowledgeBaseJobResult": {
"TotalFileCount": 0,
"AddChunkCount": 0,
"DeleteChunkCount": 0,
"FileMetas": [
{
"FileMetaId": "",
"FileName": "",
"FileUri": "",
"Action": ""
}
]
},
"EmbeddingConfig": {
"BatchSize": 0,
"Concurrency": 0
}
}
],
"MaxResults": 20,
"NextToken": 20,
"TotalCount": 32,
"RequestId": "963BD7F9-0C02-5594-9550-BCC6DD43E3C0"
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2026-01-08 | The response structure of the API has changed | View Change Details |
