Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
fly1ng_circus
Contributor

Getting an error when using "set-access-rule"

When I try changing a rule's position using "new-position"on "set-access-rule" api, I get a 400 bad request error and the following message. I only get errors when using "new-position" all other changes appear to work fine. It also doesn't seem to matter what "new-position" format I use (above/below, integer, name/uid).

 

{
    "code": "generic_error",
    "message": "Runtime error: com.checkpoint.management.access.objects.access_rulebase.AccessCtrlDomainPlaceholder incompatible with com.checkpoint.objects.rulebase.RulebaseRule"
}

 

 

Sample code:
I know in this sample I am mixing UID and Name but I have tried it every way imaginable and still see the same result.

 

import requests
import json

url = "https://192.168.200.216:443/web_api/v1.6.1/set-access-rule"

payload = json.dumps({
  "layer": "Network",
  "new-position": {
    "above": "31879488-426a-4d69-bb24-c752f3ef69e8"
  },
  "name": "Research_rule2_modified"
})
headers = {
  'Content-Type': 'application/json',
  'X-chkp-sid': 'INN029GbNQKUkkq9-eYTVIXELO0y-tkXn_zv2BJM6Uw'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

 

I will also add that this is happening on the Global Domain.

0 Kudos
3 Replies
PhoneBoy
Admin
Admin

0 Kudos
Omer_Kleinstern
Employee
Employee

Hi,

 

Please open a TAC case.

 

Thanks,

Omer

0 Kudos
fly1ng_circus
Contributor

So Per TAC this is not supported on the MDS, though this is not noted in the API documentation.