Listing the sites in a VPN

You can use GET requests to list the enabled and disabled sites in a VPN.

After opening the VPN topology, use these requests to list the sites associated with a central gateway in a VPN:
  • GET http://localhost:8082/7.1/elements/vpn/5/gateway_tree_nodes/central/88/sites/enabled — Lists the enabled sites associated with the central gateway.
  • GET http://localhost:8082/7.1/elements/vpn/5/gateway_tree_nodes/central/88/sites/disabled — Lists the disabled sites associated with the central gateway..
After opening the VPN topology, use these requests to list the sites associated with a satellite gateway in a VPN:
  • GET http://localhost:8082/7.1/elements/vpn/5/gateway_tree_nodes/satellite/66/sites/enabled — Lists the enabled sites associated with the satellite gateway.
  • GET http://localhost:8082/7.1/elements/vpn/5/gateway_tree_nodes/satellite/66/sites/disabled — Lists the disabled sites associated with the satellite gateway.

After opening the VPN topology, use this request to list the enabled sites associated with a satellite gateway in the VPN:

GET http://localhost:8082/7.1/elements/vpn/5/gateway_tree_nodes/satellite/66/sites/enabled

Note: In this example, the satellite gateway's ID number is 66.

This request returns a 200 HTTP status response code and this result:

{
result: [2]
0:  {
href: "http://127.0.0.1:8082/7.1/elements/vpn/5/gateway_tree_nodes/satellite/66/sites/enabled/68"
name: "vpn_site 68"
obsolete: false
type: "vpn_site"
}-
1:  {
href: "http://127.0.0.1:8082/7.1/elements/vpn/5/gateway_tree_nodes/satellite/66/sites/enabled/61"
name: "vpn_site 61"
obsolete: false
type: "vpn_site"
}-
-
}