Download OpenAPI specification:
批量求一批对象实例的逻辑属性值。逻辑属性是对象类上的一条只读 Cypher 语句,按实例主键起算,返回单个标量值,所有版本都可用,不依赖执行工厂。
逻辑属性不直接存在于数据源里,需要带参数计算,而参数往往藏在用户的自然语言里
(「最近一年」→ 时间窗、「按省份」→ 分析维度)。本接口先用大模型把 query
翻译成各属性的 dynamic_params,再批量取值,省掉调用方自己拼参数的工作。
调用方也可以在请求里直接给出 dynamic_params:给了的值原样使用,只有缺的才由
大模型生成。
对象类有哪些逻辑属性、各自需要什么参数,看
kn-explore.yaml 的 get_object_types 返回的
logic_properties[].parameters。
认证:Authorization: Bearer <token>(OAuth access token 或 bak_ AppKey)。
query 的质量决定成败:参数由大模型从 query(必要时加
additional_context)里推断。查询里要含时间范围、统计维度等业务上下文,
否则会因缺参失败。
缺参返回 400,不是空结果:模型判定必需的 input 参数无法从查询推出时,
返回 400,details 里是 MISSING_INPUT_PARAMS 及逐属性的缺失说明。补上
上下文重试即可。
与之区分的是 500 DYNAMIC_PARAMS_GENERATION_FAILED:那是大模型或依赖服务
故障,不是调用方少给信息,重试或查服务状态。
结果与入参对齐:datas 与 _instance_identities 顺序一一对应,每项含
主键和本次请求的 properties。
| response_format | string Default: "json" Enum: "json" "toon" 响应格式。 |
object (BKNContext) BKN Trace business-provenance context identifying the business conversation and interaction to which this call belongs.
Naming it makes the call managed: the service records an Operation under that interaction and attempts to return a receipt and capture evidence. When capture is disabled or Trace Core is unavailable, a managed REST call still runs, unrecorded. Omitting it entirely, or sending an empty object, makes a REST call ad hoc. Only those two shapes are ad hoc — one id without the other, or a misspelt field, is refused rather than quietly downgraded. Both required child fields are server-issued handles and must not be invented by the caller:
These handles are available only through the provenance MCP tool above.
The BKN Trace Core session APIs under | |
| kn_id required | string 知识网络 ID。 |
| ot_id required | string 对象类 ID。 |
| query | string 用户查询。需要包含时间范围、统计维度、业务上下文,用于生成
所请求的逻辑属性有 input 参数时必填;都没有 input 参数时可省略。 |
required | Array of objects 对象实例标识数组,必须从上游取,不可自拼:先调
|
| properties required | Array of strings 要求值的逻辑属性名列表( |
object 调用方自己给出的参数值,按逻辑属性名再按参数名分组,形如
| |
| additional_context | string 补充上下文,如 timezone、instant、step 或对象属性,帮助模型生成更准的
|
| llm_model | string 覆盖用于生成动态参数的大模型;留空走系统默认大模型。 |
object (ResolveOptions) 高级选项。 |
{- "kn_id": "kn_medical",
- "ot_id": "ot_company",
- "query": "计算这些药企的经营健康度",
- "_instance_identities": [
- {
- "company_id": "company_000001"
}, - {
- "company_id": "company_000002"
}
], - "properties": [
- "business_health_score"
]
}{- "datas": [
- { }
], - "effective_permissions": {
- "property1": "none",
- "property2": "none"
}, - "dynamic_params": { },
- "dynamic_params_source": {
- "property1": "caller",
- "property2": "caller"
}, - "debug": {
- "dynamic_params": { },
- "agent_info": { },
- "now_ms": 0,
- "warnings": [
- "string"
], - "trace_id": "string"
}
}