Query data processing tasks¶
Query the processing tasks and status of knowledge base sources.
GET https://moi.matrixorigin.cn/newmoi/semantic-models/{model_id}/source-jobs
Preparation before calling¶
First query the knowledge base list to obtain the knowledge base ID. Prepare a personal access token and target workspace ID that has access to the target workspace.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.$MODEL_ID: ID of the knowledge base to be queried.
Request example¶
curl "https://moi.matrixorigin.cn/newmoi/semantic-models/$MODEL_ID/source-jobs" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters¶
Parameters |
Type |
Description |
|---|---|---|
|
integer |
Knowledge base ID. |
Successful response¶
Returns 200 on success. Use job_status, error, and reconcile_required to determine whether a task completed, failed, or requires coordination.
{
"code": "OK",
"msg": "OK",
"data": {
"items": [
{
"job_id": "job_01",
"source_id": "src_01",
"job_status": "pending",
"updated_at": 1735632000,
"reconcile_required": false
}
],
"total": 1,
"reconcile_required": false
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object[] |
Source processing task list. |
|
string |
Task ID. |
|
string |
The source ID associated with the task. |
|
string |
Current processing status. |
|
string |
Source file ID; may be omitted if not applicable. |
|
integer |
Source table ID; may be omitted if not applicable. |
|
string |
Reason for failure; may be omitted if there is no error. |
|
integer |
Unix timestamp; may be omitted if no value. |
|
boolean |
Whether the task requires state convergence. |
|
integer |
Total number of tasks. |
|
boolean |
Whether there are tasks that require convergence in the current knowledge base. |
In field paths, [] means each item in an array. For example, data.items[].job_id is the job_id field of each item in data.items.
Error response¶
{
"code": "ErrNotFound",
"msg": "resource not found",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
|
Use the knowledge base ID from the response. |
|
|
The API Key is invalid or has expired. |
Check API Key. |
|
|
The caller does not have permission to read the source task. |
Check workspace and object authorization. |
|
|
The knowledge base does not exist or is not visible. |
Reconfirm |
|
|
The service failed to query the task. |
Keep the desensitized response information and try again. |
Follow-up operations¶
[Reconcile-data-processing-jobs.md] convergence status when any task or knowledge base returns reconcile_required to true.