get_preview_result
Fetch the staged installation preview result for target devices in an ADOM after the preview task finishes, so configuration changes can be reviewed before committing.
Instructions
Fetch the result of an installation preview.
On FortiManager 7.6.7+ / 8.0.2+ preview_install already returns its result and then discards the staged copy, so re-reading that preview here returns "=== No preview result ===" (measured on 8.0.2); this is for a preview staged elsewhere, e.g. the GUI install wizard. On older builds it is the second half of preview_install: call it once that preview's task has finished (wait_for_task).
Args: adom: ADOM name devices: Target devices [{"name": "FGT1", "vdom": "root"}, ...] preview_taskid: Staging task id of the preview (staging_task_id from preview_install; FMG 7.6.7+ / 8.0.2+ only). Omitted, FortiManager uses its last install task, which may not be the preview you mean. An id with no preview returns "=== No preview result ===".
Returns: dict: Preview results with keys: - status: "success" or "error" - preview: Preview data with configuration changes - message: Error message if failed
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": {
"adom": "<adom>",
"devices": "<devices>"
},
"name": "get_preview_result"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adom | Yes | ||
| devices | Yes | ||
| preview_taskid | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||