Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Normal response codes: 200
  • Response Parameters

    Name

    In

    Type

    Description

    proposalsbodyarraya list of defined proposals


  • Response Example

    {
        "proposals": [

            {

                "name":"proposal1",

                "encryption_algorithm":

                "hash_algorithm":

                "dh_group":

            }

        ]
    }



GET /cgi-bin/luci/sdewan/ipsec/v1/proposal/{proposal}

...

Request: N/A

  • Request Parameters

    Name

    In

    Type

    Description

    proposalpathstringproposal name


Response

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

    Name

    In

    Type

    Description

    namebodystringproposal name
    encryption_algorithmbodystringencryption algorithm
    hash_algorithmbodystringhash algorithm
    dh_groupbodyint


  • Response Example

    {

          "name":"proposal1",

          "encryption_algorithm":

          "hash_algorithm":

          "dh_group":

    }


POST /cgi-bin/luci/sdewan/ipsec/v1/proposal

...

Request:

  • Request Parameters:

    Name

    In

    Type

    Description

    proposalpathstringproposal name
    encryption_algorithmbodystringencryption algorithm
    hash_algorithmbodystringhash algorithm
    dh_groupbodyint


  • Request Example


    {

          "encryption_algorithm":

          "hash_algorithm":

          "dh_group":

    }


Response

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

...

Request:

  • Request Parameters

    Name

    In

    Type

    Description

    proposalpathstringproposal name


Response

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

...

  • Normal response codes: 200
  • Response Parameters

    Name

    In

    Type

    Description

    sitesbodyarraya list of defined sites


  • Response Example

    {
        "sites": [

            {

                "name": "site1"

                "gateway":"10.10.10.10",

                "crypto_proposal": "proposal1"

                "connections": [

                  {

                    "type": "tunnel"

                    "local_subnet":

                    "remote_subnet":

                    "crypto_proposal": "proposal1"

                  }

            }

        ]
    }



GET /cgi-bin/luci/sdewan/ipsec/v1/proposalsite/{proposalsite}

Get a proposalsite

Request: N/A

  • Request Parameters

    Name

    In

    Type

    Description

    proposal
    sitepathstring
    proposal
    remote site name


Response

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

    Name

    In

    Type

    Description

    namebodystring
    proposal nameencryption_algorithm
    site name
    gatewaybodystring
    pre_shared_keybodystring
    encryption algorithmhash_algorithm

    auth_methodbodystring
    hash algorithmdh_groupbodyint
    Response Example

    {

          "name":"proposal1",

          "encryption_algorithm":

          "hash_algorithm":

          "dh_group":

    }


    local_identifier body  string 
    remote_identifier body  string 
    crypto_proposal body  string 
    force_crypto_proposal body  boolean 
    connection body array 
    type body string "tunnel" or "transport" 
    mode body  string 
    local_subnet body string 
    local_natbody string 
    local_sourceip body string 
    local_updown body string 
    local_firewall body string firewall rule?
    remote_subnet body string 
    remote_sourceip body string 
    remote_updown body string 
    remote_firewallbodystring 
    keyexchange body string default: ikev2 
    inactivity body boolean 
    crypto_proposal body string 


  • Response Example

    {

         "name": "site1"

         "gateway":"10.10.10.10",

         "crypto_proposal": "proposal1"

         "connections": [

          {

             "type": "tunnel"

             "local_subnet":

             "remote_subnet":

              "crypto_proposal": "proposal1"

          }

    }


POST /cgi-bin/luci/sdewan/ipsec/v1/proposalsite

create a new proposal

Request:

...

PUT /cgi-bin/luci/sdewan/ipsec/v1/proposalsite/{proposalsite}

update a proposalsite

Request:

  • Request Parameters:

    Name

    In

    Type

    Description

    proposal
    sitepathstring
    proposal
    remote site name
    encryption_algorithm
    other paramsbody
    stringencryption algorithmhash_algorithmbodystringhash algorithmdh_groupbodyint

    Same with Get's response


  • Request Example


    {

         "gateway":"10.10.10.10",

         "crypto_proposal": "proposal1"

         "connections": [

          {

             "type": "tunnel"

             "local_subnet":

             "remote_subnet":

              "crypto_proposal": "proposal1"

          }

    Request Example

    {

          "encryption_algorithm":

          "hash_algorithm":

          "dh_group":

    }


Response

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

...

DELETE /cgi-bin/luci/sdewan/ipsec/v1/proposalsite/{proposalsite}

delete a proposalsite

Request:

  • Request Parameters

    Name

    In

    Type

    Description

    proposal
    sitepathstring
    proposal
    remote site name


Response

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