cancel
Showing results for 
Search instead for 
Did you mean: 
Post a Question
phlrnnr
Copper

show-access-rulebase and large rulesets

Jump to solution

I am using the REST API to create access-rules.  As part of the process, I'd like to validate that the rule name that the customer is submitting doesn't already exist in the rulebase/layer.  I was thinking I'd use 'show-access-rulebase' to export all the rules in the layer and then look for rule name matches. 

The code I have to do this works.  However, my question is, if the rulebase were to grow over 500 rules, 'show-access-rulebase' has a limit of 500 results.  What is the recommended way to do this on rulebases with large numbers of rules?

Is there a better way to do what I want to do?  If not, how can I process all the possible rules if > 500?

thanks!

Labels (1)
1 Solution

Accepted Solutions
Employee++
Employee++

Re: show-access-rulebase and large rulesets

Jump to solution

Phillip,

Along with the rules data, this command also returns rulebase portion information - from, to, total.

Now, when querying the rulebase, you can pass parameters like offset and limit. As you said, you use limit 500.

So, offset along with from, to and total values can assist in looping over and querying the data, until total is reached. (advance the offset by limit per loop).

Robert.

0 Kudos
7 Replies
Employee++
Employee++

Re: show-access-rulebase and large rulesets

Jump to solution

Phillip,

Along with the rules data, this command also returns rulebase portion information - from, to, total.

Now, when querying the rulebase, you can pass parameters like offset and limit. As you said, you use limit 500.

So, offset along with from, to and total values can assist in looping over and querying the data, until total is reached. (advance the offset by limit per loop).

Robert.

0 Kudos

Re: show-access-rulebase and large rulesets

Jump to solution

Robert Decker schrieb:

As you said, you use limit 500

He  did not say he uses a limit of 500, he asks if there is a limit of 500  

And yes, the default limit is 500 afaik. 

So he may set the limit value higher or loop as recommended by you.

show access-rulebase offset 0 limit 2000 name "Network" details-level..... 
and now to something completely different
0 Kudos
Employee++
Employee++

Re: show-access-rulebase and large rulesets

Jump to solution

the default limit is 50. the maximum is 500. over 500 he must loop.

robert.

0 Kudos

Re: show-access-rulebase and large rulesets

Jump to solution

Oh you're right, I think I misunderstood a bit 

and now to something completely different
0 Kudos

Re: show-access-rulebase and large rulesets

Jump to solution

generally though it's a best practice not to loop on page size of 500, since the response packet can be relatively big and also the Management server processing of each chunk might take more time than looping on the default page size of 50. The reason why we capped it with max size of 500, is because beyond that the server might create a response too big to send.

0 Kudos

Re: show-access-rulebase and large rulesets

Jump to solution

If the rulebase grow over 500 rules, you must loop. 

John_Doe
Nickel

Re: show-access-rulebase and large rulesets

Jump to solution

In my environment, I set a big limit value (10000).

My biggest rulebase has almost 4000 rules so it's ok.

What I don't understand is that documentation says maximum is 500. Why ?