18 R80 REST API Lab
18 R80 REST API Lab
R80 Training
In SmartConsole navigate to
MANAGE & SETTINGS -> Blades ->
Management API.
Click to open Advanced Settings. Management
API
Select Accept API calls from All IP
addresses.
Click OK.
add host
• Copy the first example command “add host” with the two required name/value
pairs.
Add host
Click to
Open a File
Exit
Install Policy
https://<ip>/web_api/install_policy
disable
Note: The file can also be downloaded from the Check Point community. Unzip the file to import it.
©2020 Check Point Software Technologies Ltd. 17
REST API Lab
Web Services
Click Collections to see the Web API (version 1.6).
Click Session Management -> login.
Notice they are all POST requests.
Collections
login
Server
Environment
Gear icon
Name
server
R80
update
add-host
Code
Note: The copy may remove a “space” character causing an error when run.
©2020 Check Point Software Technologies Ltd. 29
REST API Lab
mgmt_cli
mgmt_cli also has a batch option.
Note: The copy may remove a “space” character causing an error when run.
• Copy and paste the below into the DOS command window.
Note: The copy may remove a “space” character causing an error when run.
©2020 Check Point Software Technologies Ltd. 33
REST API Lab
Wrapping commands in scripts
Login to the management server CLI as admin and change to expert mode.
Or login directly to a bash shell as your new user.
Step through the commands from top to bottom or go directly to the bottom
and enter the command to create all of the objects, services and rulebase.
bash Create_All
When the command finishes, review the new policy and objects as you like.