All Products
Search
Document Center

Platform For AI:ListKnowledgeBaseJobs

Last Updated:Mar 14, 2026

Get the Knowledge Base task list.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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 Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
pailangstudio:ListKnowledgeBaseJobslist
*All Resources
*
    none
none

Request syntax

GET /api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasejobs HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
WorkspaceIdstringNo

知识库所在工作空间 ID。

478**
KnowledgeBaseIdstringNo

知识库 ID。

d-ksicx823d
KnowledgeBaseJobIdstringNo

知识库任务 ID。

kbjob-9m******54
StatusstringNo

知识库任务状态。

  • Running: 运行中。
  • Success: 运行成功。
  • Failed: 运行失败。
Running
JobActionstringNo

任务操作类型。

  • SyncIndex:更新知识库索引
SyncIndex
NextTokenstringNo

用来标记当前开始读取的位置,置空表示从头开始。

10
MaxResultsintegerNo

使用 NextToken 方式查询时,每次最多返回的结果数。

10
SortBystringNo

排序字段。目前只支持 GmtCreateTime。

GmtCreateTime
OrderstringNo

排序方式。

  • ASC:升序。
  • DESC:降序。
DESC
PageNumberintegerNo

当前页数。 取值范围:大于 0。 默认值:1。如果同时传入 MaxResults,则使用 NextToken 查询方式,忽略此字段值。

1
PageSizeintegerNo

每页查询的数量。如果同时传入 MaxResults,则以 MaxResults 数量为准。

10

Response parameters

ParameterTypeDescriptionExample
object
KnowledgeBaseJobsarray

知识库任务列表。

KnowledgeBaseJobKnowledgeBaseJob

知识库任务详情。

MaxResultsinteger

本次请求允许返回的最大记录条数。

20
NextTokenstring

返回下一次查询开始的位置。为空表示已经获取了全部数据。

20
TotalCountinteger

总记录条数。

32
RequestIdstring

请求 ID。

963BD7F9-0C02-5594-9550-BCC6DD43E3C0

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 timeSummary of changesOperation
2026-01-08The response structure of the API has changedView Change Details