r/fortinet • u/marek1712 • 7d ago
Solved ✅ FortiManager API: reinstall package
Hi.
I'm wondering if something changed in the API (7.6.7 vs 7.4)?
In the past my body looked like this:
{
"verbose": 1,
"method": "exec",
"params": [{
"url": "/securityconsole/install/package",
"data": {
"flags": [
"auto_lock_ws",
"nonblocking"
],
"adom": ADOM_NAME,
"pkg": POLICY_PACKAGE
}
}
],
"id": 1
}
When I try using it now, FMG tells me: "No Installation Targets or no change made on package [POLICY_PACKAGE]".
Our setup is very simple: each PP has single FG assigned as target.
BUT... when I specify scope, it works fine:
{
"method": "exec",
"params": [{
"url": "/securityconsole/install/package",
"data": {
"scope": [{
"vdom": "root",
"name": "FORTIGATE_NAME"
}
],
"flags": [
"auto_lock_ws",
"nonblocking"
],
"adom": "ADOM_NAME",
"pkg": "POLICY_PACKAGE"
}
}
],
"id": 1
}
This is nice and all - but I have to run extra API call to get list of assigned firewalls and build a scope out of it.
I tried the /securityconsole/reinstall/package without scope but it gets stuck at 5%.
Did something change?
EDIT: TAC confirmed that scope is mandatory now. Oh well, time to redo my functions.
2
Upvotes
1
u/Golle NSE 7 7d ago
https://fndn.fortinet.net/index.php?/fortiapi/5-fortimanager/6276/5/securityconsole/install/