netgate-tunnel API (24.02)

This YANG module provides a Netgate-defined data model for tunnel management.

Copyright 2022 Rubicon Communications, LLC.

tunnels-config

returns netgate.tunnel.TunnelsConfig

get /data/netgate-tunnel:tunnels-config

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config

Tunnel-related configurations.

Responses

200

netgate.tunnel.TunnelsConfig

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnels-config-wrapper":
    {
    }
}

creates netgate.tunnel.TunnelsConfig

post /data/netgate-tunnel:tunnels-config

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config

Tunnel-related configurations.

Request Body schema: application/yang-data+json

netgate.tunnel.TunnelsConfig to be added to list

netgate-tunnel:tunnels-config
object (netgate.tunnel.TunnelsConfig)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnels-config":
    {
    }
}

creates or updates netgate.tunnel.TunnelsConfig

put /data/netgate-tunnel:tunnels-config

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config

Tunnel-related configurations.

Request Body schema: application/yang-data+json

netgate.tunnel.TunnelsConfig to be added or updated

netgate-tunnel:tunnels-config-wrapper
object (netgate.tunnel.TunnelsConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnels-config-wrapper":
    {
    }
}

removes netgate.tunnel.TunnelsConfig

delete /data/netgate-tunnel:tunnels-config

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config

Tunnel-related configurations.

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.tunnel.tunnelsconfig.NextHops

get /data/netgate-tunnel:tunnels-config/next-hops

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops

Next hop configurations for multipoint tunnels.

Responses

200

netgate.tunnel.tunnelsconfig.NextHops

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:next-hops-wrapper":
    {
    }
}

creates netgate.tunnel.tunnelsconfig.NextHops

post /data/netgate-tunnel:tunnels-config/next-hops

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops

Next hop configurations for multipoint tunnels.

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.NextHops to be added to list

next-hops
object (netgate.tunnel.tunnelsconfig.NextHops)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "next-hops":
    {
    }
}

creates or updates netgate.tunnel.tunnelsconfig.NextHops

put /data/netgate-tunnel:tunnels-config/next-hops

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops

Next hop configurations for multipoint tunnels.

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.NextHops to be added or updated

netgate-tunnel:next-hops-wrapper
object (netgate.tunnel.tunnelsconfig.NextHopsWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:next-hops-wrapper":
    {
    }
}

removes netgate.tunnel.tunnelsconfig.NextHops

delete /data/netgate-tunnel:tunnels-config/next-hops

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops

Next hop configurations for multipoint tunnels.

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

creates netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

post /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface

Next-hop configuration for a tunnel interface.

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface to be added to list

tunnel-interface
object (netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "tunnel-interface":
    {
    }
}

returns netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

get /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Next-hop configuration for a tunnel interface.

path Parameters
name
required
string

Id of tunnel-interface

Responses

200

netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnel-interface-wrapper":
    {
    }
}

creates or updates netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

put /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Next-hop configuration for a tunnel interface.

path Parameters
name
required
string

Id of tunnel-interface

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface to be added or updated

netgate-tunnel:tunnel-interface-wrapper
object (netgate.tunnel.tunnelsconfig.nexthops.TunnelInterfaceWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnel-interface-wrapper":
    {
    }
}

removes netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

delete /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Next-hop configuration for a tunnel interface.

path Parameters
name
required
string

Id of tunnel-interface

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

creates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination

post /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv4-tunnel-destination

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv4-tunnel-destination

IPv4 address reachable over a multipoint tunnel.

path Parameters
name
required
string

Id of tunnel-interface

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination to be added to list

ipv4-tunnel-destination
object (netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "ipv4-tunnel-destination":
    {
    }
}

returns netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination

get /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv4-tunnel-destination={address}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv4-tunnel-destination={address}

IPv4 address reachable over a multipoint tunnel.

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv4-tunnel-destination

Responses

200

netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D/ipv4-tunnel-destination=%7Baddress%7D"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:ipv4-tunnel-destination-wrapper":
    {
    }
}

