# Get Network Appliance Vpn Site To Site Vpn

```http
GET /networks/{networkId}/appliance/vpn/siteToSiteVpn
```

API: Meraki Dashboard API (version 1.77.0)

Operation ID: getNetworkApplianceVpnSiteToSiteVpn

Tags: appliance, configure, vpn, siteToSiteVpn

## Description

Return the site-to-site VPN settings of an MX network or configuration template.

## Servers

```json
[
  {
    "url": "https://api.meraki.com/{basePath}",
    "variables": {
      "basePath": {
        "default": "api/v1"
      }
    }
  }
]
```

## Authentication

Satisfy any one of the following alternatives. Within each alternative, all listed schemes are required. An empty object allows anonymous access.

```json
[
  {
    "oauth2": [
      "sdwan:config:read"
    ]
  }
]
```

### Security schemes

```json
{
  "oauth2": {
    "type": "oauth2",
    "description": "This API uses OAuth 2 with the authorization code grant flow. [More info](https://developer.cisco.com/meraki/api-v1/authorization/)",
    "flows": {
      "authorizationCode": {
        "authorizationUrl": "https://as.meraki.com/oauth/authorize",
        "tokenUrl": "https://as.meraki.com/oauth/token",
        "scopes": {
          "camera:config:read": "Cameras (MV)",
          "camera:config:write": "Cameras (MV)",
          "camera:telemetry:read": "Cameras (MV)",
          "camera:telemetry:write": "Cameras (MV)",
          "dashboard:general:config:read": "Entire dashboard, excluding identity and access management",
          "dashboard:general:config:write": "Entire dashboard, excluding identity and access management",
          "dashboard:general:telemetry:read": "Entire dashboard, excluding identity and access management",
          "dashboard:general:telemetry:write": "Entire dashboard, excluding identity and access management",
          "dashboard:iam:config:read": "Dashboard related to identity and access management, including early access features",
          "dashboard:iam:config:write": "Dashboard related to identity and access management, including early access features",
          "dashboard:iam:telemetry:read": "Dashboard related to identity and access management, including early access features",
          "dashboard:iam:telemetry:write": "Dashboard related to identity and access management, including early access features",
          "dashboard:licensing:config:read": "Licensing",
          "dashboard:licensing:config:write": "Licensing",
          "dashboard:licensing:telemetry:read": "Licensing",
          "dashboard:licensing:telemetry:write": "Licensing",
          "iot:gateway:general:config:read": "Sensor Connect (IoT Control)",
          "iot:gateway:general:config:write": "Sensor Connect (IoT Control)",
          "iot:gateway:general:telemetry:read": "Sensor Connect (IoT Control)",
          "iot:gateway:general:telemetry:write": "Sensor Connect (IoT Control)",
          "iot:gateway:onboarding:config:read": "Sensor Connect (IoT Onboarding)",
          "iot:gateway:onboarding:config:write": "Sensor Connect (IoT Onboarding)",
          "policy:config:read": "Provides granular authorization over all global policy resources including policy objects, adaptive policy, and Organization Group Policy",
          "policy:config:write": "Provides granular authorization over all global policy resources including policy objects, adaptive policy, and Organization Group Policy",
          "policy:telemetry:read": "Provides granular authorization over all global policy resources including policy objects, adaptive policy, and Organization Group Policy",
          "policy:telemetry:write": "Provides granular authorization over all global policy resources including policy objects, adaptive policy, and Organization Group Policy",
          "sdwan:config:read": "Secure SD-WAN (MX including MXIGZ)",
          "sdwan:config:write": "Secure SD-WAN (MX including MXIGZ)",
          "sdwan:telemetry:read": "Secure SD-WAN (MX including MXIGZ)",
          "sdwan:telemetry:write": "Secure SD-WAN (MX including MXIGZ)",
          "sensor:config:read": "Sensors (MT)",
          "sensor:config:write": "Sensors (MT)",
          "sensor:telemetry:read": "Sensors (MT)",
          "sensor:telemetry:write": "Sensors (MT)",
          "sm:config:read": "Endpoint Management (SM)",
          "sm:config:write": "Endpoint Management (SM)",
          "sm:telemetry:read": "Endpoint Management (SM)",
          "sm:telemetry:write": "Endpoint Management (SM)",
          "switch:config:read": "Switches (MS)",
          "switch:config:write": "Switches (MS)",
          "switch:telemetry:read": "Switches (MS)",
          "switch:telemetry:write": "Switches (MS)",
          "wireless:config:read": "Wireless (MR)",
          "wireless:config:write": "Wireless (MR)",
          "wireless:telemetry:read": "Wireless (MR)",
          "wireless:telemetry:write": "Wireless (MR)"
        }
      }
    }
  }
}
```

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| networkId | path | yes | string | Network ID |

### Parameter definitions

```json
[
  {
    "name": "networkId",
    "in": "path",
    "description": "Network ID",
    "schema": {
      "type": "string"
    },
    "required": true
  }
]
```

