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

Export information about all group objects to CSV

Is there a way to export all group object information to CSV?
Using 'mgmt_cli - r true show group name' groupname '-- format json | jq'. members [] | [. 'name',. 'subnet4',. 'subnet mask',. 'ipv4 address first',. 'ipv4 address last',. 'ipv4 address'] | @ csv' - r>net_group. csv 'can only export individual group object information.
How do I write it if I want to export the information of all group objects at once?

0 Kudos
1 Solution

Accepted Solutions
PhoneBoy
Admin
Admin

You would have to write a script to iterate through all the groups.
Further, the commands you wrote won’t work of the groups contain more items than a single API call can provide.

You may want to use something like: https://community.checkpoint.com/t5/API-CLI-Discussion/CLI-API-Example-for-exporting-group-members-t...

View solution in original post

0 Kudos
5 Replies
PhoneBoy
Admin
Admin

You would have to write a script to iterate through all the groups.
Further, the commands you wrote won’t work of the groups contain more items than a single API call can provide.

You may want to use something like: https://community.checkpoint.com/t5/API-CLI-Discussion/CLI-API-Example-for-exporting-group-members-t...

0 Kudos
zhangchuang
Contributor

Hi PhoneBoy,

I see, but I'm not quite sure how to write the script. Could you give me a simple example?

0 Kudos
PhoneBoy
Admin
Admin

What I provided a link to was exactly that.

0 Kudos
AkosBakos
Leader Leader
Leader

Hi @zhangchuang 

check this: https://support.checkpoint.com/results/sk/sk120342

Here you can export the whole package, and the group members will be in html/xml format in the struckture.

Akos

 

----------------
\m/_(>_<)_\m/
0 Kudos
zhangchuang
Contributor

Hi AkosBakos,

I tried this, but it wasn't that intuitive, I mainly wanted to export it to a table.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events