Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ivory

Parameter access-rulebase API

Hello,

 

I am currently trying to extract the rulebase with hits for every rule with the command :

show access-rulebase name "Network" details-level "standard" use-object-dictionary true show-hits true hits-settings.from-date "2019-01-01" hits-settings.to-date "2019-03-06" hits-settings.target "CheckPoint-Lab" --format json

 

But I have an error :

{
  "code" : "generic_err_object_not_found",
  "message" : "Requested object [Network] not found"
}

Do you know where I can find the "name" parameter that is needed for this command as it seems not to be the "Network" as default ?

 

Best Regards,

 

Joris KIEFFER

0 Kudos
4 Replies
Highlighted
Employee+
Employee+

Re: Parameter access-rulebase API

show access rulebase needs the layer name as the name parameter. If it is not unique, supply package name plus layer name.

For example:

#mgmt_cli show access-rulebase name "Standard Network"

 

Highlighted
Ivory

Re: Parameter access-rulebase API

Thanks for your answer. I'll try and come back if I still have any problem.

0 Kudos
Highlighted
Ivory

Re: Parameter access-rulebase API

Hello,

 

I succeeded launch the command and have the information that I want.

But other than using the RestAPI method is there a way to retrieve the result of an API call done on the CLI ?

 

Best Regards,

0 Kudos
Highlighted
Admin
Admin

Re: Parameter access-rulebase API

As @Joshua_Hatter showed in his answer, you can use mgmt_cli to access the REST API. You can also make calls pretty easily using curl as well. Several examples can be found on the CheckMates community.

0 Kudos