manage_relationship_type
Manage relationship types. A relationship type must exist before any relationship of that type can be created — it optionally validates the relationship's metadata against a JSON Schema and restricts which collections it may connect. Actions: upsert, get, list, delete.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | enum: upsert | get | list | delete | Yes | |
database_id | string | Yes | Target database ID |
rel_type | string | No | The relationship type id (rel_type). Required for upsert, get, delete |
description | string | No | |
data_schema | object | No | JSON Schema validating the relationship's data. Omit or null to allow any data. |
source_collections | array | No | Allowed source collections. Empty/omitted means any collection. |
target_collections | array | No | Allowed target collections. Empty/omitted means any collection. |