-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Hi,
Ive upgraded some Fortigates from 7.2.10 to 7.4.5.
Im running VDOMs in all the firewalls and using tokenlogin as login method.
7.2.10 works fine but the Firewalls with 7.4.5 has stopped working with the following error:
line 266, in tokenlogin self._fortiversion = resp_lic['version'] TypeError: 'Response' object is not subscriptable
In the debug logs Im seeing this:
2024-10-23 15:46:46,965 fortiosapi DEBUG self._https is True
2024-10-23 15:46:46,965 fortiosapi DEBUG host is XXXXXXX
2024-10-23 15:46:46,965 fortiosapi DEBUG vdom is: global
2024-10-23 15:46:46,965 fortiosapi DEBUG urlbuild is https://XXXXXXX/api/v2/cmdb/system/status?global=1 with crsf: {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'Connection': 'keep-alive', 'Authorization': 'XXXXXXX'}
2024-10-23 15:46:46,965 fortiosapi DEBUG Calling GET ( https://XXXXXXX/api/v2/cmdb/system/status?global=1, None)
2024-10-23 15:46:47,164 fortiosapi DEBUG in GET function
2024-10-23 15:46:47,165 fortiosapi DEBUG formating response
2024-10-23 15:46:47,165 fortiosapi DEBUG response content type : application/json
2024-10-23 15:46:47,165 fortiosapi DEBUG Request : GET on url : https://XXXXXXX/api/v2/cmdb/system/status?global=1
2024-10-23 15:46:47,165 fortiosapi DEBUG Response : http code 404 reason : Not Found
2024-10-23 15:46:47,165 fortiosapi DEBUG raw response: b'{\n "status":"error",\n "http_status":404,\n "path":"system",\n "name":"status",\n "serial":"XXXXXXX",\n "version":"v7.4.5",\n "build":2702,\n "http_method":"GET"\n}'
2024-10-23 15:46:47,165 fortiosapi WARNING in formatresponse res.content does not exist, should not occur
2024-10-23 15:46:47,165 fortiosapi DEBUG response system/status : <Response [404]>
I believe the issue is caused by a depricated API URL described in the below KB.
https://community.fortinet.com/t5/FortiGate/Technical-Tip-API-error-404-after-upgrading-to-7-4-4/ta-p/344457
Could you guys please fix this issue?