VEGA 引擎 · 代理资源读取 API (0.1.0)

Download OpenAPI specification:

Cluster-internal read endpoints used by ontology-query after it resolves a published knowledge-network model to a physical Vega resource.

Vega is the final policy enforcement point. Before every physical read it verifies that the managed proxy account is active, still belongs to the stated knowledge network, and currently has the exact resource permission in bkn-safe. These checks are not cached.

Only schema inspection and filtered resource-data queries are exposed. This surface does not provide resource discovery, raw SQL, write, administration, build, or task operations.

All identity and BKN context headers are trusted workload credentials. They must be supplied only by ontology-query over the cluster-internal network; they are not accepted as end-user authentication on the public API.

Read a resource schema for strict dependency validation

Cluster-internal endpoint used by bkn-backend after it derives a binding target from the candidate model. The caller identity is the effective delegator returned by bkn-safe preflight. Vega rechecks exactly the requested view_detail or query_data operation and returns only the resource identity, name, and schema. It does not expose the unrestricted internal resource detail API.

path Parameters
id
required
string

Physical Vega resource ID

query Parameters
operation
required
string
Enum: "view_detail" "query_data"
header Parameters
X-Account-ID
required
string
X-Account-Type
required
string
Value: "user"

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "schema_definition": [
    ]
}

Read the minimal schema for a proxied resource

Requires view_detail. Only an object_type child may use this operation. The response deliberately omits resource metadata other than schema_definition.

path Parameters
id
required
string

Physical Vega resource ID

header Parameters
X-Account-ID
required
string

Active managed proxy account ID

X-Account-Type
required
string
Value: "app"
x-bkn-caller-id
required
string

Original end-user or workload caller ID

x-bkn-caller-type
required
string

Original caller account type

x-bkn-kn-id
required
string

Knowledge network managed by the proxy account

x-bkn-child-type
required
string
Enum: "object_type" "relation_type" "metric"
x-bkn-child-id
required
string

Published knowledge-network child ID

x-bkn-proxy-version
required
integer <uint64> >= 1

Current positive version of BKN's knowledge-network-to-proxy mapping, used for trusted-context validation and audit correlation

x-bkn-target-type
required
string
Value: "resource"
x-bkn-target-id
required
string

Must exactly match the resource ID in the path

x-bkn-operation
required
string
Value: "view_detail"
x-bkn-execution-id
string

Optional upstream execution identifier included in the audit event

Responses

Response samples

Content type
application/json
{
  • "schema_definition": [
    ]
}

Query data from a proxied resource

Requires query_data. object_type, relation_type, and metric children may use this operation. X-HTTP-Method-Override must be GET; write overrides are rejected before authorization and physical access.

path Parameters
id
required
string

Physical Vega resource ID

header Parameters
X-Account-ID
required
string

Active managed proxy account ID

X-Account-Type
required
string
Value: "app"
x-bkn-caller-id
required
string

Original end-user or workload caller ID

x-bkn-caller-type
required
string

Original caller account type

x-bkn-kn-id
required
string

Knowledge network managed by the proxy account

x-bkn-child-type
required
string
Enum: "object_type" "relation_type" "metric"
x-bkn-child-id
required
string

Published knowledge-network child ID

x-bkn-proxy-version
required
integer <uint64> >= 1

Current positive version of BKN's knowledge-network-to-proxy mapping, used for trusted-context validation and audit correlation

x-bkn-target-type
required
string
Value: "resource"
x-bkn-target-id
required
string

Must exactly match the resource ID in the path

x-bkn-operation
required
string
Value: "query_data"
x-bkn-execution-id
string

Optional upstream execution identifier included in the audit event

X-HTTP-Method-Override
required
string
Value: "GET"
Request Body schema: application/json
required
object

过滤条件,结构由 FilterCondCfg 决定。Override=DELETE 时必填且非空。

object (PagingRequest)

首次请求使用 offset 和 limit;cursor 续页以 cursor 定位,need_total 可携带但不会覆盖首次请求冻结值,其余查询参数不得重传。

Array of objects (SortField)

排序字段。派生逻辑视图的非聚合查询支持保留元字段 _score,无需在视图 Schema 中发布;索引通道按真实相关性分数排序,source 表查询忽略该项并保留其余排序项。

output_fields
Array of strings

指定输出字段列表。派生逻辑视图的非聚合查询可指定 _score;索引通道返回真实 相关性分数,source 表查询不返回该元字段,不补零或伪造分数。

binary_mode
string
Default: "metadata"
Enum: "metadata" "content"

Binary 字段的返回形式。省略时按 metadata 处理并返回字节长度;content 返回 Base64 编码内容与字节长度。cursor 续页不得重复传递。

ignore_local_index
boolean
Default: false

是否跳过可用的本地索引并查询表的原始数据源;默认 false。仅对 table resource 生效。cursor 续页不得重复传递。

need_total
boolean
Default: false

是否在响应里携带 total_count。cursor 首次请求的值会被冻结;续页携带的值被忽略。

object (Aggregation)
Array of objects (GroupByItem)
object (HavingClause)

Responses

Request samples

Content type
application/json
{
  • "filter_condition": { },
  • "paging": {
    },
  • "sort": [
    ],
  • "output_fields": [
    ],
  • "binary_mode": "metadata",
  • "ignore_local_index": false,
  • "need_total": false,
  • "aggregation": {
    },
  • "group_by": [
    ],
  • "having": {
    }
}

Response samples

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