Hi CheckMates,
Encountered an issue with Management API while creating a rule via Web API.
Trying to set track level according to https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/set-access-rule~v1.5%20 , track field is able to receive "log" (even though it seems not to be documented).
However, it automatically switches on "Accounting" log feature as well.
Trying to adjust the accounting setting results in an error.
Any thoughts how it can be resolved?
Sent payload that creates a rule with logging enabled plus accounting:
payload_For_API = {
"layer": "Network",
"position": "top",
"name": "API 1",
"action": "Accept",
"destination": "hst_dst_1.10.1.100",
"service": "Kubernetes1",
"enabled": True,
"source": "Any",
"track": "log"
}
Trying to use track.type (as in https://community.checkpoint.com/t5/Policy-Management/change-to-Track-setting-in-policy/m-p/47958#M2...) results in
{'code': 'generic_err_invalid_parameter_name', 'message': 'Unrecognized parameter [track.type]'}
Trying to configure track using additional fields:
{'code': 'generic_err_invalid_parameter', 'message': 'Invalid parameter for [track]. The invalid value [ "accounting" : False }] should be replaced by one of the following values: [none, log, extended log, detailed log]'}
or:
{'code': 'generic_err_invalid_parameter', 'message': 'Invalid parameter for [track]. The invalid value [ "log" , {"accounting" : False }] should be replaced by one of the following values: [none, log, extended log, detailed log]'}
Thanks,
Vlad Tonne