- Products
- Learn
- Local User Groups
- Partners
- More
What's New in R82.10?
Watch HereWhen the Agents Attack
A Live Look at Agentic Exposure Validation
AI Security Masters E8:
Claude Mythos: New Era in Cyber Security
CheckMates Go:
CheckMates Fest
Hello,
How can I get a specific value returned only using API commands in a bash script ?
E.g. I need a rule name and the rule type reurned only.
Assuming the API was developped using object oriented programming, it should be possible to get a specific value returned only instead all the information related to the rule like listed below.
like
access-rule.name
or
access-rule.type
From the API command listed below I'd like to see following only:
access-rule.name = "Stealth Rule"
or
rulebase.type = "access-rule"
or
access-rule.comments = "MY COMMENT"
=========================================================================================
[[email protected]:0]# mgmt_cli show access-rule --domain 'Domain1' layer 'Policy1 Network' uid '1ba15eb2-9fef-4042-9a6e-3842b8a9a231'
Username: script
Password:
uid: "1ba15eb2-9fef-4042-9a6e-3842b8a9a231"
name: "Stealth Rule"
type: "access-rule"
domain:
uid: "ad3744cb-55c1-4467-8119-1359dd7ca5f4"
name: "Domain1"
domain-type: "domain"
track:
type:
uid: "598ead32-aa42-4615-90ed-f51a5928d41d"
name: "Log"
type: "Track"
domain:
uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
name: "Check Point Data"
domain-type: "data domain"
per-session: false
per-connection: true
accounting: false
alert: "none"
layer: "e1c4e6af-1788-4f05-a598-6a995b841948"
source:
- uid: "97aeb369-9aea-11d5-bd16-0090272ccb30"
name: "Any"
type: "CpmiAnyObject"
domain:
uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
name: "Check Point Data"
domain-type: "data domain"
source-negate: false
destination:
- uid: "97aeb369-9aea-11d5-bd16-0090272ccb30"
name: "Any"
type: "CpmiAnyObject"
domain:
uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
name: "Check Point Data"
domain-type: "data domain"
destination-negate: false
service:
- uid: "97aeb369-9aea-11d5-bd16-0090272ccb30"
name: "Any"
type: "CpmiAnyObject"
domain:
uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
name: "Check Point Data"
domain-type: "data domain"
service-negate: false
vpn:
- uid: "97aeb369-9aea-11d5-bd16-0090272ccb30"
name: "Any"
type: "CpmiAnyObject"
domain:
uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
name: "Check Point Data"
domain-type: "data domain"
action:
uid: "6c488338-8eec-4103-ad21-cd461ac2c473"
name: "Drop"
type: "RulebaseAction"
domain:
uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
name: "Check Point Data"
domain-type: "data domain"
action-settings: {}
content:
- uid: "97aeb369-9aea-11d5-bd16-0090272ccb30"
name: "Any"
type: "CpmiAnyObject"
domain:
uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
name: "Check Point Data"
domain-type: "data domain"
content-negate: false
content-direction: "any"
time:
- uid: "97aeb369-9aea-11d5-bd16-0090272ccb30"
name: "Any"
type: "CpmiAnyObject"
domain:
uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
name: "Check Point Data"
domain-type: "data domain"
custom-fields:
field-1: ""
field-2: ""
field-3: ""
meta-info:
lock: "unlocked"
validation-state: "ok"
last-modify-time:
posix: 1542012857319
iso-8601: "2018-11-12T09:54+0100"
last-modifier: "script"
creation-time:
posix: 1542012857319
iso-8601: "2018-11-12T09:54+0100"
creator: "script"
comments: "MY COMMENT"
enabled: false
install-on:
- uid: "6c488338-8eec-4103-ad21-cd461ac2c476"
name: "Policy Targets"
type: "Global"
domain:
uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
name: "Check Point Data"
domain-type: "data domain"
...
.....
Thank you for the help .
This is more of a RFE ![]()
Hello Günther,
so you are saying this is not object oriented programmed ?
The language the API is programmed in is irrelevant. What he is saying is, it's not feature we currently provide, therefor a request for enhancement would need to be submitted.
Bash is not object oriented so can't. You can use usual bash tools like grep, sed, awk to process API output, but your variables won't be object oriented type of course.
You can call for json format and use JQ to parse the returned data.

Hi,
have a look at the SDK GitHub - CheckPointSW/cp_mgmt_api_python_sdk: Check Point API Python Development Kit and the examples included. with parsing the output as "data", you can just say "give me the value of "rulename""
i.e.(what i did)
| if monitor_ips_version.success: |
| ips_info=monitor_ips_version.data |
| ips_current_ver_info=ips_info["installed-version"] |
ips_update_ver_info=ips_info["latest-version"]
i am aware, you asked for bash and i answered with python, but maybe it helps
Hello David.
yes, it is.
Than you
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
Thu 09 Jul 2026 @ 10:00 AM (CEST)
Schutz souveräner Workloads: Check Point & die AWS European Sovereign CloudThu 09 Jul 2026 @ 11:00 AM (CEST)
The Cloud Architects Series: Check Point Edge Protection SD-WAN & SASEThu 09 Jul 2026 @ 11:00 AM (EDT)
Tips and Tricks 2026 #9 - What's New with Check Point Email SecurityFri 10 Jul 2026 @ 11:00 AM (IDT)
CheckMates Live Netherlands - Sessie 48: Nieuwe Check Point Workspace SecurityTue 14 Jul 2026 @ 10:00 AM (PDT)
AI Security Masters E11: READY OR NOT: Securing the AI Enterprise 3/5 - AI Workforce SecurityThu 30 Jul 2026 @ 10:00 AM (PDT)
AI Security Masters E12: READY OR NOT: Securing the AI Enterprise 4/5 - AI GatewayThu 09 Jul 2026 @ 11:00 AM (EDT)
Tips and Tricks 2026 #9 - What's New with Check Point Email SecurityFri 10 Jul 2026 @ 11:00 AM (IDT)
CheckMates Live Netherlands - Sessie 48: Nieuwe Check Point Workspace SecurityTue 14 Jul 2026 @ 10:00 AM (PDT)
AI Security Masters E11: READY OR NOT: Securing the AI Enterprise 3/5 - AI Workforce SecurityThu 30 Jul 2026 @ 10:00 AM (PDT)
AI Security Masters E12: READY OR NOT: Securing the AI Enterprise 4/5 - AI GatewayThu 20 Aug 2026 @ 10:00 AM (PDT)
AI Security Masters E13: READY OR NOT: Securing the AI Ent 5/5 - AI Research & Threat LandscapeAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY