VEGA 引擎 · 语义理解任务 API (0.1.0)

Download OpenAPI specification:

Vega Backend asynchronous semantic-understanding task API. New tasks can target one Resource. Catalog task creation and execution are temporarily unavailable; existing Catalog tasks remain readable and deletable. The worker submits Resource tasks to bkn-agent and writes back results and application status asynchronously.

List semantic-understanding tasks

Authorizations:
OAuth2
query Parameters
scope
string
Enum: "resource" "catalog"
catalog_id
string
resource_id
string
status
Array of strings
Items Enum: "pending" "running" "completed" "failed" "cancelled"

Filter by status. Repeat the parameter for multiple statuses, which are combined with OR.

apply_mode
string
Enum: "dry_run" "fill_empty" "force"

Application mode.

applied
boolean

Whether the result has been applied.

offset
integer >= 0
Default: 0
limit
integer [ -1 .. 1000 ]
Default: 20

Page size from 1 to 1000. Use -1 to disable pagination. Defaults to 20.

sort
string
Default: "create_time"
Enum: "create_time" "start_time" "finish_time"

Sort field. Tasks with start_time or finish_time equal to 0 are sorted as ordinary numeric values.

direction
string
Default: "desc"
Enum: "asc" "desc"

Responses

Response samples

Content type
application/json
{
  • "entries": [
    ],
  • "total_count": 0
}

Create a semantic-understanding task

Authorizations:
OAuth2
Request Body schema: application/json
required
One of
scope
required
string
Value: "resource"
Value: "resource"
resource_id
required
string
language
string
Enum: "zh-CN" "en-US" ""

新生成业务名称、描述和警告的输出语言;省略或为空时使用 Accept-Language 解析结果;请求头未提供受支持的语言时,使用服务器部署时配置的默认语言。创建时写入任务输入快照,后续界面语言变化不影响已创建任务。

apply_mode
string
Default: "fill_empty"
Enum: "dry_run" "fill_empty" "force"
confidence_threshold
number <double>
Default: 0.75
include_sample_rows
boolean

Whether to read and send raw sample rows. Supported only for Resource semantic-understanding tasks. If sampling is unavailable, the task is still created and continues with no sample rows.

object (SamplePolicy)

Responses

Request samples

Content type
application/json
Example
{
  • "scope": "resource",
  • "resource_id": "string",
  • "language": "zh-CN",
  • "apply_mode": "dry_run",
  • "confidence_threshold": 0.75,
  • "include_sample_rows": true,
  • "sample_policy": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "scope": "resource",
  • "catalog_id": "string",
  • "catalog_name": "string",
  • "resource_id": "string",
  • "resource_name": "string",
  • "agent_task_id": "string",
  • "agent_id": "string",
  • "input": "string",
  • "input_hash": "string",
  • "status": "pending",
  • "apply_mode": "dry_run",
  • "result_json": "string",
  • "confidence_threshold": 0.1,
  • "confidence": 0.1,
  • "confidence_detail_json": "string",
  • "apply_detail_json": "string",
  • "applied": true,
  • "failure_detail": "string",
  • "creator": {
    },
  • "create_time": 0,
  • "start_time": 0,
  • "finish_time": 0
}

Get semantic-understanding task details

Requires task_manage on the task's Catalog. The input field is returned as an empty string when the caller lacks query_data on the task's Resource, or when the task has no resource_id. Authorization service failures return an error rather than exposing the input. Empty input does not require a query_data check.

Authorizations:
OAuth2
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "scope": "resource",
  • "catalog_id": "string",
  • "catalog_name": "string",
  • "resource_id": "string",
  • "resource_name": "string",
  • "agent_task_id": "string",
  • "agent_id": "string",
  • "input": "string",
  • "input_hash": "string",
  • "status": "pending",
  • "apply_mode": "dry_run",
  • "result_json": "string",
  • "confidence_threshold": 0.1,
  • "confidence": 0.1,
  • "confidence_detail_json": "string",
  • "apply_detail_json": "string",
  • "applied": true,
  • "failure_detail": "string",
  • "creator": {
    },
  • "create_time": 0,
  • "start_time": 0,
  • "finish_time": 0
}

Delete semantic-understanding tasks

The path parameter may contain comma-separated task IDs. Running tasks cannot be deleted.

Authorizations:
OAuth2
path Parameters
id
required
string
query Parameters
ignore_missing
boolean
Default: false

Responses

Response samples

Content type
application/json
{
  • "error_code": "string",
  • "description": "string",
  • "error_details": null,
  • "metadata": { }
}