cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post
Raymondn
Iron

R80.10 API - Create Network with Tag and Associate to Group

Jump to solution

hi there,

I have been using this doc as my "menu" to explore various API use cases.

(https://sc1.checkpoint.com/documents/R80/APIs/index.html#ws)

I am able to create and delete network objects.

However, I am not able to find examples how to assign an existing Tag to the network object, and how to associate the network object to an existing group.

Any suggestions where I can find more info or examples?

I have been playing this via Postman as well as Gaia "mgmt" interfaces.

 

Thanks.

0 Kudos
1 Solution

Accepted Solutions

Re: R80.10 API - Create Network with Tag and Associate to Group

Jump to solution
mgmt_cli add network name "New Network 1" subnet "192.0.2.0" subnet-mask "255.255.255.0" tags "Tag Name" groups "Group Name"

If you want multiple groups or tags you can keep adding them with;

groups.1 "group 1 name" groups.2 "group 2 name"... and so on

5 Replies

Re: R80.10 API - Create Network with Tag and Associate to Group

Jump to solution
mgmt_cli add network name "New Network 1" subnet "192.0.2.0" subnet-mask "255.255.255.0" tags "Tag Name" groups "Group Name"

If you want multiple groups or tags you can keep adding them with;

groups.1 "group 1 name" groups.2 "group 2 name"... and so on

Raymondn
Iron

Re: R80.10 API - Create Network with Tag and Associate to Group

Jump to solution

Works great.  Thanks.

 

When publish the change (i.e. mgmt. publish), is there a parameter that allowing me to add the "description" about the publish changes, similar to what we can do via the SmartConsole?

 

Thanks.

0 Kudos
Admin
Admin

Re: R80.10 API - Create Network with Tag and Associate to Group

Jump to solution
Yes, using set session via API/CLI.
Highlighted
Raymondn
Iron

Re: R80.10 API - Create Network with Tag and Associate to Group

Jump to solution

Thanks.

Tried and it worked.

From the SmartConsole (Manage & Settings - Revisions), it would be nice if the system would automatically include the username (the one use via "mgmt login user <username>) in the published session, instead of leaving it blank.

Just an observation.

 

0 Kudos
Admin
Admin

Re: R80.10 API - Create Network with Tag and Associate to Group

Jump to solution
You can specify the session description when you do the initial login as well. By default, it's blank, yes.