- Products
- Learn
- Local User Groups
- Partners
- More
What's New in R82.10?
10 December @ 5pm CET / 11am ET
Improve Your Security Posture with
Threat Prevention and Policy Insights
Overlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
Hi,
I have a script currently utilising the mgmt api to open a specific application/site and show all the URL's listed. I then can then grep a saved output to find a single URL. I look to add filtering built into the script but has anyone had any experience with looping over all application/sites to find a single URL?
Tom
Makes sense in theory. Will wait to see if anyone else has any feedback.
Hi Daemon,
Looking at this, show application-site appears to show too much or doesn't allow me to look at Custom app/sites we've already made.
Anyone in the community you know who could assist?
Thanks Tom
Not sure if I understand you correctly, but once you have created a custom application/site you can search for it via the "show application-site" command - you just need to have the name, uid or application id of the related object. So if you have the name and it is called "CustomTest" you an use the following command to receive your required Information; the contained URLs:
Hi Maik,
Thanks for that. The second option is more inline with what i'm trying to achieve. My issue though, is identifying what is custom and what is not without having the ability to search against the primary category in the api call. I'll have to see if there is some other way of doing it without looking at the uid as this requires manually updating of the uid.
Thanks for the insight.
Tom
Hello
Following with the thread. A question that I cannot see in the webs about a searching in the whole checkpoint.
I have a 90 custom application / application site. So, in one o several applications exists an URL called "redhat_test".
How we can find in which application is placed ?
I cannot use wildcard to show all applications
smartserver>mgmt_cli show application-site name *
I cannot use a filter as grep in case set one by one application
smartserver>mgmt_cli show application-site name destyapp_wsus | grep redhat_test
Are there easy way to receive an screen output as
smartserver>mgmt_cli show application-site name * | grep redhat_test
destyapp_wsus "url-list" : [ " redhat_test
destyapp_lin "url-list" : [ " redhat_test
destyapp_shop "url-list" : [ " redhat_test
You cannot use a wildcard in an API call.
It's also not necessary as there is an endpoint that will list all the application-sites:
https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-application-sites~v1.9%20
Note that you may have to make multiple calls to this endpoint (using limit/offset for paging) to retrieve all results.
Following on from @PhoneBoy , you can use the API, but you'll need to be a little more creative with it. If you have custom application sites, then you likely have them in a custom application group. If not, put them in one.
(nb: i have a bash shell function named 'mcli' to be the curl syntax and things to handle all the HTTPS communication to the mgmt API server; it's not meant to be human-interactive; it just takes a JSON input and sends it via HTTP POST.)
First fetch your custom application site by name: (here i have one named "Test_Site_Group")
echo '{ "name" : "Test_Site_Group" }' |mcli show-application-site-group
{
"uid" : "9d36b14c-b7c9-4282-a5a4-19d83778c8f3",
"name" : "Test_Site_Group",
"type" : "application-site-group",
"domain" : {
"uid" : "41e821a0-3720-11e3-aa6e-0800200c9fde",
"name" : "SMC User",
"domain-type" : "domain"
},
"members" : [ {
"uid" : "3d765aa4-2b3e-4d9e-a26b-26c20379da78",
"name" : "Malicious_Sites",
"type" : "application-site",
"domain" : {
"uid" : "41e821a0-3720-11e3-aa6e-0800200c9fde",
"name" : "SMC User",
"domain-type" : "domain"
},
"icon" : "Objects/application",
"color" : "black"
} ],
....
}
The ".members[]" key is a list of your custom sites. This is where PhoneBoy said to iterate over that:
$ echo '{ "name" : "Test_Site_Group" }' |mcli show-application-site-group |jq -r '.members[].name' |while read app_site;
do
echo $app_site
done
Malicious_Sites
...
The output is the list of custom application sites you would have. Here, my customer happened to have one like yours, with a list of URLs. I just stole theirs for this demo. Thus, you'll then call your API again for each of the custom application sites in that site group. Then search the "url-list" key with a JQ filter:
$ echo '{ "name" : "Test_Site_Group" }' |\
mcli show-application-site-group |\
jq -r '.members[].name' |\
while read app_site; do
echo '{ "name" : "'${app_site}'" }' |\
mcli show-application-site |\
jq -r --arg url_search "chromeupdates.online" 'select(."url-list"[]|contains($url_search)).name';
done
Malicious_Sites
Again, the output is the name of the custom site that had an URL in the list that you wanted to find. In this case, I passed a static string to JQ as an argument. "chromeupdates.online" is the value of the variable in JQ as $url_search. You can replace that string with whatever you want and however you want.
Ansible can do this, too, but with a little more work with JMESQuery.
If you intend to run this same thing locally on the mgmt server with mgmt_cli, you can, but just replace my forceful JSON with parameters to mgmt_cli. Oh, and be sure to do "export MGMT_CLI_FORMAT=json" before you run mgmt_cli.
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
Wed 26 Nov 2025 @ 12:00 PM (COT)
Panama City: Risk Management a la Parrilla: ERM, TEM & Meat LunchWed 03 Dec 2025 @ 10:00 AM (COT)
Última Sesión del Año – CheckMates LATAM: ERM & TEM con ExpertosThu 04 Dec 2025 @ 12:30 PM (SGT)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - APACThu 04 Dec 2025 @ 03:00 PM (CET)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - EMEAThu 04 Dec 2025 @ 02:00 PM (EST)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - AmericasWed 03 Dec 2025 @ 10:00 AM (COT)
Última Sesión del Año – CheckMates LATAM: ERM & TEM con ExpertosThu 04 Dec 2025 @ 12:30 PM (SGT)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - APACThu 04 Dec 2025 @ 03:00 PM (CET)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - EMEAThu 04 Dec 2025 @ 02:00 PM (EST)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - AmericasWed 26 Nov 2025 @ 12:00 PM (COT)
Panama City: Risk Management a la Parrilla: ERM, TEM & Meat LunchAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY