18 R80 REST API Lab
18 R80 REST API Lab
LAB
R81 Training
Updated Mar. 11, 2021 ©2021 Check Point Software Technologies Ltd. 1
Rest API Lab
In SmartConsole navigate to
MANAGE & SETTINGS -> Blades ->
Management API.
Click to open Advanced Settings. Management
API
Your instructor has already set access
to All IP addresses.
Click OK or Cancel.
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.
©2021 Check Point Software Technologies Ltd. 16
REST API Lab
Management API Versions
Note: the API Reference has a changelog and list of version releases.
Collections
login
Server
Environment
Body
Manage
Environments
R81
update
200 OK
add-host
Code
Note: The copy may remove a “space” character causing an error when run.
©2021 Check Point Software Technologies Ltd. 32
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.
©2021 Check Point Software Technologies Ltd. 36
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 using putty. Hint: type
putty in the DOS cmd window to launch putty.
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.
Answers
named id.txt “mgmt_cli -r true login > id.txt”. In subsequent
commands this is called using the –s parameter “mgmt_cli
publish -s id.txt”.