Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
piotrsz90
Participant
Jump to solution

Management API

Hello

 

Multi MDS R80.10

 

Is there any way to non-interactively install policy using management API ?

Im asking because i want to script policy installations to happen periodically, as there is no option to use expect, how can i go through policy installations non-interactively ?

1 Solution

Accepted Solutions
Maarten_Sjouw
Champion
Champion
All you need to do is create a small script on the management server that contains:
mgmt_cli --root true -u admin -p <passw> install-policy <policyname>
Schedule this script in cron and you are done.
Regards, Maarten

View solution in original post

7 Replies
Martin_Valenta
Advisor
0 Kudos
piotrsz90
Participant
Is it a thing for 80.10 ?
0 Kudos
Maarten_Sjouw
Champion
Champion
All you need to do is create a small script on the management server that contains:
mgmt_cli --root true -u admin -p <passw> install-policy <policyname>
Schedule this script in cron and you are done.
Regards, Maarten
piotrsz90
Participant
Thanks!
That works to me, however flags "[...]--root true -u admin[...]" bring ambiguous parameters error, beside this all is fine.
I was looking exactly for something like this, my bad i didnt go carefully enough through management API reference to catch optional switches...
0 Kudos
Daniel_
Advisor

@piotrsz90 wrote:
That works to me, however flags "[...]--root true -u admin[...]" bring ambiguous parameters error, beside this all is fine.

Because of MDS you have to use domain:

mgmt_cli --root true --domain <domain> install-policy <policyname>

BTW: You can add "prepare-only true" to a first test.

piotrsz90
Participant
Hello

All is sorted, thanks
Tal_Paz-Fridman
Employee
Employee

Also look in the Management API Reference Guide:

https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/install-policy~v1.5%20

 

Another option you can use is Install Policy Presets that were added in R80.20 to Multi-Domain SmartConsole.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events