Hello everyone,
I would like to bring to your attention a challenge we are facing with one of our clients' Checkpoint management server. The server contains of more than 20,000 Network and Service objects. To retrieve rule details categorized by layers, we are utilizing the "show-access-rulebase" API command. The output file from this command contains the object details configured within the rules.
Additionally, we are using the "show-unused-objects" API command to identify unused objects. This means that all objects used within the rules are present in the "show-access-rulebase" API response, while objects not configured within the rules are found in the "show-unused-objects" API response.
However, in the case of this particular client, the "show-unused-objects" API response contains only 114 object details. To overcome this issue, I attempted to use the "show-objects" command within the client's setup. Unfortunately, due to API constraints, the "show-objects" API response only get a maximum of 500 object details. Also, the response indicated a total count of 23,684 objects. So, I have added the "offset" and "limit" parameters in the "show-objects" API, executing multiple calls with different offset values ranging from 0 to 47.
But, all API calls only yielded around 2000+ unique object details, with the remaining values being duplicate entries. I had expected that specifying an offset value of 47 would return only 184 unique objects, but the API response still included 500 object details. (My assumption was that an offset of 0 and a limit of 500 would return object values 1 to 500, and likewise, an offset of 46 and a limit of 500 would return object values 23001 to 23500.)
The API documentation mentions an automatic sort order by Name in ascending order. Also, I have tried including the "order" parameter with the value of "name," but unfortunately, it did not yield the desired results.
Here are the details of the API request:
POST {{server}}/show-objects
Content-Type: application/json
X-chkp-sid: {{session}}
{
"limit" : 500,
"offset" : 47,
"order" : [ {
"ASC" : "name"
} ]
}
I kindly request your assistance in resolving this issue or suggesting an alternative approach to retrieve all object details.
Thank you for your attention.
Best regards,
M. Veeraselvam