add_relationships
Batch-add multiple relationships to an active ArchiMate model in one call, with automatic rollback on error.
Instructions
Add multiple relationships to the active model in one call.
Each relationship item supports the same fields as `add_relationship`.
Short and long field names are both accepted (`type` or
`relationship_type`, `source` or `source_id`, `target` or
`target_id`, `id` or `relationship_id`).
Relationship item shape:
```
{
"id": "id-uses", # optional stable ref
"type": "Serving", # required (alias: relationship_type)
"source": "id-customer", # required (alias: source_id)
"target": "id-portal", # required (alias: target_id)
"name": "uses", # optional
"description": "...", # optional
"properties": {"k": "v"}, # optional
"access_type": "Read", # for Access only
"influence_strength": "+" # for Influence only
}
```
Args:
relationships: List of relationship item objects.
rollback_on_error: When true (default), restore the previous
model state if any item fails.
Returns:
Success envelope with `data.relationships` (list of
`RelationshipDetail`), `data.count`, and
`data.rollback_on_error`.
Errors:
`InvalidRelationshipTypeError`, `ElementNotFoundError`,
`ModelNotFoundError`, `ModelOperationError` for the first
failing item.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| relationships | Yes | ||
| rollback_on_error | No | ||
| semantic_validation | No | warn |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||