Update the output format for various asset and folder commands to ensure JSON Lines are emitted on stdout, providing a consistent structure across commands. Enhance error handling to ensure that unknown ids or invalid inputs fail the entire command, improving user feedback and command reliability. This change streamlines the user experience and aligns with the fail-fast convention for batch commands.
574 B
574 B
dapi folder mv <ids...> [--to <folderId>]
Moves one or more folders under a new parent. A folder cannot be moved into itself or any of its descendants; such a move fails the command. Alias: move.
Input
<ids...>: folder ids (required)--to <folderId>: destination parent folder (optional; omitted = the library root)
Output
JSON Lines on stdout, one per moved folder:
{ id: string; parentId: string | null }
Errors
An unknown id, a cycle, or a --to that doesn't resolve to a folder fails the whole command before anything is moved.