creates or updates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination

put /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv4-tunnel-destination={address}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv4-tunnel-destination={address}

IPv4 address reachable over a multipoint tunnel.

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv4-tunnel-destination

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination to be added or updated

netgate-tunnel:ipv4-tunnel-destination-wrapper
object (netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestinationWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:ipv4-tunnel-destination-wrapper":
    {
    }
}

removes netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination

delete /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv4-tunnel-destination={address}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv4-tunnel-destination={address}

IPv4 address reachable over a multipoint tunnel.

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv4-tunnel-destination

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D/ipv4-tunnel-destination=%7Baddress%7D"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

creates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

post /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv6-tunnel-destination

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv6-tunnel-destination

creates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination to be added to list

ipv6-tunnel-destination
object (netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "ipv6-tunnel-destination":
    {
    }
}

returns netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

get /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv6-tunnel-destination={address}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv6-tunnel-destination={address}

returns netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv6-tunnel-destination

Responses

200

netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D/ipv6-tunnel-destination=%7Baddress%7D"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:ipv6-tunnel-destination-wrapper":
    {
    }
}

creates or updates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

put /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv6-tunnel-destination={address}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv6-tunnel-destination={address}

creates or updates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv6-tunnel-destination

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination to be added or updated

netgate-tunnel:ipv6-tunnel-destination-wrapper
object (netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestinationWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:ipv6-tunnel-destination-wrapper":
    {
    }
}

removes netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

delete /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv6-tunnel-destination={address}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}/ipv6-tunnel-destination={address}

removes netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv6-tunnel-destination

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D/ipv6-tunnel-destination=%7Baddress%7D"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

tunnels-state

returns netgate.tunnel.TunnelsState

get /data/netgate-tunnel:tunnels-state

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-state

Tunnel-related state.

Responses

200

netgate.tunnel.TunnelsState

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-state"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnels-state-wrapper":
    {
    }
}

returns netgate.tunnel.tunnelsstate.NextHops

get /data/netgate-tunnel:tunnels-state/next-hops

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops

Next hop state for multipoint tunnels.

Responses

200

netgate.tunnel.tunnelsstate.NextHops

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:next-hops-wrapper":
    {
    }
}

returns netgate.tunnel.tunnelsstate.nexthops.TunnelInterface

get /data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface={name}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface={name}

returns netgate.tunnel.tunnelsstate.nexthops.TunnelInterface

path Parameters
name
required
string

Id of tunnel-interface

Responses

200

netgate.tunnel.tunnelsstate.nexthops.TunnelInterface

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface=%7Bname%7D"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnel-interface-wrapper":
    {
    }
}

returns netgate.tunnel.tunnelsstate.nexthops.tunnelinterface.Ipv4TunnelDestination

get /data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface={name}/ipv4-tunnel-destination={address}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface={name}/ipv4-tunnel-destination={address}

returns netgate.tunnel.tunnelsstate.nexthops.tunnelinterface.Ipv4TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv4-tunnel-destination

Responses

200

netgate.tunnel.tunnelsstate.nexthops.tunnelinterface.Ipv4TunnelDestination

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface=%7Bname%7D/ipv4-tunnel-destination=%7Baddress%7D"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:ipv4-tunnel-destination-wrapper":
    {
    }
}

returns netgate.tunnel.tunnelsstate.nexthops.tunnelinterface.Ipv6TunnelDestination

get /data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface={name}/ipv6-tunnel-destination={address}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface={name}/ipv6-tunnel-destination={address}

returns netgate.tunnel.tunnelsstate.nexthops.tunnelinterface.Ipv6TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv6-tunnel-destination

Responses

200

netgate.tunnel.tunnelsstate.nexthops.tunnelinterface.Ipv6TunnelDestination

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface=%7Bname%7D/ipv6-tunnel-destination=%7Baddress%7D"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:ipv6-tunnel-destination-wrapper":
    {
    }
}