add_elements
Add multiple elements to the active model in one call, supporting rollback on error to restore previous state if any item fails.
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`).
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 | |||