Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

SDEWAN is implemented as CNF based on OpenWRT and it will support below functionalities:

  • Export Restful API interface to support configuration of MWAN3, Firewall & NAT, IpSec.
  • Site-to-Site tunnels across edges & edges & central orchestrators and application managers

SDEWAN Service

SDEWAN service restful API provides the capability to list available SDEWAN services, get service status and execute service operation.

Common Error code:

CodeDescription
400Bad request
401unauthorized -the security token is not provides or expired.
404resource not found

Error Response:

NameInTypeDescription
messagebodystringerror message

GET /cgi-bin/luci/sdewan/v1/services

Lists all available sdewan services supported by SDEWAN CNF

Request: N/A

Response

  • Normal response codes: 200
  • Response Parameters

    NameInTypeDescription
    servicesbodyarraya list of supported service
  • Response Example
    {
        "services": ["mwan3", "firewall", "ipsec"]
    }


GET /cgi-bin/luci/sdewan/v1/service/{service}
Get a service's status

Request: 

  • Request Parameters

    NameInTypeDescription
    servicepathstringservice name, valid value are "mwan3", "firewall", "ipsec"

Response

  • Normal response code: 200
  • Response Parameters

    NameInTypeDescription
    statusbodystringservice status 
  • Response Example

    {
        "status": "running"
    }


PUT /cgi-bin/luci/sdewan/v1/service/{service}/

Execute a operation for a service

Request: 

  • Request Parameters

    NameInTypeDescription
    servicepathstringservice name, valid value are "mwan3", "firewall", "ipsec"
    actionbodystringaction to be executed. valid value are "start", "stop", "restart", "reload"
  • Response Example

    {
        "action": "start"
    }

Response

  • Normal response code: 200
  • Error response code: 400 (e.g. invalid action)
  • Response Parameters

    NameInTypeDescription
    resultbodystringoperation execution result 
  • Response Example

    {
        "result": "success"
    }


WAN3

SD-EWAN MWAN3 API provides support to get/create/update/delete MWAN3 Rule, Policy.


GET /cgi-bin/luci/sdewan/mwan3/v1/policys

Lists all defined policys

Request: N/A

Response

  • Normal response codes: 200
  • Response Parameters

    NameInTypeDescription
    policysbodyarraya list of defined policys
  • Response Example

    {
        "policys": [

            {

                "name":"balanced",

                "members": [

                    {

                          "interface": "net1",

                          "metric" 1,

                          "weight": 2

                    }

                    {

                          "interface": "net2",

                          "metric" 1,

                          "weight": 1

                    }

                 ]

            }

        ]
    }


GET /cgi-bin/luci/sdewan/mwan3/v1/policy/{policy}

Get a policy

Request: N/A

  • Request Parameters

    NameInTypeDescription
    policypathstringpolicy name

Response

  • Normal response codes: 200
  • Error response code: 404
  • Response Parameters

    NameInTypeDescription
    namebodystringpolicy name
    membersbodyarraypolicy members
    interfacebodystringmember interface name
    metricbodyintdefault: 1, members within one policy with a lower metric have precedence over higher metric members
    weightbodyintdefault: 1, members with same metric will distribute load based on this weight value
  • Response Example

    {

          "name": "balanced",

           "members": [

               {

                   "interface": "net1",

                   "metric" 1,

                   "weight": 2

                }

                {

                    "interface": "net2",

                    "metric" 1,

                     "weight": 1

                }

           ]

    }

POST /cgi-bin/luci/sdewan/mwan3/v1/policy

create a new policy

Request:

  • Request Parameters

    NameInTypeDescription
    namebodystringpolicy name
    membersbodyarraypolicy members
    interfacebodystringmember interface name
    metricbodyintdefault: 1, members within one policy with a lower metric have precedence over higher metric members
    weightbodyintdefault: 1, members with same metric will distribute load based on this weight value
  • Request Example

    {

          "name": "balanced",

           "members": [

               {

                   "interface": "net1",

                   "metric" 1,

                   "weight": 2

                }

                {

                    "interface": "net2",

                    "metric" 1,

                     "weight": 1

                }

           ]

    }

Response

  • Normal response codes: 201
  • Error response codes: 400, 401


PUT /cgi-bin/luci/sdewan/mwan3/v1/policy/{policy}

update a new policy

Request:

  • Request Parameters

    NameInTypeDescription
    policypathstringpolicy name
    membersbodyarraypolicy members
    interfacebodystringmember interface name
    metricbodyintdefault: 1, members within one policy with a lower metric have precedence over higher metric members
    weightbodyintdefault: 1, members with same metric will distribute load based on this weight value
  • Request Example

    {

           "members": [

               {

                   "interface": "net1",

                   "metric" 1,

                   "weight": 2

                }

                {

                    "interface": "net2",

                    "metric" 1,

                     "weight": 1

                }

           ]

    }

Response

  • Normal response codes: 204
  • Error response codes: 400, 401, 404


DELETE /cgi-bin/luci/sdewan/mwan3/v1/policy/{policy}

delete a new policy

Request:

  • Request Parameters

    NameInTypeDescription
    policypathstringpolicy name

Response

  • Normal response codes: 200
  • Error response codes: 401, 404

Firewall

SD-EWAN Firewall API provides support to get/create/update/delete Firewall Rule (include Firewall, SNAT, DNAT etc.).

  • No labels