Query data processing tasks

Query the processing tasks and status of the knowledge base source.

HTTP
GET $CLOUDSIGMA_API_BASE/semantic-models/{model_id}/source-jobs

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 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

Shell
curl "$CLOUDSIGMA_API_BASE/semantic-models/$MODEL_ID/source-jobs" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Field

Type

Required

Description

model_id

integer

Yes

knowledge base ID.

Successful response

JSON
{
  "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
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

object

response data.

data.items

array of object

Source processing task list.

data.total

integer

Total number of tasks.

data.reconcile_required

boolean

Whether there are tasks in the knowledge base that need to repair the status.

data.items[].job_id

string

Task ID.

data.items[].source_id

string

The source ID associated with the task.

data.items[].job_status

string

Current processing status.

data.items[].source_file_id

string

Source file ID. May be omitted when not applicable.

data.items[].kb_file_id

string or null

knowledge base file ID. May be omitted when not applicable.

data.items[].source_table_id

integer

Source table ID. May be omitted when not applicable.

data.items[].kb_table_id

integer or null

knowledge base table ID. May be omitted when not applicable.

data.items[].error

string

Reason for failure. May be omitted if there is no error.

data.items[].updated_at

integer

Unix timestamp. May be omitted if no value.

data.items[].reconcile_required

boolean

Whether the task needs to be repaired.

Error response

JSON
{
  "code": "ErrNotFound",
  "msg": "resource not found",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Error description.

data

null

null on error.

Last updated on