- Products
- Learn
- Local User Groups
- Partners
- More
MVP 2026: Submissions
Are Now Open!
What's New in R82.10?
Watch NowOverlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
i am running below python code to get output of "show-gateway-and-servers" from 81.10 MDS but not sure where i am missing the key parameter. any suggestions would be helpful, thanks
class GetServerDetails(test):
def api_call(self, ip_addr, port, command, json_payload, sid):
url = "https://" + ip_addr + ":" + port + "/gaia_api/" + command
if sid == "":
request_headers = {"Content-Type": "application/json"}
else:
request_headers = {"Content-Type": "application/json", "X-chkp-sid": sid}
r = requests.post(
url, data=json.dumps(json_payload), headers=request_headers, verify=False
)
return r.json()
def login(self, user, password):
payload = {"user": user, "password": password}
response = self.api_call(self.node, "443", "login", payload, "")
self.sid = response["sid"]
def run_script(self, script):
payload = {"script": script}
response = self.api_call(self.node, "443", "run-script", payload, self.sid)
return response["task-id"]
def show_task(self, task_id):
payload = {"task-id": task_id}
response = self.api_call(self.node, "443", "show-task", payload, self.sid)
return response
def collect(self):
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
self.password = "xxxxx"
sid = self.login("xxxxx", self.password)
show_cluster_result = self.api_call(
self.node, "443", "show-gateways-and-servers", {}, self.sid
)
return show_cluster_result
Output:
{'code': 'generic_err_command_not_found',
'errors': 'Requested API command: '
'[show-gateways-and-servers] not ''found',
'message': 'Command Not Found'}
Thanks to @Omer_Kleinstern from R&D:
The URL is wrong:
url = "https://" + ip_addr + ":" + port + "/gaia_api/" + command
Should be “web_api”.
as @Tal_Paz-Fridman mentioned, you are calling Gaia API and should call MGMT API. Gaia API is for local OS level config only
Hi - It should probably be show-gateways-and-servers --- the word gateways in plural
sry its a typo when drafting this question updated to "show-gateways-and-servers" but still same error
{'code': 'generic_err_command_not_found',
'errors': 'Requested API command: '
'[show-gateways-and-servers] not ''found',
'message': 'Command Not Found'}
Thanks to @Omer_Kleinstern from R&D:
The URL is wrong:
url = "https://" + ip_addr + ":" + port + "/gaia_api/" + command
Should be “web_api”.
as @Tal_Paz-Fridman mentioned, you are calling Gaia API and should call MGMT API. Gaia API is for local OS level config only
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 4 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
Tue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsTue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY