Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Ravi_Dubey
Participant

How to add multiple network objects easily for a beginner

Hi Friends,

I want to add multiple network objects (more than 400). Is there a easy way of doing this.

I have read on checkmates about using csv file but not really sure about exact steps.

I tried postman but it only lets me add 1 host at a time.

We are running multi domain environment.

Sorry am new to scripting/automation so please bear with me.

Appreciate your response

6 Replies
Mark_Mitchell
Advisor

Hi Ravi, 

If you are using R80 you could use the management cli, create a CSV file and then from powershell remotely create the objects. 

Please see: https://community.checkpoint.com/thread/1342  seems to have the steps you'll need to complete the task. 

Let us know how you get on. Smiley Happy

Mark

0 Kudos
Ravi_Dubey
Participant

Thanks for your reply mate, forgot to mention we are using R80.10

I was thinking of using mgmt._cli.....

To use mgmt._cli do I just have to go in expert mode on the MDM, change to relevant MDS and run the command similar to below?

mgmt_cli add host --batch data.csv

0 Kudos
Mark_Mitchell
Advisor

Not a problem at all. Smiley Happy 

Yeah that should be it. Once the command finishes it will also publish the changes to to the database as well. 

KK
Employee
Employee

Hey Mark,

What is the way to add multiple hosts using Web API like Postman. It only gives option to add one host a time. There should be some way to add multiple hosts using Postman?

Thanks,

KK

0 Kudos
PhoneBoy
Admin
Admin

The add-host API call only supports adding one host at a time.
The add-objects-batch API call in R80.40+ supports adding more than one at a time.

0 Kudos
Tomer_Noy
Employee
Employee

Another cool option is to use the [relatively] new batch API option:
https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/add-objects-batch~v1.7%20 

With this, you can use the mgmt_cli or Postman and pass a single JSON with many objects.

Another benefit is that the server is much more efficient when handling a single batch API call with many objects, instead of a loop of multiple calls.

0 Kudos