add_elements
Add multiple ArchiMate elements to the active model with one call. Specify type, name, and optional details like ID, description, or folder path. Roll back on error to preserve model state.
Instructions
Add multiple elements to the active model in one call.
Each element item supports the same fields as `add_element`. Both
short and long field names are accepted (`type` or `element_type`,
`id` or `element_id`).
IDs are unique across the **entire active model**, not per call,
per batch, or per concept type. Splitting a build across several
batches does not give each batch its own id space, so namespace
generated ids (`bp-`, `ac-`, `tech-`) rather than restarting the
same naming pattern in each one.
Element item shape:
```
{
"id": "id-customer", # optional stable ref
"name": "Customer", # required
"type": "BusinessActor", # required (alias: element_type)
"description": "...", # optional
"folder_path": "/Business", # optional
"properties": {"k": "v"} # optional
}
```
Args:
elements: List of element item objects.
rollback_on_error: When true (default), restore the previous
model state if any item fails. Set to false to keep partial
results.
Returns:
Success envelope with `data.elements` (list of `ElementDetail`),
`data.count`, and `data.rollback_on_error`.
Errors:
`ModelNotFoundError`, `InvalidElementTypeError`,
`ModelOperationError` for the first failing item.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| elements | Yes | ||
| rollback_on_error | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||