- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- How to publish changes to Checkpoint API.
- 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
How to publish changes to Checkpoint API.
Good Day All,
I've recently been tasked to Automate certain changes via the Checkpoint API as a PoC. I'm currently creating a Group (with add-group) and add members with it, and it succeeds.
The problem is I noticed that you need to publish to the API before those changes are made and accepted. I've tried playing around with the Publish API endpoint after making changes with a specific SID, but if i Publish, the response i get seems like the Login Page for the Gaia Login Page:
Invoke-RestMethod "https://$($DomainIP)/v1.8/publish" -Method 'POST' -Headers $headers -Body $body
<!DOCTYPE html><HTML><HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9,EmulateIE8"><meta name="others" content="WEBUI LOGIN PAGE" /><TITLE>Gaia</TITLE>
<link rel="shortcut icon" href="/login/fav.ico">
<link rel="stylesheet" type="text/css" href="/login/ext-all.css" />
<link rel="stylesheet" type="text/css" href="/login/login.css" />
<STYLE TYPE="text/css">
.ext-ie .webui-login-fld{font-size: 11px;}
</STYLE>
<script type="text/javascript" src="/login/ext-base.js"></script><script type="text/javascript" src="/login/ext-all.js"></script><script type="text/javascript">var errMsgText = "";var bannerMsgText = "";bannerMsgText += "This system is for authorized use only.<br>";var hostname='REDACTED';var version='R81.10';var formAction="/cgi-bin/home.tcl";</script><script type="text/javascript" src="/login/login.js"></script></HEAD><BODY><noscript><div style='font-size:20px;position:relative;top:100px;'>For full functionality of this site it is necessary to enable JavaScript.</div></noscript></BODY></HTML>
I am completely new to the Checkpoint API, and to clarify, i am not at all a Subject Matter Expert on Checkpoint Firewall Technology so i might be missing something.
I would appreciate it greatly for some guidance on how to publish these changes.
Thanks!
Andre
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://$($DomainIP)/v1.8/publish"--> Try https://<IP>/web_api/publish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What tool do you use to invoke the API calls?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Val,
I run a Powershell Script with Invoke-RestMethod cmdlet. The response is then displayed via the console itself (vscode)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://$($DomainIP)/v1.8/publish"--> Try https://<IP>/web_api/publish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex,
I can try this, but the reason im using the previously stated URI is because that was what the Postman Powershell Code suggest is used.
I'll revert back and let you know if this works.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Alex,
I just tried this and it worked, i can now see the created group in the Smart Console after publishing with that URI. I guess i shouldnt be fully trusting of the Postman Documentation 🙂
Have a great day Gentleman!
