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

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

 

0 Kudos
1 Solution

Accepted Solutions
Alex-
Advisor
Advisor
5 Replies
_Val_
Admin
Admin

What tool do you use to invoke the API calls?

0 Kudos
Andre_DuToit
Explorer

Hi Val,

I run a Powershell Script with Invoke-RestMethod cmdlet. The response is then displayed via the console itself (vscode)

0 Kudos
Alex-
Advisor
Advisor

https://$($DomainIP)/v1.8/publish"--> Try https://<IP>/web_api/publish. 

Andre_DuToit
Explorer

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

0 Kudos
Andre_DuToit
Explorer

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!

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events