Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Eric_Beasley
Employee
Employee

What is the easiest way to get the number of objects for a specific type, e.g. hosts

What is the easiest way to get the number of objects for a specific type, e.g. hosts?

Especially if there are more than the current limit maximum value of 500?

I don't see easy commands like "get number of objects" or something like "show <objects> total"

This is what I found might work:

[Expert@X:0]# mgmt_cli login > id.txt

[Expert@X:0]# mgmt_cli show groups --format json -s id.txt | $CPDIR/jq/jq ".total"
171

And generating a variable would look like this:

[Expert@X:0]# total_groups=$(mgmt_cli show groups --format json -s id.txt | $CPDIR/jq/jq ".total")
[Expert@X:0]# echo "$total_groups"
171

Am I missing something here?

1 Reply
Ofir_Shikolski
Employee Alumnus
Employee Alumnus

what about something like that:
# show objects order.1.ASC "name" type "host" --format json | $CPDIR/jq/jq ".total"

My env:
I have 1K hosts , I run the command and got:
1000


using show-objects with filter option
https://sc1.checkpoint.com/documents/latest/APIs/index.html#gui-cli/show-objects~v1.1

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    Thu 05 Mar 2026 @ 12:00 PM (SGT)

    2026 Threat Landscape Briefing - APAC

    Thu 05 Mar 2026 @ 03:00 PM (CET)

    2026 Threat Landscape Briefing - EMEA

    Thu 05 Mar 2026 @ 11:00 AM (EST)

    Tips and Tricks 2026 #1: MCP Servers

    Thu 05 Mar 2026 @ 02:00 PM (EST)

    2026 Threat Landscape Briefing -AMER
    CheckMates Events