- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- set-access-rule - API
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
set-access-rule - API
I was looking at moving a rule from position 1 to 3 with the following:
{
"uid": "rule-uid-here",
"layer" : "Network",
"new-position" : 3,
"details-level" : "full"
}
Response: 400 Bad Request
{
"code": "generic_err_invalid_parameter",
"message": "new-position parameter temporarily unsupported"
}
Is there a way I can simply move rules around without deleting/adding them?
Originally, instead of using "new-position" : 3, I was using "position" : 3, which returns a status 200 OK but was not moving the rule. Should it be returning status 200 OK when using "position"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Joshua,
The set-access-rule API does not have a "new-position" or "position" arguments. See https://sc1.checkpoint.com/documents/R80/APIs/index.html#web/set-access-rule
Unfortunately, you cannot re-position a rule using the existing APIs. This is a feature that we'd like to add to one of the upcoming releases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is weird. In the documentation you have the "new-position" argument since the API v1:
https://sc1.checkpoint.com/documents/latest/APIs/index.html#set-access-rule~v1%20
Is it a mistake in the documentation?
I am currently using this argument with R81.10 (API v1.8).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is definitely no argument named simply "position" in the syntax of "set access-rule" API.
Testing a quick example via MGMT CLI in R81.10 works as expected otherwise i.e.
set access-rule rule-number 2 new-position 1 layer "Network" --format json
