RelationTypeCreate
Payload used to create Relation Type. Required fields are name, collection_id, source, target.
lower_snake_case identifier from 1 to 63 characters. It must start with a lowercase letter or underscore and may contain lowercase letters, digits, and underscores. Minimum length: 1. Maximum length: 63.
Possible values: non-empty and <= 63 characters, Value must match regular expression ^[a-z][a-z0-9_]{0,62}(?![\s\S])
alias object
- string
- null
type object
- string
- null
Parent collection ID (required)
Possible values: non-empty
ontology_id object
Parent Ontology Model ID (required unless a sole legacy model resolves)
- string
- null
Possible values: non-empty
folder_id object
- string
- null
tags object
- string[]
- null
description object
- string
- null
Source entity type ID
Target entity type ID
How the relation is stored. link_table materializes its own table; object has no storage of its own and composes two existing relations through an intermediate entity.
Possible values: [link_table, foreign_key, object]
link_tablevia object
For backing='object', the two constituent relation type identifiers in order. The intermediate entity is derived from them rather than stored.
- string[]
- null
source_columns object
Columns of this relation's rows that carry the source endpoint's identity, in that endpoint's key order. Defined by role, not by table: link_table reads them on the relation's own table, foreign_key on the source entity's table (where they are its identity key). backing says which.
- string[]
- null
target_columns object
Columns of this relation's rows that carry the target endpoint's identity. For foreign_key these are the user-chosen FK columns on the source entity's table.
- string[]
- null
Allowed values: many_to_many, many_to_one, one_to_many, one_to_one.
Possible values: [many_to_many, many_to_one, one_to_many, one_to_one]
many_to_manyschema object
Relation attribute schema (Arrow JSON)
- object
- null
{
"name": "string",
"alias": "string",
"type": "string",
"collection_id": "string",
"ontology_id": "string",
"folder_id": "string",
"tags": [
"string"
],
"description": "string",
"source": "string",
"target": "string",
"backing": "link_table",
"via": [
"string"
],
"source_columns": [
"string"
],
"target_columns": [
"string"
],
"cardinality": "many_to_many",
"schema": {}
}