item (Grouping)¶
Operations for manually grouping multiple files into one item, detaching or splitting grouped items, forgetting missing member files and re-enabling automatic grouping rules on manually split items. For library-wide rule inspection and batch execution, see Library grouping rules.
item.group¶
Collapse members into the primary item id. The primary item absorbs members' tags, folders and notes while preserving each member's original metadata for restoration if split later.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string \| number |
Yes | — | Primary item UUID or row ID. |
members |
(string \| number)[] |
Yes | — | Item IDs to attach as grouped files of id. |
role |
string |
No | "part" |
Companion role label (letters, digits, - or _, max 40 characters; e.g. preview, metadata or part). |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns Done.
Example request
Example response
Events and errors Emits items.changed for the primary item and items.removed (purged: false) for the grouped members. Returns 400 bad_request for invalid roles, 404 not_found if any ID is missing or 422 failed if the files cannot be grouped (such as self-grouping or items in different locations).
item.split¶
Split grouped items back into independent items, restoring each member's prior metadata and marking them solo so automatic companion rules do not immediately regroup them. To release a single member file while leaving the rest of the group intact, use item.detach.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
ids |
(string \| number)[] |
Yes | — | Grouped item IDs to split. |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns { ids: string[] } — UUIDs of the newly independent member items.
Example request
Example response
Events and errors Emits items.changed and items.added (how: "split").
item.detach¶
Detach a single member file from its parent grouped item, turning that member back into an independent item while leaving other members attached. Like item.split, the detached item is marked solo so automatic rules do not immediately regroup it (clear with item.allowGrouping); to split all members at once, use item.split.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string \| number |
Yes | — | Member item UUID (from ItemWithFields.parts[].id). |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns Done.
Example request
Example response
Events and errors Emits items.changed for the former parent item and items.added (how: "split") for the detached item. Returns 404 not_found if id does not exist or 422 failed if it is not a grouped member.
item.forgetFile¶
Remove a missing or offline member file from its parent grouped item and from the library database without affecting the primary item; future rescans will not re-add it unless the file reappears changed.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string \| number |
Yes | — | Missing/offline member UUID. |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns Done.
Example request
Example response
Events and errors Emits items.changed. Returns 400 bad_request if the member file is currently available on disk or is not a grouped member.
item.allowGrouping¶
Clear the manual solo exclusion flag on previously split items so automatic companion rules (library.grouping.apply and future scans) may group them again.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
ids |
(string \| number)[] |
Yes | — | Item IDs to re-allow for automatic grouping. |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns Done.
Example request
Example response
Events and errors Emits items.changed.