Troubleshooting Tip: Unable to add FortiSwitch using API after upgrade to v7.4.0 and above
| Description | This article describes an issue observed after upgrading to FortiManager v7.4.0 and above, where using the following API to add a managed FortiSwitch to a FortiGate results in the error 'invalid or unsupported switch-id':
{ "method":"add", "params":[ { "url":"/pm/config/device/<Device_Name>/vdom/root/switch-controller/managed-switch", "data":{ "switch-id": "<Switch_serial>" }, Result: "status": { "code": -9001, "message": "switch-controller/managed-switch/<Switch_serial>/ : invalid value - prop[switch-controller managed-switch]: invalid or unsupported switch-id" }
The same API was successful in v7.2.11 and below. |
| Scope | FortiManager v7.4.0 and above. |
| Solution | Starting FortiManager v7.4.0, the 'sn' (Serial Number) parameter was introduced, which is required to add a managed FortiSwitch using the mentioned API.
The following would be an example of correct usage of this parameter in the API request:
"data":{
Result:
"status": { "code": 0, "message": "OK" } |