media_set_set_assets
Replace a media set's entire asset list in one call, adding, reordering, or unlinking assets. Specify asset IDs in display order; dropping current assets requires force.
Instructions
Set a media_set's FULL asset list in one call — for filling, reordering or pruning an EXISTING gallery (issue #140 item 5; media_set_update_asset_titles only edits titles of what is already there).
asset_ids is the gallery's new content IN ORDER (an explicit 1-based position is sent per asset — array order alone is NOT enough, Voog re-derives it and can duplicate positions). A reorder does not always take on the first PUT, so the tool reads the gallery back and retries; if the order still has not applied it says so instead of reporting success. Any asset currently in the set but absent from the list is UNLINKED (the asset itself survives in the library; only its membership ends). Because that is easy to do by accident, any call that drops a current asset requires force=true — including a same-length swap. Reordering and adding need no force.
Titles and per-asset link settings are carried over for assets that stay; pass titles to set them for new ones. Upload files first with asset_upload to get ids.
The media_set must already exist: POST /media_sets returns 500, and a freshly created gallery content area has no media_set until Voog makes one. Find the id on the content area's gallery field (NOT media_set) via voog://{site}/articles/{id}/contents, then media_set_get.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | ||
| force | No | Required whenever the call drops an asset that is currently in the set — including a same-length or longer list that swaps one image for another. Pure reordering and pure additions need no force. | |
| titles | No | Optional map of asset id (string) -> title, for assets being added. Existing titles are kept unless overridden here. | |
| asset_ids | Yes | The gallery's complete new asset list, in display order. Omitted assets are unlinked. | |
| media_set_id | Yes | Voog media_set (gallery) id |