- Products
- Learn
- Local User Groups
- Partners
- More
MVP 2026: Submissions
Are Now Open!
What's New in R82.10?
10 December @ 5pm CET / 11am ET
Announcing Quantum R82.10!
Learn MoreOverlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
curl_cli -s -k -H 'Content-Type: application/json' -H X-chkp-sid:"8ujfSl3KPfUi3iB_nMCjTnUz_fCa0buGpCtNdeQL7c4" https://x.x.x.x/set-automatic-purge -d '{"enabled":"true","keep-sessions-by-days":"true","number-of-sessions-to-keep":"30","scheduling.check-interval":"30","scheduling.time-units":"days","scheduling.start-date":"2022-09-05T16:46:00","number-of-days-to-keep":"14","keep-sessions-by-count":"false"}'
{
"code" : "generic_err_invalid_parameter_name",
"message" : "Unrecognized parameter [scheduling.check-interval]"
The "scheduling.check-interval" syntax is a workaround for mgmt_cli. For a proper API call, 'scheduling' needs to contain an object, like this:
{
"enabled":"true",
"keep-sessions-by-days":"true",
"number-of-sessions-to-keep":"30",
"scheduling":{
"check-interval":"30",
"time-units":"days",
"start-date":"2022-09-05T16:46:00"
},
"number-of-days-to-keep":"14",
"keep-sessions-by-count":"false"
}
or as a single line:
{"enabled":"true","keep-sessions-by-days":"true","number-of-sessions-to-keep":"30","scheduling":{"check-interval":"30","time-units":"days","start-date":"2022-09-05T16:46:00"},"number-of-days-to-keep":"14","keep-sessions-by-count":"false"}
I have no idea what's wrong, but this will not stop me from commenting!
Did you try it using mgmt_cli?
Using curl_cli for API calls is just... looking for trouble. 😛
What's your management's version?
You should probably not use "number-of-sessions-to-keep" with "keep-sessions-by-count":"false".
Actually, you should use "keep-sessions-by-count":"true" and "number-of-sessions-to-keep":"<some low number>" in order to always keep at least that much sessions.
You should use a shorter "scheduling.check-interval", like a day, or a weak max.
With your current setting, you'll keep anywhere from 14 to 44 days of changes, depending on the day of the month.
This seems to work fine here :
mgmt_cli -r true [-d domain] set automatic-purge enabled true keep-sessions-by-days true scheduling.check-interval 30 scheduling.time-units days scheduling.start-date now number-of-days-to-keep 14 keep-sessions-by-count false
The "scheduling.check-interval" syntax is a workaround for mgmt_cli. For a proper API call, 'scheduling' needs to contain an object, like this:
{
"enabled":"true",
"keep-sessions-by-days":"true",
"number-of-sessions-to-keep":"30",
"scheduling":{
"check-interval":"30",
"time-units":"days",
"start-date":"2022-09-05T16:46:00"
},
"number-of-days-to-keep":"14",
"keep-sessions-by-count":"false"
}
or as a single line:
{"enabled":"true","keep-sessions-by-days":"true","number-of-sessions-to-keep":"30","scheduling":{"check-interval":"30","time-units":"days","start-date":"2022-09-05T16:46:00"},"number-of-days-to-keep":"14","keep-sessions-by-count":"false"}
Hi Bob, many thanks.
With your syntax everything works well.
It looks like the API documentation is wrong.
The documentation is definitely correct. set automatic-purge was added in API version 1.6.1 (R80.40 jumbo 78 and up), and the 'scheduling' property has always said it needs an object.
mgmt_cli can't represent complex object and list graphs in its command line input, so it resorts to workarounds like "scheduling.check-interval 30" and "set access-rule source.add.1 <UUID>".
The API documentation shows exactly what @Bob_Zimmerman says.
You have to look in the "Web Services" section of the documentation.
See: https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/set-automatic-purge~v1.8%20
The documentation show this:
Request
POST {{server}}/set-automatic-purge
Content-Type: application/json
X-chkp-sid: {{session}}
{
"enabled" : true,
"keep-sessions-by-days" : false,
"number-of-sessions-to-keep" : "10",
"scheduling.check-interval" : "21",
"scheduling.time-units" : "days",
"scheduling.start-date" : "2020-04-24T12:00:00"
}
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 4 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
Fri 12 Dec 2025 @ 10:00 AM (CET)
Check Mates Live Netherlands: #41 AI & Multi Context ProtocolTue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Fri 12 Dec 2025 @ 10:00 AM (CET)
Check Mates Live Netherlands: #41 AI & Multi Context ProtocolTue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY