Replace an image, video or file in every article that uses it
colliedesk_kb_media_replacePut another library item (with_media_id: an image for an image, a video for a video) in the place of media_id in every live article whose current text or a translation shows it. Each such article gets a new version; published ones change on the help center at once. A file is replaced in place (in_place true): it keeps its id and address and takes the bytes and name of with_media_id, a file no article lists, which goes to the trash holding the earlier version. article_id changes that one article (and its translations) only, as for an edited copy of a screenshot, and also needs kb_articles:update; a published article gets the copy in its unpublished changes, so the help center shows it once they are published. colliedesk_kb_media_get of the new item then lists media_id under earlier_versions. Undo it with colliedesk_kb_media_replace_undo and the replacement_id.
Needs: kb_media:update.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"media_id": "<media_id>",
"with_media_id": "<with_media_id>"
},
"name": "colliedesk_kb_media_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| media_id | Yes | From colliedesk_kb_media_list, or the id in an article's /api/v1/kb/images/<id> link. | |
| article_id | No | Replace in this article only; it must show media_id. Not for a file. | |
| with_media_id | Yes | The item to show instead, from colliedesk_kb_media_list or colliedesk_kb_image_upload. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| undone | Yes | ||
| in_place | No | ||
| article_ids | Yes | ||
| to_media_id | Yes | ||
| translations | No | ||
| from_media_id | Yes | ||
| replacement_id | Yes |