- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- export management by API (SMS)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
export management by API (SMS)
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
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The domain needs to be specified in your login call, not the export-management one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
you need to specify the version of the server. Without it the API assumes you are trying to export a domain only. For an SMS it looks like this:
POST {{server}}/export-management Content-Type: application/json X-chkp-sid: {{session}} { "version" : "R81.10", "file-path" : "/var/log/exported.tgz" }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to be logged into the System Data domain to run this call from an SMS.
Add "domain" : "System Data" to your login query and it will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thx for the suggestion, but i still get the same error message.
The body i now sent is:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The domain needs to be specified in your login call, not the export-management one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah Yes thanks that did the trick.
