Join the Conversation

To sign in, use your existing MySonicWall account. To create a free MySonicWall account click "Register".

Options

API help needed to disable/enable access rule

I have a nsa 4700 and am trying to write a simple script using curl to disable an access rule using the api. I wish to be able to schedule through my windows tack scheduler to turn on and off an access rule on specific days during the year. Here is the line I need help on:

curl -X PUT "https://192.168.168.168/api/sonicos/access-rules/ipv4" -H "accept: application/json" -H "Content-Type: application/json" -d "{"access_rules": [{ "ipv4": {"uuid": "00000000-0000-0016-0700-18c2416807fb", "enable": false}}]}"

This line executes with no errors, but when I commit the changes it deletes all of my custom access rules. Have I just missed something in the syntax?

Admittedly I am a newby with api.

Category: Mid Range Firewalls
Reply
Tagged:
Sign In or Register to comment.