add_relationship
Create a relationship between two existing ArchiMate elements. Specify type, source, and target; optional properties for access or influence.
Instructions
Add a new ArchiMate relationship between two elements.
Both endpoints must already exist as elements in the active model.
Use `list_supported_types` to discover valid `relationship_type`,
`access_type`, and `influence_strength` values.
Args:
relationship_type: A supported pyArchimate relationship type,
without the `Relationship` suffix. Examples: `Assignment`,
`Serving`, `Composition`, `Aggregation`, `Realization`,
`Triggering`, `Flow`, `Access`, `Influence`,
`Specialization`, `Association`. Note: Archi's "Used By"
concept maps to `Serving`.
source_id: ID of the source element.
target_id: ID of the target element.
name: Optional relationship name.
description: Optional documentation text.
properties: Optional custom property key-value pairs (string
values).
access_type: Required only for `Access` relationships. One of
`Access`, `Read`, `Write`, `ReadWrite`.
influence_strength: Required only for `Influence` relationships.
One of `+`, `++`, `-`, `--`, or `0`-`10`.
relationship_id: Optional stable relationship ID. When omitted a
UUID is generated.
Returns:
Success envelope with `data` shaped like a `RelationshipDetail`:
`{id, name, type, description, properties, access_type,
influence_strength, source_element_id, target_element_id}`.
Errors:
`InvalidRelationshipTypeError` for an unknown
`relationship_type`.
`ElementNotFoundError` when `source_id` or `target_id` is
unknown.
`ModelNotFoundError` if no model is active.
`ModelOperationError` for invalid relationship combinations,
duplicate `relationship_id`, or unsupported access/influence
values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| source_id | Yes | ||
| target_id | Yes | ||
| properties | No | ||
| access_type | No | ||
| description | No | ||
| is_directed | No | ||
| relationship_id | No | ||
| relationship_type | Yes | ||
| influence_strength | No | ||
| semantic_validation | No | warn |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||