fortiosapi icon indicating copy to clipboard operation
fortiosapi copied to clipboard

Configuration restore issue

Open Grisha-L opened this issue 4 years ago • 0 comments

Hi, I'm using your script in order to backup existing configuration, manipulate it and then upload to another device. I'm having issues with the upload (restore function) part. Here is the relevant part: `params = {'access_token': apikey} data = {"source": "upload", "scope": "global"} files = {'file': ('random_conf.conf', config, 'text/plain')}

logging.info("attempting to upload configuration to device") response = fgt.upload("system/config", "restore", data=data, files=files, parameters=params)`

I'm getting the following response: "403 | Forbidden: Request is missing CSRF token or administrator is missing access profile permissions." The end device running 6.4.3 without vdom's.

Thanks, Grigory

Grisha-L avatar Dec 01 '20 10:12 Grisha-L