RelationType (0.1.0)

Download OpenAPI specification:

List relation types

path Parameters
kn_id
required
string

Business knowledge network ID

query Parameters
name_pattern
string

Fuzzy-match by relation type name. Empty by default.

sort
string
Enum: "update_time" "name"

Sort field. Defaults to update_time.

direction
string
Enum: "asc" "desc"

Sort direction. Supported values are asc and desc. Defaults to desc.

offset
integer <int64>

Offset of the first returned item. Must be greater than or equal to 0. Defaults to 0.

limit
integer <int64>

Maximum number of returned items per page. Supported paginated values are 1 to 1000; -1 disables pagination. Defaults to 10.

tag
string

Exact-match by tag. Empty by default.

source_object_type_id
string

Source object type ID

target_object_type_id
string

Target object type ID

bound_object_type_id
Array of strings

Bound object type ID. Finds relation types whose source or target equals this object type. Multiple values are supported.

branch
string
Default: "main"

Branch. Defaults to main.

Responses

Response samples

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

Create or search relation types

path Parameters
kn_id
required
string

Business knowledge network ID

query Parameters
branch
string
Default: "main"

Branch. Defaults to main.

import_mode
string
Default: "normal"
Enum: "normal" "overwrite" "ignore"

Import mode. normal returns an error for a concept with the same name; overwrite replaces it; ignore skips it. Defaults to normal.

strict_mode
boolean
Default: true

Whether to validate dependency existence. Defaults to true. When unset, falls back to the deprecated validate_dependency.

header Parameters
x-http-method-override
required
string
Enum: "POST" "GET"

Override request headers

Request Body schema: application/json
required
required
Array of objects (ReqRelationType)

Relation type details

Responses

Request samples

Content type
application/json
Example
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
Example
{
  • "entries": [
    ],
  • "total_count": 2,
  • "next_cursor": "cursor-relation-types-1"
}

Update a relation type

path Parameters
kn_id
required
string

Business knowledge network ID

rt_id
required
string

Relation type ID

query Parameters
branch
string

Branch. Uses main when omitted.

strict_mode
boolean
Default: true

Whether to strictly validate dependencies. When true, validates dependencies such as related object types and data views. When false, skips this validation.

Request Body schema: application/json
required
name
required
string

Name

tags
Array of strings

Tags used for business identification

comment
string

Comment

icon
string

Icon

color
string

Color

branch
required
string

Branch ID

source_object_type_id
string

Source object type ID

target_object_type_id
string

Target object type ID

type
string
Enum: "direct" "filtered_cross_join"

Relation type

Array of DirectMappingRules (objects) or FilteredCrossJoinMappingRule (object)

Associated matching rule. For direct, this is a Mapping array; for filtered_cross_join, this is a FilteredCrossJoinMappingRule.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "tags": [
    ],
  • "comment": "string",
  • "icon": "string",
  • "color": "string",
  • "branch": "string",
  • "source_object_type_id": "string",
  • "target_object_type_id": "string",
  • "type": "direct",
  • "mapping_rules": [
    ]
}

Get relation type details

path Parameters
rt_ids
required
Array of strings

Relation type ID

kn_id
required
string

Business knowledge network ID

query Parameters
branch
string
Default: "main"

Branch. Defaults to main.

Responses

Response samples

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

Delete relation types

path Parameters
kn_id
required
string

Business knowledge network ID

rt_ids
required
Array of strings

Relation type ID

query Parameters
branch
string
Default: "main"

Branch. Defaults to main.

Responses

Explore concept paths from a source

Explore concept paths from a source

path Parameters
kn_id
required
any
query Parameters
branch
string
Default: "main"

Branch. Defaults to main.

Request Body schema: application/json
required
concept_groups
Array of strings

Concept group ID array

source_object_type_id
required
string

Source object type ID

path_length
required
integer

Path length. Must not exceed 3.

direction
required
string
Enum: "forward" "reverse" "bidirectional"

Direction: forward, backward, or bidirectional.

Responses

Request samples

Content type
application/json
{
  • "source_object_type_id": "comment",
  • "direction": "backward",
  • "path_length": 1
}

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Validate relation types

Validates relation type dependency existence only and does not write data. It verifies dependencies such as source and target object types and indirect data views.

Response: HTTP 200 uses valid and detail in the same way as other validation APIs; parameter and authentication failures return non-2xx statuses.

Internal API: POST /api/bkn-backend/in/v1/.../relation-types/validation. The caller is resolved from headers and OAuth is not required.

path Parameters
kn_id
required
string

Business knowledge network ID

query Parameters
branch
string

Branch. Uses main when omitted.

strict_mode
boolean
Default: true

Whether to strictly validate dependencies. Defaults to true.

import_mode
string
Default: "normal"
Enum: "normal" "ignore" "overwrite"

Same as the create relation type API. Defines validation semantics for existing relation type ID conflicts; name conflicts follow create behavior.

Request Body schema: application/json
required
entries
Array of objects

Relation type list to validate. Its structure is the same as the create API.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "valid": true,
  • "detail": "string"
}