Join the Conversation

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


SonicOS API on creating Routing Policy


I am testing the SonicOS API with curl.

I can create objects without problem. However, the routing_policy API seems broken.

I got "No matching command found" on API return.

curl -k -i -X POST "" -H "accept: application/Json" -H "Content-Type: application/Json" -d @kk.Json

 % Total   % Received % Xferd Average Speed  Time   Time    Time Current

                                Dload Upload  Total  Spent   Left Speed

100  919   0  592 100  327   970   536 --:--:-- --:--:-- --:--:-- 1509HTTP/1.0 400 Bad Request

Server: SonicWALL

Expires: -1

Cache-Control: no-cache

Content-type: application/json; charset=UTF-8

X-Content-Type-Options: nosniff


    "status": {

        "success": false

       ,"cli": {

            "mode": "config_mode"

           ,"depth": 1

           ,"command": "route-policy interface x7 metric 20 source name Kushal_api2 destination group CHN_LAN service any gateway name SVN_Public"

           ,"configuring": true

           ,"pending_config": false

           ,"restart_required": "FALSE"


       ,"info": [


                "level": "error"

               ,"code": "E_NO_MATCH"

               ,"message": "No matching command found."





what i missed in json file



"route_policy": {

 "ipv4": {

 "interface": "x7",

 "metric": 20,

 "source": {

 "name": "Kushal_api2"


 "destination": {



 "service": {

 "any": true


 "gateway": {

  "name": "SVN_Public"


 "name": "Vidya",

 "disable_on_interface_down": true,

 "vpn_precedence": true,

 "probe": "",





Category: Mid Range Firewalls


  • Options
    TIJUTIJU Moderator

    Can you update the firmware version you are running and the model?

  • Options

    Current version firmware: SonicOS Enhanced

    updated on 25th june 2020

Sign In or Register to comment.