Join the Conversation

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

Options

sonicos -

Hi, I was doing some "API" tests.

I don't find many examples.

I would like to understand how to create an address object and insert it into a group object. At the moment I did this (maybe someone needs it)


curl -k -i -u "admin:pass" -X POST https://10.10.0.240:443/api/sonicos/auth

curl -k -i -X POST "https://10.10.0.240:443/api/sonicos/address-objects/ipv4" -H "accept: application/Json" -H "Content-Type: application/Json" -d @add.Json

curl -k -X POST "https://10.10.0.240:443/api/sonicos/config/pending" -H "accept: application/Json"

curl -k -i -u "admin:pass" -X DELETE https://10.10.0.240:443/api/sonicos/auth




file add.Json :

{

"address_objects": [

{

"ipv4": {

"name": "Test 1",

"zone": "LAN",

"host": {

"ip": "192.168.168.10"

}

}

},

{

"ipv4": {

"name": "Test 2",

"zone": "LAN",

"host": {

"ip": "192.168.168.20"

}

}

},

{

"ipv4": {

"name": "Test 3",

"zone": "LAN",

"host": {

"ip": "192.168.168.30"

}

}

}

]

}

Category: Firewall Management and Analytics
Reply

Answers

Sign In or Register to comment.