Download OpenAPI specification:
Value types of a knowledge network (BKN specification 3.0, section 16). A value type is a base
type with a set of value rules (an enum, or a range, a length, a pattern and a unit), named so
that several data properties can share it: a property names one in constraints.value_type.
Value types have no authorization of their own. Reads and lists need view_detail on the
knowledge network; creating, updating and deleting need modify on it. See
../knowledge-network-authorization.md.
The rules are checked with the checks a BKN 3.0 import runs: base_type is one of the listed
types, an enum goes with none of range, length and pattern, enum values fit the base type
and do not repeat. A data property that names a value type must have the value type's
base_type as its Type, and writes no range, length, pattern or unit of its own.
While a data property names a value type, the value type cannot be deleted, and an update must
keep a base_type the referencing properties fit. Either refusal is 409
BknBackend.ValueType.Referenced, and its details list the referencing object types and
properties.
All APIs are exposed under /api/bkn-backend/v1, require OAuth2 authentication, and default the branch query parameter to main. Writes are recorded in the operation audit. Resource IDs use lowercase letters, digits, underscores, and hyphens, start with a letter or digit, and contain at most 128 characters. Resource names contain at most 128 Unicode characters.
Creates or imports value types. Requires an application/json content type.
| kn_id required | string <= 128 characters ^[a-z0-9][a-z0-9_-]{0,127}$ Business knowledge network ID |
| branch | string Default: "main" Branch name. Defaults to main. |
| import_mode | string Default: "normal" Enum: "normal" "ignore" "overwrite" normal reports an existing ID or name; ignore skips existing items; overwrite replaces the value type of the same ID and refuses a name another value type holds. |
required | Array of objects (ValueTypeInput) |
{- "entries": [
- {
- "id": "string",
- "name": "string",
- "tags": [
- "string"
], - "comment": "string",
- "icon": "string",
- "color": "string",
- "base_type": "string",
- "enum": [
- {
- "value": "string",
- "display": "string",
- "deprecated": true,
- "description": "string"
}
], - "range": {
- "min": null,
- "max": null
}, - "length": {
- "min": 0,
- "max": 0
}, - "pattern": "string",
- "unit": "string"
}
]
}[- {
- "id": "string"
}
]Lists the value types of a knowledge network with pagination and optional name or tag filtering.
| kn_id required | string <= 128 characters ^[a-z0-9][a-z0-9_-]{0,127}$ Business knowledge network ID |
| branch | string Default: "main" Branch name. Defaults to main. |
| name_pattern | string Fuzzy match by name or ID. Defaults to empty. |
| tag | string Fuzzy match by tag. Defaults to empty. |
| offset | integer <int64> Default: 0 Offset, greater than or equal to 0. Defaults to 0. |
| limit | integer <int64> Default: 10 Page size in the range [1, 1000]. A value of -1 returns all items without pagination. |
| sort | string Default: "update_time" Enum: "name" "update_time" |
| direction | string Default: "desc" Enum: "asc" "desc" |
{- "entries": [
- {
- "id": "string",
- "name": "string",
- "tags": [
- "string"
], - "comment": "string",
- "icon": "string",
- "color": "string",
- "base_type": "string",
- "enum": [
- {
- "value": "string",
- "display": "string",
- "deprecated": true,
- "description": "string"
}
], - "range": {
- "min": null,
- "max": null
}, - "length": {
- "min": 0,
- "max": 0
}, - "pattern": "string",
- "unit": "string",
- "kn_id": "string",
- "branch": "string",
- "module_type": "string",
- "creator": {
- "id": "string",
- "type": "string",
- "name": "string"
}, - "create_time": 0,
- "updater": {
- "id": "string",
- "type": "string",
- "name": "string"
}, - "update_time": 0
}
], - "total_count": 0
}| kn_id required | string <= 128 characters ^[a-z0-9][a-z0-9_-]{0,127}$ Business knowledge network ID |
| vt_id required | string <= 128 characters ^[a-z0-9][a-z0-9_-]{0,127}$ Value type ID |
| branch | string Default: "main" Branch name. Defaults to main. |
{- "id": "string",
- "name": "string",
- "tags": [
- "string"
], - "comment": "string",
- "icon": "string",
- "color": "string",
- "base_type": "string",
- "enum": [
- {
- "value": "string",
- "display": "string",
- "deprecated": true,
- "description": "string"
}
], - "range": {
- "min": null,
- "max": null
}, - "length": {
- "min": 0,
- "max": 0
}, - "pattern": "string",
- "unit": "string",
- "kn_id": "string",
- "branch": "string",
- "module_type": "string",
- "creator": {
- "id": "string",
- "type": "string",
- "name": "string"
}, - "create_time": 0,
- "updater": {
- "id": "string",
- "type": "string",
- "name": "string"
}, - "update_time": 0
}Fully updates one value type; the ID comes from the path. Requires an application/json content type.
| kn_id required | string <= 128 characters ^[a-z0-9][a-z0-9_-]{0,127}$ Business knowledge network ID |
| vt_id required | string <= 128 characters ^[a-z0-9][a-z0-9_-]{0,127}$ Value type ID |
| branch | string Default: "main" Branch name. Defaults to main. |
| id | string <= 128 characters ^$|^[a-z0-9][a-z0-9_-]{0,127}$ Optional on creation; generated when empty. Ignored on update. |
| name required | string <= 128 characters Name, unique in the network, with a maximum length of 128 Unicode characters |
| tags | Array of strings |
| comment | string |
| icon | string |
| color | string |
| base_type required | string Enum: "string" "keyword" "integer" "unsigned integer" "float" "decimal" "date" "datetime" "timestamp" |
Array of objects (ValueTypeEnumItem) The valid values. Goes with none of range, length and pattern. | |
object Closed interval; numbers for a numeric base type, ISO 8601 text for a date or time base type. | |
object Closed interval on the number of characters. | |
| pattern | string Regular expression the whole value matches |
| unit | string |
{- "id": "string",
- "name": "string",
- "tags": [
- "string"
], - "comment": "string",
- "icon": "string",
- "color": "string",
- "base_type": "string",
- "enum": [
- {
- "value": "string",
- "display": "string",
- "deprecated": true,
- "description": "string"
}
], - "range": {
- "min": null,
- "max": null
}, - "length": {
- "min": 0,
- "max": 0
}, - "pattern": "string",
- "unit": "string"
}{- "error_code": "string",
- "description": "string",
- "error_details": null,
- "metadata": { }
}| kn_id required | string <= 128 characters ^[a-z0-9][a-z0-9_-]{0,127}$ Business knowledge network ID |
| vt_id required | string <= 128 characters ^[a-z0-9][a-z0-9_-]{0,127}$ Value type ID |
| branch | string Default: "main" Branch name. Defaults to main. |
{- "error_code": "string",
- "description": "string",
- "error_details": null,
- "metadata": { }
}