Download OpenAPI specification:
BKN (Business Knowledge Network) Backend API provides import and export operations for business knowledge networks.
Upload a BKN tar archive and import it as a business knowledge network. For the archive format, see
docs/design/bkn/features/bkn_docs/SPECIFICATION.md. From 0.2.2 action types, event classes, object metrics
and capability mounts are part of the Professional edition: the Community edition refuses an archive that
contains action types (403), event classes (400, unsupported object type kind) or object metrics (501),
and imports an archive that declares capability mounts without them, reporting this as a single
capabilities.skipped entry with reason edition_restricted.
| branch | string Default: "main" Branch name. Defaults to main. |
| binding_policy | string Default: "preserve" Enum: "preserve" "detach" Controls how environment-local bindings in the archive are imported. preserve keeps resource identifiers, including indirect-relation backing resources, and subjects them to proxy permission checks. detach removes those identifiers while preserving the knowledge model topology so resources can be bound later through incremental APIs. |
| confirm_clear_declarations | boolean Default: false With overwrite, a file that does not carry the BKN spec 3.0 declarations of an existing object type
(aliases, lifecycle and property declarations) or relation type (aliases, lifecycle and its other
declarations), such as a 2.x package or an old JSON export, would clear
them. Without this parameter the request is refused with 409. Its If the network the overwrite would produce also breaks a rule that spans definitions (for example a
kept relation type whose |
| import_mode | string Default: "overwrite" Enum: "normal" "overwrite" "ignore" "replace" Import mode. normal reports an error for duplicate concept IDs or names; overwrite updates an existing concept with the same ID; ignore skips existing concepts. A name collision with a different ID remains an error in overwrite and ignore modes. This mode controls the knowledge-network model. Defaults to overwrite for compatibility with archive uploads that predate this parameter. replace is overwrite that also deletes whatever the archive leaves out, so the target branch ends up holding exactly the archive, in one transaction. Only archive uploads accept it. overwrite never deletes definitions the archive lacks. |
| strict_mode | boolean Default: false Whether to require complete model definitions and validate that dependent objects exist. false permits draft definitions with optional strict-only fields omitted and skips dependency existence checks. With binding_policy=detach, true validates the archive structure before bindings are removed, but persistence dependency checks are skipped for the detached model. Defaults to false for compatibility with archive uploads that predate this parameter. When empty, the deprecated validate_dependency parameter is used. |
| validate_dependency | boolean Deprecated Default: false Deprecated. Use strict_mode instead. This parameter is retained for compatibility and is read when strict_mode is empty. |
| file | string <binary> BKN tar archive file |
{- "kn_id": "string",
- "capabilities": {
- "bound": 0,
- "skipped": [
- {
- "reason": "string",
- "detail": "string"
}
]
}
}Export a business knowledge network as a BKN tar archive. For the archive format, see docs/design/bkn/features/bkn_docs/SPECIFICATION.md
| kn_id required | string Knowledge network ID |
| branch | string Default: "main" Branch name. Defaults to main. |
| bkn_spec | string Enum: "2.0" "2.1" "3.0" Specification the archive is written in. Left out, a network with a declaration only
BKN spec 3.0 can hold is written as 3.0 and every other network as 2.x, byte for byte as
before. |
Read-only. Reports the parameters of logic properties that execution drops
and a BKN spec 3.0 package refuses: misplaced ones, whose value source sits in source as
the legacy parameter table (Parameter | Type | Source | Binding) wrote it, each with the
rewrite the 3.0 refusal shows; and invalid ones, whose value_from is not property, input or
const and which have no rewrite to suggest. Works on any network, 2.x included. It reads the
definitions only, not source data.
| kn_id required | string Knowledge network ID |
| branch | string Default: "main" Branch name. Defaults to main. |
{- "misplaced_parameters": [
- {
- "object_type_id": "string",
- "logic_property": "string",
- "parameter": "string",
- "current": {
- "source": "string",
- "value_from": "string",
- "value": null
}, - "suggested": {
- "source": "string",
- "value_from": "string",
- "value": null
}, - "conflict": true
}
], - "invalid_parameters": [
- {
- "object_type_id": "string",
- "logic_property": "string",
- "parameter": "string",
- "current": {
- "source": "string",
- "value_from": "string",
- "value": null
}
}
]
}Report what differs between two knowledge network branches, definition by definition and field by field. Both networks are named in the body: neither is the resource being addressed, and putting one in the path would suggest the comparison belongs to it.
Each side is authorized on its own, so a caller who may read one network and not the other is refused exactly as they would be asking for that network directly.
Definitions are paired by type and id. Two networks built independently share no
definition ids — ids are generated per network — so their comparison degrades into
"everything created, everything deleted". lineage reports that overlap up front, and
fallback_by_name pairs the remainder by name when the caller opts in.
Definitions that are identical on both sides are counted in summary and left out of
entries.
The comparison covers object types, relation types, risk types, concept groups and value types,
and the network itself. base and target in the result echo the branch that was read.
required | object (KNDiffSideRequest) |
required | object (KNDiffSideRequest) |
| fallback_by_name | boolean Default: false Pair definitions by name once id matching is exhausted. A name match is a guess: two definitions can carry the same name and mean different things, so a paired entry reports both ids for a human to check, and an ambiguous name pairs with nothing. |
| include_unchanged | boolean Default: false Also return the definitions that are identical on both sides. They carry no
changes — they are there to be listed, not read — and the counts in |
{- "base": {
- "kn_id": "string",
- "branch": "main"
}, - "target": {
- "kn_id": "string",
- "branch": "main"
}, - "fallback_by_name": false,
- "include_unchanged": false
}{- "base": {
- "kn_id": "string",
- "branch": "string",
- "name": "string"
}, - "target": {
- "kn_id": "string",
- "branch": "string",
- "name": "string"
}, - "summary": {
- "created": 0,
- "updated": 0,
- "deleted": 0,
- "unchanged": 0
}, - "lineage": {
- "common_ids": 0,
- "total_ids": 0,
- "related": true
}, - "network": {
- "type": "object_type",
- "id": "string",
- "action": "create",
- "name": {
- "old": "string",
- "new": "string"
}, - "paired_by": "id",
- "base_id": "string",
- "target_id": "string",
- "changes": [
- {
- "path": "data_properties[alt_part].description",
- "kind": "create",
- "old": "string",
- "new": "string"
}
]
}, - "entries": [
- {
- "type": "object_type",
- "id": "string",
- "action": "create",
- "name": {
- "old": "string",
- "new": "string"
}, - "paired_by": "id",
- "base_id": "string",
- "target_id": "string",
- "changes": [
- {
- "path": "data_properties[alt_part].description",
- "kind": "create",
- "old": "string",
- "new": "string"
}
]
}
]
}Report how much data sits behind two object types: the row count of each bound resource and the number of distinct primary keys in it.
This is a separate call from the comparison because it queries the customer's own database. A comparison opens without paying for it, and pays only for the object type someone actually opens.
Two numbers is the whole of it on purpose. Per-column statistics — null rates, value distributions — cost another pass over the table for every column, and this runs while someone waits with a comparison open.
same_resource is true when both object types are bound to the same resource. The two
sides are then reading one table and every number matches by construction, which is not a
finding about the data. missing_keys counts rows with a NULL in any primary key column:
they identify no object at all. duplicate_keys counts the rows with a complete key beyond
the first for each key: a non-zero value means the resource holds rows the model believes
are the same object. The two are kept apart because they are different faults, and a row
without a key must not read as a duplicate.
required | object (ObjectDataStatsSideRequest) |
required | object (ObjectDataStatsSideRequest) |
{- "base": {
- "kn_id": "string",
- "branch": "main",
- "ot_id": "string"
}, - "target": {
- "kn_id": "string",
- "branch": "main",
- "ot_id": "string"
}
}{- "base": {
- "kn_id": "string",
- "branch": "string",
- "ot_id": "string",
- "ot_name": "string",
- "resource_id": "string",
- "primary_keys": [
- "string"
], - "row_count": 0,
- "primary_key_distinct": 0,
- "missing_keys": 0,
- "duplicate_keys": 0
}, - "target": {
- "kn_id": "string",
- "branch": "string",
- "ot_id": "string",
- "ot_name": "string",
- "resource_id": "string",
- "primary_keys": [
- "string"
], - "row_count": 0,
- "primary_key_distinct": 0,
- "missing_keys": 0,
- "duplicate_keys": 0
}, - "same_resource": true,
- "delta": {
- "row_count": 0,
- "primary_key_distinct": 0
}
}Returns BKN backend runtime information. ServerVersion is the platform version for releases in which all services share one version.
{- "ServerName": "string",
- "ServerVersion": "string",
- "Language": "string",
- "GoVersion": "string",
- "GoArch": "string"
}Batch return knowledge network names by ID, for example for object-level authorization pages. Missing IDs are skipped without an error. Requires application/json content type.
| ids | Array of strings <= 100 items List of knowledge network IDs to resolve, with at most 100 items. An empty list returns empty entries. |
{- "ids": [
- "string"
]
}{- "entries": [
- {
- "id": "string",
- "name": "string"
}
]
}Lists resources by resource type with pagination on the unified resource platform. Currently supports resource_type=knowledge_network.
| resource_type required | string Value: "knowledge_network" Resource type. The current implementation recognizes only knowledge_network, which represents a knowledge network. It maps to interfaces.RESOURCE_TYPE_KN. Other values do not return an error. Instead, the default branch returns 200 with an empty response body. This is not an empty list: there is no body at all. An invalid value causes the client to fail JSON parsing or receive no data, rather than receive a 400 response. |
| keyword | string Filter by name keyword. Defaults to empty. |
| offset | integer <int64> Default: 0 Offset. Defaults to 0. |
| limit | integer <int64> Default: 10 Page size. Defaults to 10. |
| sort | string Default: "name" Enum: "name" "update_time" Sort field. Defaults to name. |
| direction | string Default: "desc" Enum: "asc" "desc" Sort direction. Defaults to desc. |
{- "entries": [
- {
- "type": "string",
- "id": "string",
- "name": "string"
}
], - "total_count": 0
}