For a project i'm working on, we are looking to export/import the management configuration, this needs to be done programmatically.
The idea is to rebuild the checkpoint in case something happens. Resources will be redeployed, and the management config should also be reapplied.
I have been looking at the export-management (API) command.
It states that it should be able to do this with a SMS environment, but somehow i keep getting the error message 501 stating that this is only possible with a MDS environment.
What i did so far using postman:
https://<mgmt-server>:<port>/web_api/login (to generate a sid)
https://<mgmt-server>:<port>/web_api/export-management
Stated the content-type and x-chkp-sid in the headers field
in the body of the request tried:
{
"file-path" : "/home/<userid>/backup.tgz"
}
or sending a emty body, but it keeps giving me the error state 501
message": "This command can work only on domains of type MDS. Cannot execute it in the current domain (current domain type is Domain)."
Tested from the CLI to export the management config, and this was successful
Resource used:
https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/export-management~v1.8%20