When I get a specific config version by requesting /node/version/view?node=NODE&?oid=OID&format=json or /node/version/view?node=NODE&?oid=OID&format=text, HTML special characters are encoded (for example, < is <, " is " and so on). Here is an example:
# # COMMAND: get system status
# Version: FortiGate-40F v1.2.3.4.5
# Firmware Signature: certified
# Virus-DB <db version stripped>
# Extended DB <db version stripped>
...
config system global
set admintimeout 30
set alias "FortiGate-40F"
set hostname "SOME_HOSTNAME"
...
end
...
We would like to get a config via REST API and upload it to a device to restore the configuration.
Is there any API end-point or, maybe, another format value that would return configs with 'raw' data (without this kind of escaping)?
I had a look at issues, README, even the code (though, I am not familiar with ruby that much) and could not find anything.
When I get a specific config version by requesting
/node/version/view?node=NODE&?oid=OID&format=json
or/node/version/view?node=NODE&?oid=OID&format=text
, HTML special characters are encoded (for example,<
is<
,"
is"
and so on). Here is an example:We would like to get a config via REST API and upload it to a device to restore the configuration. Is there any API end-point or, maybe, another
format
value that would return configs with 'raw' data (without this kind of escaping)? I had a look at issues, README, even the code (though, I am not familiar withruby
that much) and could not find anything.