## Responses

### 200

Successful operation

```json
{
  "description": "Successful operation",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "description": "The site-to-site VPN mode."
          },
          "hubs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "hubId": {
                  "type": "string",
                  "description": "The network ID of the hub."
                },
                "useDefaultRoute": {
                  "type": "boolean",
                  "description": "Indicates whether default route traffic should be sent to this hub."
                },
                "vrfs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The VRF ID. Use '0' for the default VRF."
                      },
                      "name": {
                        "type": "string",
                        "description": "The VRF name."
                      }
                    }
                  },
                  "description": "The VRFs associated with this default-route hub."
                }
              }
            },
            "description": "The list of VPN hubs, in order of preference."
          },
          "subnets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "localSubnet": {
                  "type": "string",
                  "description": "The CIDR notation subnet used within the VPN"
                },
                "useVpn": {
                  "type": "boolean",
                  "description": "Indicates the presence of the subnet in the VPN"
                },
                "nat": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether or not VPN subnet translation is enabled for the subnet"
                    },
                    "remoteSubnet": {
                      "type": "string",
                      "description": "The translated subnet to be used in the VPN"
                    },
                    "legacy": {
                      "type": "object",
                      "description": "DEPRECATED: Legacy VPN NAT settings. For VLAN entries, when the corresponding NFO is enabled, the related field is returned for every VLAN, including false values."
                    }
                  },
                  "description": "Configuration of NAT for the subnet"
                }
              }
            },
            "description": "The list of local VPN subnets and their VPN presence. VLAN entries include vlanId and subnetting where applicable. When the corresponding NFO is enabled, NAT settings are returned for every VLAN; non-VLAN entries omit vlanId, subnetting, and nat.legacy."
          },
          "sgt": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "Whether or not Peer SGT is enabled for traffic to this VPN peer."
              }
            },
            "description": "Security Group Tag settings for the VPN peer."
          },
          "subnet": {
            "type": "object",
            "properties": {
              "nat": {
                "type": "object",
                "properties": {
                  "isAllowed": {
                    "type": "boolean",
                    "description": "If enabled, VPN subnet translation can be used to translate any local subnets that are allowed to use the VPN into a new subnet with the same number of addresses."
                  }
                },
                "description": "Configuration of NAT for subnets"
              }
            },
            "description": "Configuration of subnet features"
          },
          "hostTranslations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the NAT host."
                },
                "local": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string",
                      "description": "The local IP address of the translated host."
                    }
                  },
                  "description": "Configuration of the local address of the translated host."
                },
                "remote": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string",
                      "description": "The remote IP address of the translated host."
                    }
                  },
                  "description": "Configuration of the remote address of the translated host."
                }
              }
            },
            "description": "The list of VPN host translations. Host translations are supported starting from MX firmware version 26.1.2"
          },
          "natTraversal": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "automatic",
                  "manual"
                ],
                "description": "Whether NAT traversal is automatic or manually configured."
              },
              "publicIp": {
                "type": "string",
                "description": "The public IPv4 address used for manual NAT traversal."
              },
              "publicPort": {
                "type": "integer",
                "description": "The public port used for manual NAT traversal."
              }
            },
            "description": "NAT traversal settings."
          }
        }
      },
      "example": {
        "mode": "spoke",
        "hubs": [
          {
            "hubId": "N_4901849",
            "useDefaultRoute": true,
            "vrfs": [
              {
                "id": "0",
                "name": "Default"
              }
            ]
          }
        ],
        "subnets": [
          {
            "localSubnet": "192.168.1.0/24",
            "useVpn": true,
            "nat": {
              "enabled": true,
              "remoteSubnet": "198.51.100.3/32"
            }
          }
        ],
        "sgt": {
          "enabled": true
        },
        "subnet": {
          "nat": {
            "isAllowed": true
          }
        },
        "hostTranslations": [
          {
            "name": "Host 1",
            "local": {
              "address": "192.168.1.10"
            },
            "remote": {
              "address": "72.168.2.10"
            }
          }
        ],
        "natTraversal": {
          "mode": "automatic",
          "publicIp": "203.0.113.8",
          "publicPort": 4500
        }
      }
    }
  }
}
```

## Code samples

### Meraki Python Library

```python
import meraki

# Defining your API key as a variable in source code is discouraged.
# This API key is for a read-only docs-specific environment.
# In your own code, use an environment variable as shown under the Usage section
# @ https://github.com/meraki/dashboard-api-python/

API_KEY = 'your-key-here'

dashboard = meraki.DashboardAPI(API_KEY)

network_id = 'L_646829496481105433'

response = dashboard.appliance.getNetworkApplianceVpnSiteToSiteVpn(
    network_id
)

print(response)
```

## Additional OpenAPI fields

```json
{
  "__originalOperationId": "getNetworkApplianceVpnSiteToSiteVpn"
}
```
